Context
contextio-sdk (npm, TypeScript — packages/sdk/src/client.ts) is the only official client today. No client exists in any other language, which blocks any Python backend/script from integrating without hand-rolling HTTP calls.
Scope
A Python package mirroring the real, current surface of ContextioClient:
challenge(address: str) -> WalletChallenge
verify(address, signed_message, ...) -> WalletSession (same input shape as the TS verify())
with_session(session) — client bound to an existing session, no re-auth
treasury(), obligations(), decisions(), propose(), legal()
well_known_legal_context(domain) (mirrors wellKnownLegalContext)
SEP-53 signing itself is out of scope — accept a caller-supplied signing callback, same pattern the JS client expects from its caller. Do not reimplement Stellar keypair signing inside the client.
Acceptance criteria
- Installable (
pip install or poetry add from this repo, e.g. packages/sdk-python/).
- A runnable example script completes challenge → verify → treasury() → obligations() against the live public testnet demo API (
https://contextio-api.fly.dev).
- Unit tests cover request/response shapes with mocked HTTP — no live network required for CI to pass.
- README documents install + the runnable example.
References
packages/sdk/src/client.ts, packages/sdk/src/types.ts for the exact shapes to mirror.
Context
contextio-sdk(npm, TypeScript —packages/sdk/src/client.ts) is the only official client today. No client exists in any other language, which blocks any Python backend/script from integrating without hand-rolling HTTP calls.Scope
A Python package mirroring the real, current surface of
ContextioClient:challenge(address: str) -> WalletChallengeverify(address, signed_message, ...) -> WalletSession(same input shape as the TSverify())with_session(session)— client bound to an existing session, no re-authtreasury(),obligations(),decisions(),propose(),legal()well_known_legal_context(domain)(mirrorswellKnownLegalContext)SEP-53 signing itself is out of scope — accept a caller-supplied signing callback, same pattern the JS client expects from its caller. Do not reimplement Stellar keypair signing inside the client.
Acceptance criteria
pip installorpoetry addfrom this repo, e.g.packages/sdk-python/).https://contextio-api.fly.dev).References
packages/sdk/src/client.ts,packages/sdk/src/types.tsfor the exact shapes to mirror.