This release is a pre-release and may not be stable for production use.
felix-client for Python
Python bindings for Felix, built as a wrapper over the Rust client rather than a reimplementation of the protocol.
That distinction is the point. Reconnection, redirect-following, retry
classification and offset bookkeeping are hard to get right and expensive to
get wrong — a second implementation is a second set of subtle bugs in exactly
the places that matter. Here they exist once, in felix-client, and every
language binds to them.
pip install felix-client
Wheels ship compiled, one per platform, covering every Python from 3.9 up — so installing needs no Rust toolchain. Linux (x86-64 and arm64), macOS (Intel and Apple silicon) and Windows x86-64 are covered; anything else builds from the sdist and does need one.
Full documentation: https://docs.getfelix.dev/clients/python/
Two surfaces
Synchronous, for threads and asyncio.to_thread:
import felix
with felix.Client("127.0.0.1:5000", tenant_id="t1", token=tok, ca_file=ca) as client:
client.publish("t1", "default", "events", b"hello")
with client.subscribe("t1", "default", "events") as events:
for event in events:
print(event.payload, event.offset)
Asynchronous, which is what most Python realtime backends want:
client = await felix.AsyncClient.connect(addr, tenant_id="t1", token=tok, ca_file=ca)
async with client:
await client.publish("t1", "default", "events", b"hello")
async with await client.subscribe("t1", "default", "events") as events:
async for event in events:
print(event.payload, event.offset)
Both wrap the same client and fail over identically. The sync one blocks with the GIL released; the async one yields to your event loop.
publish returns the record's log offset once the broker has written it, and
None when it acknowledged earlier than that (ack="none", or a broker that
acks on enqueue), the stream has no log, or the broker is too old to say.
Beyond publish and subscribe
Both surfaces also cover consumer groups (group_poll and the four settles,
sent to the shard's leader by following the broker's redirect),
cache watches (watch_cache, including retained watches that hand you current
state before live changes), and multi-shard subscriptions (subscribe_sharded,
which opens one subscription per shard and merges them). Two things catch
people out, so they are worth saying here:
- Publishing without a
key=puts every record on shard 0. The key is what spreads a stream, and a multi-shard stream published without one behaves exactly like a single-shard one. - A prefix watch reads one shard. Keys sharing a prefix do not share a shard, so watching a whole multi-shard cache means one watch per shard.
Both surfaces also have atomic commits: commit(tenant_id, namespace, entity_key, [CommitOp.publish(...) or CommitOp.enqueue(...), CommitOp.put(...), CommitOp.delete(...)]) writes an event and its state changes as one record and
returns a CommitReceipt with the offset, and state_get reads the state back
with that offset as its version. A commit naming a second stream raises
NotOnOwningShardError, and one without exactly one event raises
EventCountError, before anything is sent. See
atomic commits for what atomic covers.
The clients page has the worked examples.
TLS
QUIC has no unencrypted mode, so there is always a trust decision — and deliberately no "skip verification" switch, because that is the setting that silently turns a secure deployment insecure. Either the platform trust store (the default) or an explicit CA:
felix.Client(addr, tenant_id=..., token=..., ca_file="/path/to/ca.pem")
A development broker generates a self-signed certificate at startup; set
FELIX_TLS_CERT_EXPORT=/path/ca.pem on the broker and point ca_file at it.
Building
pip install maturin
task python:develop # build and install into the active virtualenv
task python:check # fmt, clippy, build
This crate is deliberately outside the Cargo workspace — an extension module
carries pyo3/extension-module, which cannot be linked into a test binary —
so task python:check is what builds it, not task test.
Conformance
The semantics a Felix client must implement are catalogued in
crates/testing/felix-conformance/scenarios.toml, with task conformance:scenarios
to read them and task conformance:verify to check a client's results. That
catalogue — not this README — is the contract, and it is what the next
language's client is gated on.
Metadata
Release files for felix-client 0.6.0rc9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| felix_client-0.6.0rc9.tar.gz | 471.6 kB | With provenance | Details for felix_client-0.6.0rc9.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| felix_client-0.6.0rc9-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for felix_client-0.6.0rc9-cp39-abi3-win_amd64.whl |
| felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| felix_client-0.6.0rc9-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for felix_client-0.6.0rc9-cp39-abi3-macosx_11_0_arm64.whl |
| felix_client-0.6.0rc9-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for felix_client-0.6.0rc9-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 28.3 MB
Release files / felix_client-0.6.0rc9.tar.gz
| Download URL | felix_client-0.6.0rc9.tar.gz |
|---|---|
| Size | 471.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e80363582c95524fd49be38e82ffbee1b08f3ba666daf8dcfb64c3a23d64b8ae
|
|
BLAKE2b-256 checksum How to use checksums |
e6dca4c960c38f599ae044d1f9343fd2bc1e38bc1529ae2afea7033bad9edd13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logRelease files / felix_client-0.6.0rc9-cp39-abi3-win_amd64.whl
| Download URL | felix_client-0.6.0rc9-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
df7d558d89b7501a9b9d1a549f5fd828dd26177ece6253c9ed91de551d5ab935
|
|
BLAKE2b-256 checksum How to use checksums |
e6997e3177ddc6729164a41dee37dd9796da076bd82df6a0b9e30a651a676cc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logRelease files / felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e33cf103170989c89bab0e020761b35a4afa323b5e502e01457796977d665a33
|
|
BLAKE2b-256 checksum How to use checksums |
fd407cdc2c15c29a62733bbf0e6fa1e13c654727833b1fc4d8730da0b49d0a36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logRelease files / felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | felix_client-0.6.0rc9-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5c449329a357c7b5aa3a09fd9909f73fc063b23e120501f72e4ecef4a3421c8e
|
|
BLAKE2b-256 checksum How to use checksums |
e907b869b277223f230d4686e622f47b6242c7005a5c799df4604d54f61a90e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logRelease files / felix_client-0.6.0rc9-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | felix_client-0.6.0rc9-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a6e0617e8c4a9cc1b608d5e9443548ab03015cb1526990f4fdf7a612bbb9dab9
|
|
BLAKE2b-256 checksum How to use checksums |
c9c2e522795b82d702881d6258ca3903404da8644b8d5675619e67367deed19f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logRelease files / felix_client-0.6.0rc9-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | felix_client-0.6.0rc9-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3eeba55a0a8fa4544886b6f6175466925f91332d5666e52dcda968f989b8ec63
|
|
BLAKE2b-256 checksum How to use checksums |
d5ab12da93df35c5c1a5e9fe4fb9bccfd9388f6a5a706da02bf129938f22b719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 17, 2026.
Transparency logSecurity for felix-client 0.6.0rc9
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
All 6 files in this release have been uploaded with provenance metadata.
Attestation for felix_client-0.6.0rc9.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 Oct 17, 2026.
Transparency logA 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.