Installation¶
Prerequisites¶
Turbine consumes from and produces to Kafka. You need a broker reachable from your dev machine before installing Turbine — either:
- A local Redpanda or Kafka instance (Redpanda is officially tested; the project ships a
docker/dev/docker-compose.yml). - Any reachable Kafka-compatible broker.
For stateful workloads with durable checkpoints you'll also want an object store later (S3, MinIO, GCS). For your first run, the local filesystem default is fine.
TODO
Document a turn-key local stack: docker compose up for Redpanda and MinIO, plus the matching Turbine(brokers=…, checkpoint_url=…) boilerplate. Reference compose file: docker/dev/docker-compose.yml.
Install¶
pip install turbine
# or, for development:
maturin develop --features python,state-rocksdb,checkpoint,cluster,cluster-raft
Type-checking note:
pyarrowdoes not ship type stubs. If you import it in your handlers and use a type checker (mypy, pyright, ty…), addpyarrow-stubsto your dev dependencies to silence "missing library stubs or py.typed marker" warnings:
Smoke Test¶
A 10-line app that reads from a topic and prints batch sizes — enough to confirm Turbine is wired up and the broker is reachable.
-
Create a test topic and push a few messages (Redpanda CLI shown):
-
Save the snippet below as
smoke.pyand run it:
You should see Got 3 messages after a moment. If you do, Turbine is installed correctly and the broker is reachable. Continue to Quick Start.