Protobunny
Protobunny is the open-source evolution of AM-Flow's internal messaging library. While the original was purpose-built for RabbitMQ, this version has been completely re-engineered to provide a unified, type-safe interface for several message brokers, including Redis, NATS, and MQTT.
It simplifies messaging for asynchronous message handling by providing:
- A clean “message-first” API by using your protobuf definitions
- Message publishing/subscribing with typed topics
- Supports "task-like" queues (shared/competing consumers) vs. broadcast subscriptions
- Generate and consume
Resultmessages (success/failure + optional return payload) - Transparent messages serialization/deserialization
- Transparently serialize/deserialize custom "JSON-like" payload fields (numpy-friendly)
- Support async and sync contexts
Supported backends in the current version are:
- RabbitMQ
- Redis
- NATS
- Mosquitto
- Python "backend" with Queue/asyncio.Queue for local in-processing testing
Minimal requirements
- Python >= 3.10 <=3.13
- Core Dependencies: betterproto 2.0.0b7, grpcio-tools>=1.62.0
- Backend Drivers (Optional based on your usage):
- NATS: nats-py (Requires NATS Server v2.10+ for full JetStream support).
- Redis: redis (Requires Redis Server v6.2+ for Stream support).
- RabbitMQ: aio-pika
- Mosquitto: aiomqtt
Project scope
Protobunny is designed for teams who use messaging to coordinate work between microservices or different python processes and want:
- A small API surface, easy to learn and use, both async and sync
- Typed messaging with protobuf messages as payloads
- Supports various backends by simple configuration: RabbitMQ, Redis, Mosquitto, local in-process queues
- Consistent topic naming and routing
- Builtin task queue semantics and result messages
- Transparent handling of JSON-like payload fields as plain dictionaries/lists
- Optional validation of required fields
- Builtin logging service
Why Protobunny?
While there are many messaging libraries for Python, Protobunny is built specifically for teams that treat Protobuf as the single source of truth.
- Type-Safe by Design: Built natively for
protobuf/betterproto. - Semantic Routing: Zero-config infrastructure. Protobunny uses your Protobuf package structure to decide if a message should be broadcast (Pub/Sub) or queued (Producer/Consumer).
- Backend Agnostic: You can choose between RabbitMQ, Redis, NATS, and Mosquitto. Python for local testing.
- Sync & Async: Support for both
asyncioand traditional synchronous workloads. - Battle-Tested: Derived from internal libraries used in production systems at AM-Flow.
Feature Comparison with some existing libraries
| Feature | Protobunny | FastStream | Celery |
|---|---|---|---|
| Multi-Backend | ✅ Yes | ✅ Yes | ⚠️ (Tasks only) |
| Typed Protobufs | ✅ Native (Betterproto) | ⚠️ Manual/Pydantic | ❌ No |
| Sync + Async | ✅ Yes | ✅ Yes | ❌ Sync focus |
| Pattern Routing | ✅ Auto (tasks pkg) |
❌ Manual Config | ✅ Fixed |
| Framework Agnostic | ✅ Yes | ✅ Yes | ❌ Heavyweight |
Usage
See the Quick example on GitHub or on the docs site.
Documentation home page: https://am-flow.github.io/protobunny/.
Roadmap
- Core Support: Redis, RabbitMQ, Mosquitto.
- Semantic Patterns: Automatic
taskspackage routing. - Arbistrary dictionary parsing: Transparently parse JSON-like fields as dictionaries/lists by using protobunny JsonContent type.
- Result workflow: Subscribe to results topics and receive protobunny
Resultmessages produced by your callbacks. - Cloud-Native: NATS (Core & JetStream) integration.
- Cloud Providers: AWS (SQS/SNS) and GCP Pub/Sub.
- OpenTelemetry Integration (Planned)
- More backends: Kafka support.
- gRPC Direct Call support
License
MIT
Copyright (c) 2026 AM-Flow b.v.
Metadata
Release files for protobunny 0.1.2
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 |
|---|---|---|---|---|
| protobunny-0.1.2.tar.gz | 84.6 kB | Without provenance | Details for protobunny-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| protobunny-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for protobunny-0.1.2-py3-none-any.whl |
Total release size: 199.7 kB
Release files / protobunny-0.1.2.tar.gz
| Download URL | protobunny-0.1.2.tar.gz |
|---|---|
| Size | 84.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9f1fb9d687f6cac09ed18592fa3483855f0877511b96f77169016b2dd00fb45
|
|
BLAKE2b-256 checksum How to use checksums |
3a00943a8f93817e2114e0349194ac6169c7fdb2ce0da5ff037967b438469a72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / protobunny-0.1.2-py3-none-any.whl
| Download URL | protobunny-0.1.2-py3-none-any.whl |
|---|---|
| Size | 115.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba9a9c1aa84f430b4aca70b4b22f987fe005ed63ff579396ce199cd2eb19fa94
|
|
BLAKE2b-256 checksum How to use checksums |
f25b35608035c928e26cd8b85d2759ca946d9b98c1d1175e4b15fca3d5f8f11c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for protobunny 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.