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

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.2
File Size Uploaded
weenspace_queue-0.1.2.tar.gz 13.7 kB Details

Built distribution (wheel)

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

Total release size: 32.6 kB

Release files / weenspace_queue-0.1.2.tar.gz

Download URL weenspace_queue-0.1.2.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2014c99561a47d1906a1a7aee7b0627da8b403dfe95b416d5b263c12764e65ff
BLAKE2b-256 checksum
How to use checksums
102d21385b6d80a5d0652ee69e458f420e5a7fe7cf10f029bf11b5d9ecece60b
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.2-py3-none-any.whl

Download URL weenspace_queue-0.1.2-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb70f8041dc424e034582eea8aceddecca1f4ad54ebbd894f814acb65622bcc4
BLAKE2b-256 checksum
How to use checksums
ab40713b55421b424af0f3924959c2e9a8ecffccae961fe9b454640ceefe57b5
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

This release

0.1.2 This release

2 release files

0.1.1

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