docs(sdk-python): Add connect() and SecurityConfig.from_env() documentation#19
docs(sdk-python): Add connect() and SecurityConfig.from_env() documentation#19
Conversation
…tation - Add CapiscIO.connect() card to SDK reference index - Add from_env() section to config docs with env var table - Document CAPISCIO_REQUIRE_SIGNATURES, CAPISCIO_FAIL_MODE, CAPISCIO_MIN_TRUST_LEVEL
✅ Documentation Build SuccessfulThe documentation build completed successfully and passed validation checks.
|
There was a problem hiding this comment.
Pull request overview
Adds Python SDK reference documentation for newly introduced connection flow and environment-based security configuration, aligning the docs site with recent SDK/server feature work.
Changes:
- Added a new API reference “card” for
CapiscIO.connect()in the Python SDK reference index. - Added a
SecurityConfig.from_env()section describing supported environment variables and an example.env.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/reference/sdk-python/index.md | Adds CapiscIO.connect() entry to the SDK reference landing grid. |
| docs/reference/sdk-python/config.md | Documents SecurityConfig.from_env() and environment variables in the SDK config reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - :material-key: **CapiscIO.connect()** | ||
|
|
||
| --- | ||
|
|
||
| "Let's Encrypt" style agent setup. One-liner to get a fully | ||
| configured agent with DID, keys, and badges. | ||
|
|
||
| [:octicons-arrow-right-24: Connect API](#capiscioconnect) | ||
|
|
There was a problem hiding this comment.
The "Connect API" link points to the in-page anchor #capiscioconnect, but this page doesn't define that anchor (no capiscioconnect heading/id elsewhere). This will render as a broken link; either add a corresponding section (e.g., a heading/mkdocstrings block for CapiscIO.connect) or link to an existing page that documents CapiscIO.connect() (and ensure the target exists).
| | `CAPISCIO_REQUIRE_SIGNATURES` | Require badge on requests | `true` | | ||
| | `CAPISCIO_FAIL_MODE` | `block`, `monitor`, or `log` | `block` | | ||
| | `CAPISCIO_MIN_TRUST_LEVEL` | Minimum trust level (0-4) | `0` | | ||
| | `CAPISCIO_RATE_LIMIT_RPM` | Rate limit (requests/min) | `1000` | | ||
|
|
||
| **Example `.env` file:** | ||
|
|
||
| ```bash | ||
| CAPISCIO_REQUIRE_SIGNATURES=true | ||
| CAPISCIO_FAIL_MODE=block | ||
| CAPISCIO_MIN_TRUST_LEVEL=0 |
There was a problem hiding this comment.
This environment variable table conflicts with the existing SecurityConfig.from_env() documentation in docs/reference/configuration.md (e.g., CAPISCIO_REQUIRE_SIGNATURES default is documented as false there, and CAPISCIO_RATE_LIMIT_RPM default as 60, not true/1000). Also, the description "Require badge on requests" appears mismatched for CAPISCIO_REQUIRE_SIGNATURES (it maps to signature enforcement in the other doc). Please align the defaults/wording with the canonical configuration reference (or update both consistently) to avoid publishing contradictory docs.
| | `CAPISCIO_REQUIRE_SIGNATURES` | Require badge on requests | `true` | | |
| | `CAPISCIO_FAIL_MODE` | `block`, `monitor`, or `log` | `block` | | |
| | `CAPISCIO_MIN_TRUST_LEVEL` | Minimum trust level (0-4) | `0` | | |
| | `CAPISCIO_RATE_LIMIT_RPM` | Rate limit (requests/min) | `1000` | | |
| **Example `.env` file:** | |
| ```bash | |
| CAPISCIO_REQUIRE_SIGNATURES=true | |
| CAPISCIO_FAIL_MODE=block | |
| CAPISCIO_MIN_TRUST_LEVEL=0 | |
| | `CAPISCIO_REQUIRE_SIGNATURES` | Require signatures on requests | `false` | | |
| | `CAPISCIO_FAIL_MODE` | `block`, `monitor`, or `log` | `block` | | |
| | `CAPISCIO_MIN_TRUST_LEVEL` | Minimum trust level (0-4) | `0` | | |
| | `CAPISCIO_RATE_LIMIT_RPM` | Rate limit (requests/min) | `60` | | |
| **Example `.env` file:** | |
| ```bash | |
| CAPISCIO_REQUIRE_SIGNATURES=false | |
| CAPISCIO_FAIL_MODE=block | |
| CAPISCIO_MIN_TRUST_LEVEL=0 | |
| CAPISCIO_RATE_LIMIT_RPM=60 |
|
Closing: SDK docs belong in capiscio-sdk-python/docs/ per project conventions. Documentation updates are in SDK PR #29. |
Summary
Documents the new SDK features from PRs #29 (capiscio-sdk-python) and #27 (capiscio-server).
Changes
SDK Reference Index (
docs/reference/sdk-python/index.md)CapiscIO.connect()card to API reference gridConfig Reference (
docs/reference/sdk-python/config.md)SecurityConfig.from_env()section with environment variable tableCAPISCIO_REQUIRE_SIGNATURES,CAPISCIO_FAIL_MODE,CAPISCIO_MIN_TRUST_LEVEL,CAPISCIO_RATE_LIMIT_RPMRelated PRs
Documentation Additions
New Features Documented:
CapiscIO.connect(name="...")- Name-based agent lookup/creationCapiscioMiddleware(config=SecurityConfig)- Middleware accepts config parameterSecurityConfig.from_env()- Load configuration from environment variablesEnvironment Variables:
CAPISCIO_REQUIRE_SIGNATUREStrueCAPISCIO_FAIL_MODEblock,monitor, orlogblockCAPISCIO_MIN_TRUST_LEVEL0CAPISCIO_RATE_LIMIT_RPM1000