Skip to main content

Sirannon Python client

sirannon-client connects a Python 3.11 or later program to a Sirannon server over WebSocket or HTTP. SirannonClient blocks until the server answers, while AsyncSirannonClient has the same methods as coroutines for asyncio.

pip install sirannon-client
from sirannon_client import SirannonClient

with SirannonClient("http://localhost:9876") as client:
    db = client.database("orders")
    db.execute("INSERT INTO orders (id, total) VALUES (?, ?)", [42, 4999])
    rows = db.query("SELECT id, total FROM orders WHERE id = ?", [42])

The client returns every integer as an int and every BLOB as bytes, including integers beyond 2^53. It has a typed method for every HTTP route of the server, and it calls registered operations through the references that sirannon-codegen --python writes.

When a connection drops, a change subscription resumes from the last change that it delivered. While the server keeps the history after that change, the subscription delivers each change once, in order; once the server prunes that history, the client calls on_reset. A live query updates its rows as the table changes. TopologyAwareClient sends writes to the primary of a replication group and sends reads to the nodes that its read_preference selects. The client raises SirannonError for every failure, with the server's code unchanged.

The Python client guide explains each of these.

Development

python3 scripts/tools.py creates a virtual environment from the hashed requirements-dev.txt and starts a tool inside it, such as python3 scripts/tools.py pytest. python3 scripts/tools.py python -m generator checks that the generated models and route methods match packages/ts/openapi.json and packages/ts/asyncapi.json, and --write rewrites them. The tests start the server from packages/ts/scripts/client-test-server.mjs, so build packages/ts first.

Metadata

Release files for sirannon-client 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sirannon-client 0.2.0
File Size Uploaded Provenance Actions
sirannon_client-0.2.0.tar.gz 60.7 kB With provenance Details for sirannon_client-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sirannon-client 0.2.0
File Interpreter ABI Platform Actions
sirannon_client-0.2.0-py3-none-any.whl Python 3 none any Details for sirannon_client-0.2.0-py3-none-any.whl

Total release size: 148.5 kB

Release files / sirannon_client-0.2.0.tar.gz

Download URL sirannon_client-0.2.0.tar.gz
Size 60.7 kB
Tags Source
SHA-256 checksum
How to use checksums
79383fccd3844db07636338608facdc69b780a5a492c0509c1811b11d9274c6d
BLAKE2b-256 checksum
How to use checksums
de18354f9d0eecb22a6576c86de6f920d0bc27710cf2e59e20faf14f62ed35b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / sirannon_client-0.2.0-py3-none-any.whl

Download URL sirannon_client-0.2.0-py3-none-any.whl
Size 87.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
661aadc53a4f69302c38a1d5a0378f2093c3b028ecfdd8c4ad342c0637b9150a
BLAKE2b-256 checksum
How to use checksums
c0917abe1c0163c43905b8191df801591f5bc5ff1cb325e2b12870b58fa0fca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for sirannon-client 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sirannon_client-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page