Skip to main content

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.

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.

Beyond publish and subscribe

Both surfaces also cover consumer groups (group_poll and the four settles), 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.

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/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.

Release files for felix-client 0.5.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 felix-client 0.5.0
File Size Uploaded
felix_client-0.5.0.tar.gz 229.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for felix-client 0.5.0
File
felix_client-0.5.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
felix_client-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
felix_client-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
felix_client-0.5.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
felix_client-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 18.7 MB

Release files / felix_client-0.5.0.tar.gz

Download URL felix_client-0.5.0.tar.gz
Size 229.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3277261df489e05e0bba4573676531a5c87b625c2335ed7f6e2eb888c3faad78
BLAKE2b-256 checksum
How to use checksums
bf606d2641c7aa65546b251b1c433e2b3506672522af3d025dcdb147785b0ec8
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 Sep 19, 2026.

Transparency log

Release files / felix_client-0.5.0-cp39-abi3-win_amd64.whl

Download URL felix_client-0.5.0-cp39-abi3-win_amd64.whl
Size 3.9 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e21912e88c971e02df5dd665cad3978bca3518bc329589cc3710c0ca97bc43f4
BLAKE2b-256 checksum
How to use checksums
24a22348f738530ec7f89f57e06a20cfd7b16e02ac9cac8dc8d2fad8df55df1c
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 Sep 19, 2026.

Transparency log

Release files / felix_client-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL felix_client-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
79283a9b3f9858ee9b16a83a0fd726595a76fb92ac83a65f9f5d0e061e36c382
BLAKE2b-256 checksum
How to use checksums
2fe8a2c5eaae00b0aa38103e7a8b302f0f139fd2711568fadd2d234f531221bb
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 Sep 19, 2026.

Transparency log

Release files / felix_client-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL felix_client-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.8 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
999df7be13c04bfbf69b9b4af3fa693b5e5aeaf0f8d455c2af92509e81fa0e19
BLAKE2b-256 checksum
How to use checksums
d2db877b78ecc35f6445e926b54097282756a0c801e74d64a5e08cb5d82b0086
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 Sep 19, 2026.

Transparency log

Release files / felix_client-0.5.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL felix_client-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
955f57c07ddd8f9f845692ac96a90de23862b4525ad8566e543f57c16f309c70
BLAKE2b-256 checksum
How to use checksums
9396ed281606801da84f1d2610d984a92de365d2d044dccb9529d1153c93afed
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 Sep 19, 2026.

Transparency log

Release files / felix_client-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL felix_client-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 3.7 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8c486b9c7eac397d42361e0cd8527cd05a0390ad4181dce5ece897bdecf2130d
BLAKE2b-256 checksum
How to use checksums
57c9d80c35c2f4a321d20250c1cb44a5b6a548eaa9fd787bcbf2c6fc4a461739
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 Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

6 release files

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