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.1.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.1.0
File Size Uploaded Provenance Actions
sirannon_client-0.1.0.tar.gz 58.3 kB With provenance Details for sirannon_client-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 142.8 kB

Release files / sirannon_client-0.1.0.tar.gz

Download URL sirannon_client-0.1.0.tar.gz
Size 58.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d4f66f14938188d16e064c1a05a9eb37b6a9f1a877a4a0c00259f20345802e
BLAKE2b-256 checksum
How to use checksums
af5c40bfbef0fc754d2ba153f56d9458eb0210914e499c966e3b97d7631089f8
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 9, 2026.

Transparency log

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

Download URL sirannon_client-0.1.0-py3-none-any.whl
Size 84.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4da8c9182721205ac35c952ae4ef5a76965fafe2c8ec1533082a4c59dc8fe452
BLAKE2b-256 checksum
How to use checksums
d094443c0058c5c315036b8222399724c6b62338302ce0d8292251cc4851313c
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 9, 2026.

Transparency log

Security for sirannon-client 0.1.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.1.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 9, 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.1.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