Skip to main content

Python, sync and async

The Python package mirrors the public /v1 namespaces with Pydantic models, safe retries, cursor pages, and synchronous or asynchronous clients.
The Python client requires Python 3.12 or newer and currently ships as verified wheel and source-distribution artifacts with each GitHub release, not from PyPI. Install synapse-spec and synapse-client from the same version bundle.

Install

Start a subject journey

expires_in_seconds defaults to one hour and accepts 300 seconds up to ten years (315360000). Resending the same launch with a new idempotency key while its session is still open returns that session and extends expires_at to at least expires_in_seconds from now; only the expiry may differ, and it is never shortened.

Async applications

Contract notes

  • SynapseClient and AsyncSynapseClient expose matching namespaces and models.
  • ApiError exposes status, detail, request_id, retry_after, and response headers.
  • Use list_all_* helpers when you explicitly want to consume every cursor page.
  • Pass a persisted opaque idempotency_key for every mutation.