WeenSpace RabbitMQ Client
A powerful Python RabbitMQ client for AMQP 1.0 protocol, designed for event-driven microservices architecture.
✨ Features
- 🔐 Authentication: OAuth2, TLS/SSL, Basic Auth
- 📬 Queue Types: Classic, Quorum, Stream queues
- ☠️ Dead Letter Queues: Built-in DLQ support with configurable strategies
- ⚡ Priority Queues: Native priority queue support
- 🔄 Auto Reconnection: Configurable recovery with exponential backoff
- 🔀 All Exchange Types: Direct, Fanout, Topic, Headers
- 🚀 Async Support: Native asyncio integration
- 📊 Streams: RabbitMQ Streams with filtering support
📦 Installation
pip install weenspace-queue
🚀 Quick Start
Unified Publisher/Consumer
from weenspace_queue import Message, QueueClient, QueueSpecification
client = QueueClient("RABBITMQ", uri="amqp://guest:guest@localhost:5672/")
queue = client.declare_queue(QueueSpecification(name="my-queue"))
client.publish(queue, Message(body=b"Hello WeenSpace!"))
def on_message(message: Message) -> None:
print(f"Received: {message.body}")
message.accept()
client.consume(queue, handler=on_message, prefetch=10)
Install AWS support with pip install "weenspace-queue[aws]".
AWS SQS and SNS
See examples/aws/sqs.py for direct SQS publishing and examples/aws/sns.py for an SNS-to-SQS workflow with routing-key filters.
Async Support
import asyncio
from weenspace_queue import AsyncQueueClient, Message, QueueSpecification
async def main():
async with AsyncQueueClient("RABBITMQ", uri="amqp://localhost:5672/") as client:
queue = await client.declare_queue(QueueSpecification(name="my-queue"))
await client.publish(queue, Message(body=b"Async message!"))
asyncio.run(main())
RabbitMQ authentication
from weenspace_queue import QueueClient
client = QueueClient(
"RABBITMQ",
uri="amqp://localhost:5672/",
oauth2_options=your_oauth_options
)
TLS/SSL Connection
from weenspace_queue import QueueClient
client = QueueClient(
"RABBITMQ",
uri="amqps://localhost:5671/",
ssl_context=your_ssl_context
)
📚 Documentation
See the examples folder for more detailed usage examples.
🔄 Migration from python-rabbitmq
# Old (python-rabbitmq)
# from python_rabbitmq import RabbitMQ
# New (weenspace-queue)
from weenspace_queue import QueueClient
📋 Requirements
- Python 3.13+
- RabbitMQ 4.x with AMQP 1.0 plugin enabled
📄 License
MIT License - Based on the official RabbitMQ AMQP Python Client
🙏 Credits
This library is based on the official RabbitMQ AMQP 1.0 Python client by the RabbitMQ team.
Metadata
Release files for weenspace-queue 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weenspace_queue-0.1.4.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weenspace_queue-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / weenspace_queue-0.1.4.tar.gz
| Download URL | weenspace_queue-0.1.4.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77b1669627aeb3c1b9310906a5e30dd850f5f0750b6a266c36cb155bc3eb57d6
|
|
BLAKE2b-256 checksum How to use checksums |
91503f98f17bd85a440df0fa0fe14a51c63d568cfec887722a33e11ca53d9bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.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":true}
|
Release files / weenspace_queue-0.1.4-py3-none-any.whl
| Download URL | weenspace_queue-0.1.4-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b8bb157c8908d240e921b8abfa55ce513573cce20f9153ae51287b2210d4a66
|
|
BLAKE2b-256 checksum How to use checksums |
2c43846ab641389f2e77855623bbfc18cfe582a853d7f40dc92818afac5a8349
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.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":true}
|