Asyncio-first Python client for the Fluxum realtime database
Project description
Fluxum Python SDK
The asyncio-first Python client for the Fluxum realtime database (SPEC-011, T7.4). Zero runtime dependencies — the SDK carries its own minimal MessagePack codec and FluxBIN row reader.
pip install fluxum-sdk
import asyncio
from fluxum import Connection, TableSchema
async def main():
db = await Connection.connect(
"fluxum://127.0.0.1:15801",
token=b"my-token",
tables=[...], # from `fluxum generate --lang python`
)
await db.subscribe(["SELECT * FROM ChatMessage"])
await db.call_reducer("send_chat", [1, "hello"])
# TxUpdates land in db.cache; poll or read db.cache.rows("ChatMessage").
await db.close()
asyncio.run(main())
What you get
Connection— one asyncio session over FluxRPC/TCP: authenticate, subscribe (each query'sInitialDatapopulates a local row cache), call reducers, and receiveTxUpdatediffs on the same socket.- Transparent reconnect (SDK-047): on connection loss the client reconnects, re-authenticates, resubscribes every active query and reconciles its cache — the application keeps its handle across the outage.
- A per-table row cache keyed by primary key, with per-query ownership so
an
unsubscribedrops only the rows that query held (SDK-044). - Full type hints (
py.typed, SDK-062).
Typed bindings
Generate typed row classes and reducer wrappers from a running server's
schema (or a saved schema.json):
fluxum generate --lang python --schema http://127.0.0.1:15800 --out ./gen
This emits tables.py (a @dataclass row + decoder + cache hooks per
table), reducers.py (a typed async def per client-callable reducer),
__init__.py, and py.typed. Offline generation from a saved schema
produces byte-identical output (SPEC-011 acceptance 11).
Testing
The SDK is validated by the shared conformance corpus
(tests/conformance/)
— the same declarative
scenarios every Fluxum SDK runs against the same server build (TST-052). The
runner boots a fresh fluxum-server per scenario, so build it first:
cargo build -p fluxum-server
cd sdks/python && python -m pytest -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fluxum_sdk-0.2.0.tar.gz.
File metadata
- Download URL: fluxum_sdk-0.2.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab72ccbaa55132c235b79fe35f4fc8f65d5a184072ba9e783085bae93d69e335
|
|
| MD5 |
26afb3d51cc6041fb309ee9eb67170df
|
|
| BLAKE2b-256 |
d96bbe3bf6e0f9506eeddeed21fcbb275a60899a1cc5a9b1f02b4baa2294c7d9
|
Provenance
The following attestation bundles were made for fluxum_sdk-0.2.0.tar.gz:
Publisher:
sdk-publish.yml on hivellm/fluxum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxum_sdk-0.2.0.tar.gz -
Subject digest:
ab72ccbaa55132c235b79fe35f4fc8f65d5a184072ba9e783085bae93d69e335 - Sigstore transparency entry: 2256757868
- Sigstore integration time:
-
Permalink:
hivellm/fluxum@832ede01a669af82f20e2e4b917b32a8935dc43d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hivellm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@832ede01a669af82f20e2e4b917b32a8935dc43d -
Trigger Event:
release
-
Statement type:
File details
Details for the file fluxum_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fluxum_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe06dd8e5e3ba2bf92d7636ed23819df133498c3b687c8431a8979db022b465f
|
|
| MD5 |
302ba76ef8efb3752e6be8e47f1464c1
|
|
| BLAKE2b-256 |
b9ca696416a0947b857b77f0ef5960945ea0d8e396549b424a631933268f78ba
|
Provenance
The following attestation bundles were made for fluxum_sdk-0.2.0-py3-none-any.whl:
Publisher:
sdk-publish.yml on hivellm/fluxum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxum_sdk-0.2.0-py3-none-any.whl -
Subject digest:
fe06dd8e5e3ba2bf92d7636ed23819df133498c3b687c8431a8979db022b465f - Sigstore transparency entry: 2256757875
- Sigstore integration time:
-
Permalink:
hivellm/fluxum@832ede01a669af82f20e2e4b917b32a8935dc43d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hivellm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@832ede01a669af82f20e2e4b917b32a8935dc43d -
Trigger Event:
release
-
Statement type: