A type-safe, sync/async Python messaging framework.
Project description
Protobunny
Note: The project is in early development.
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 any message broker, including Redis and MQTT.
It simplifies messaging for asynchronous tasks by providing:
- A clean “message-first” API
- Python class generation from Protobuf messages using betterproto
- Connections facilities for backends
- Message publishing/subscribing with typed topics
- Support also “task-like” queues (shared/competing consumers) vs. broadcast subscriptions
- Generate and consume
Resultmessages (success/failure + optional return payload) - Transparent messages serialization/deserialization
- Support async and sync contexts
- Transparently serialize "JSON-like" payload fields (numpy-friendly)
Requirements
- Python >= 3.10, < 3.14
- Backend message broker (e.g. RabbitMQ)
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
Usage
See the Quick example on GitHub for installation and quick start guide.
Full docs are available at https://am-flow.github.io/protobunny/.
Development
Run tests
make test
Integration tests (RabbitMQ required)
Integration tests expect RabbitMQ to be running (for example via Docker Compose in this repo):
docker compose up -d
make integration-test
Future work
- Support grcp
- Support for RabbitMQ certificates (through
pika) - More backends:
- NATS
- Kafka
- Cloud providers (AWS SQS/SNS)
License
MIT
Copyright (c) 2026 AM-Flow b.v.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file protobunny-0.1.2a1.tar.gz.
File metadata
- Download URL: protobunny-0.1.2a1.tar.gz
- Upload date:
- Size: 76.4 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
131264a9e52e69d7f3bed12f9309498a5f9493cbd9f9adfb41dcbeee2d470e6e
|
|
| MD5 |
186ddf5f74ec02a9f048265f129e63e8
|
|
| BLAKE2b-256 |
f20369b91dd5d1d05f8e6b234bc58a10799963e8d84b7178d98a07352f8911f3
|
File details
Details for the file protobunny-0.1.2a1-py3-none-any.whl.
File metadata
- Download URL: protobunny-0.1.2a1-py3-none-any.whl
- Upload date:
- Size: 103.4 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5004da4c4756707c7d679669cc2218b6d48b95195ecdf082ee227d2228dc6732
|
|
| MD5 |
ba0bb6c2aa4f954778c5e963d578a02b
|
|
| BLAKE2b-256 |
7a53f2d502041cb5eddaf5970aa807d4c77f02398237e4be0b6f3d41913fe100
|