An asynchronous RabbitMQ client for Python
Project description
Fast Rabbit: Asynchronous RabbitMQ Client for Python
Fast Rabbit is an advanced, asynchronous RabbitMQ client designed to simplify the integration and management of RabbitMQ interactions within your Python applications. Leveraging the power of asyncio
and aio_pika
, Fast Rabbit provides a robust framework for message publishing and consuming, with an emphasis on simplicity, efficiency, and reliability.
Features
- Asynchronous API: Built on top of
asyncio
, allowing for non-blocking message operations. - Easy Consumer Registration: Utilize decorators to effortlessly register message consumer coroutines.
- Automatic Connection Management: Handles connection and channel lifecycle, including reconnections.
- Flexible Routing: Incorporate a router similar to FastAPI for organised message handling based on queue names.
Installation
Install Fast Rabbit using pip:
pip install fast_rabbit
Quick Start
Publishing Messages
from fast_rabbit import FastRabbitEngine
engine = FastRabbitEngine(amqp_url="amqp://user:password@localhost/")
await engine.publish("queue_name", "Hello, RabbitMQ!")
Consuming Messages
Define your message handlers and register them as consumers for specific queues:
from fast_rabbit import FastRabbitEngine, FastRabbitRouter
engine = FastRabbitEngine(amqp_url="amqp://user:password@localhost/")
router = FastRabbitRouter()
@router.route("queue_name")
async def handle_message(body: str):
print(f"Received message: {body}")
engine.include_subscriptions(router)
await engine.run()
Documentation
For more detailed documentation, including API reference and advanced usage, please refer to the Fast Rabbit Documentation.
Contributing
Contributions are welcome! Please read our Contributing Guide for details on how to submit pull requests, report issues, and suggest improvements.
License
Fast Rabbit is released under the MIT License. See the LICENSE file for more details.
Fast Rabbit aims to provide a high-quality, easy-to-use asynchronous RabbitMQ client for the Python community. Whether you're building microservices, distributed systems, or just need a reliable way to handle message queues, Fast Rabbit is designed to meet your needs with minimal overhead and maximum efficiency.
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
Hashes for fast_rabbit-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050db44b2e3a71d303cffbb339547ec34058d6277c3f996a3bff1f506a2162d2 |
|
MD5 | 4948712702f094dbd8a0da5d2e3931c9 |
|
BLAKE2b-256 | 359083e774ffb592f0aa277e05dc221daa58c4a3633eaba4c0c8648a4865cd31 |