Skip to main content

WeenSpace RabbitMQ Client

PyPI version Python 3.13+ License

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]".

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 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weenspace-queue 0.1.1
File Size Uploaded
weenspace_queue-0.1.1.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for weenspace-queue 0.1.1
File Interpreter ABI Platform
weenspace_queue-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / weenspace_queue-0.1.1.tar.gz

Download URL weenspace_queue-0.1.1.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b2a2fecb6019a937ac8737a27b117cb6d380555eb39e3b78fd3ef2b5b4edaec0
BLAKE2b-256 checksum
How to use checksums
af9379dcaa6c87f0397f9c5983d296eaa231d9d91a08d1668ad3628f65ed0c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Darwin/25.6.0

Release files / weenspace_queue-0.1.1-py3-none-any.whl

Download URL weenspace_queue-0.1.1-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e65338bb21697bf1ed1f3ed6f1384e43ef35ce4c670efe9c050a3ab247472f7
BLAKE2b-256 checksum
How to use checksums
dd1a11aa9e9368d1ffda979226d624b302e698c079b23e4c0b5c0576bf8020a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Darwin/25.6.0

Release history Release notifications | RSS feed

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page