Skip to content

Commit 57871cb

Browse files
nficanoclaude
andcommitted
examples: phase 0: skeleton, plan, requirements, ruff/pyright/pytest gates pass
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b6e9444 commit 57871cb

24 files changed

Lines changed: 554 additions & 419 deletions

examples/.env.example

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Environment variables recognized by examples/. None are required for the
2+
# default (scripted) run. Copy this file to `.env` and set what you need.
3+
4+
# ---- LLM providers ------------------------------------------------------
5+
ARCP_EXAMPLES_ANTHROPIC_API_KEY=
6+
ARCP_EXAMPLES_OPENAI_API_KEY=
7+
ARCP_EXAMPLES_GEMINI_API_KEY=
8+
ARCP_EXAMPLES_ZHIPU_API_KEY=
9+
ARCP_EXAMPLES_DEEPSEEK_API_KEY=
10+
LITELLM_PROXY_URL=
11+
12+
# ---- JWT signing (examples 3, 5, 6, 8) ----------------------------------
13+
# Either inline the PEM (escape newlines) or point to a file path.
14+
ARCP_EXAMPLES_JWT_PRIVATE_KEY=
15+
ARCP_EXAMPLES_JWT_PUBLIC_KEY=
16+
# Deterministic seed for golden tests; leave unset for ephemeral keys.
17+
ARCP_EXAMPLES_JWT_SEED=
18+
19+
# ---- Destinations (example 3) -------------------------------------------
20+
NTFY_URL=https://ntfy.sh
21+
NTFY_TOPIC=
22+
TELEGRAM_BOT_TOKEN=
23+
TELEGRAM_CHAT_ID=
24+
SMTP_HOST=
25+
SMTP_PORT=587
26+
SMTP_USER=
27+
SMTP_PASS=
28+
EMAIL_TO=
29+
30+
# ---- LDAP (example 6) ---------------------------------------------------
31+
OPENLDAP_URL=
32+
OPENLDAP_BIND_DN=
33+
OPENLDAP_BIND_PW=
34+
35+
# ---- Observability (example 7) ------------------------------------------
36+
LANGFUSE_HOST=https://cloud.langfuse.com
37+
LANGFUSE_PUBLIC_KEY=
38+
LANGFUSE_SECRET_KEY=
39+
DD_API_KEY=
40+
DD_SITE=datadoghq.com
41+
OTEL_EXPORTER_OTLP_ENDPOINT=
42+
43+
# ---- OpenClaw (example 8) -----------------------------------------------
44+
OPENCLAW_URL=
45+
AUTHENTIK_TOKEN=

examples/.ruff.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Mirrors the SDK's ruff configuration so `examples/` lints identically whether
2+
# invoked from the repository root via the SDK's `pyproject.toml` or standalone
3+
# inside this directory. Keep in sync with python-sdk/pyproject.toml [tool.ruff].
4+
5+
line-length = 100
6+
target-version = "py313"
7+
src = ["."]
8+
9+
[lint]
10+
select = [
11+
"E", "W",
12+
"F",
13+
"I",
14+
"N",
15+
"UP",
16+
"B",
17+
"C4",
18+
"SIM",
19+
"RUF",
20+
"PTH",
21+
"PT",
22+
"RET",
23+
"TRY",
24+
"ASYNC",
25+
"ERA",
26+
"ARG",
27+
"SLF",
28+
"TID",
29+
"PERF",
30+
"D",
31+
]
32+
ignore = [
33+
"E501",
34+
"TRY003",
35+
"D107",
36+
"D105",
37+
"D203",
38+
"D213",
39+
# Examples are pedagogical scripts, not library code: a section-by-section
40+
# narrative inside `main.py` is the documentation, so per-symbol docstrings
41+
# add noise without adding clarity.
42+
"D",
43+
# Per the SDK config: tool handlers and inbound dispatchers have
44+
# protocol-mandated signatures; unused-arg lints just create churn.
45+
"ARG001",
46+
"ARG002",
47+
]
48+
49+
[lint.per-file-ignores]
50+
"*/tests/*" = ["B011", "ASYNC109", "SLF001"]
51+
"_shared/tests/*" = ["B011", "ASYNC109", "SLF001"]
52+
53+
[lint.pydocstyle]
54+
convention = "google"
55+
56+
[format]
57+
quote-style = "double"
58+
indent-style = "space"

examples/01_minimal_session.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

examples/02_tool_invoke_with_progress.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

examples/03_human_input_request.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

examples/04_permission_challenge.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

examples/05_observer_subscription.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)