Skip to content

[Advanced] Python client for contextio-sdk (feature parity with the TS SDK) #1

Description

@Eras256

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions