Skip to content
Pyrula
Pre-release: the packages are not on PyPI yet, so pip install does not resolve. Build from source to try it today.

Kafka

pyrula.kafka is a Kafka client backed by Rust. The API tracks confluent-kafka, so existing knowledge carries over. Two things differ on purpose: every networked call takes an explicit timeout, and there’s a native record path for throughput.

from pyrula import kafka

On a 12-partition, 100k-record benchmark it runs ahead of confluent-kafka on every produce path (roughly 1.1x to 1.4x) and well ahead on Avro, at parity on plain consume, and an order of magnitude past the pure-Python clients. The Rust core does the work a Python produce/consume loop pays for per record. Full numbers and method on the Benchmarks page.

Wheels ship for Linux glibc and musl on x86_64 and aarch64, macOS on Apple silicon and Intel, and Windows x64 and arm64, so pip install pyrula-kafka is the whole install on Alpine and ARM too. The package depends on pyrula and nothing else; AWS MSK IAM auth is an optional extra.

Python defaults, the type stubs, and the Rust fallbacks are kept in sync, so what the docs say matches what the runtime does.