Registry / devops / pyrabbit2

pyrabbit2

JSON →
library1.0.7pypypi✓ verified 87d ago

A Pythonic interface to the RabbitMQ Management HTTP API. Version 1.0.7 wraps the RabbitMQ management plugin's REST API for cluster management, queue introspection, and user administration. Maintained slowly; no breaking changes in the 1.x line.

pip install pyrabbit2
INSTALL
IMPORT
SIG · PYRABBIT2
P
pyrabbit2
devopspythonv1.0.7
Install
2.1s avg
Import
647ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.680s · 21MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.614s · 22MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from pyrabbit2.api import Client
from pyrabbit import Client
pyrabbit (without '2') is a different, older library; pyrabbit2 requires explicit 'api' submodule.

Connect to RabbitMQ management plugin and list queues.

from pyrabbit2.api import Client import os client = Client( host=os.environ.get('RABBIT_HOST', 'localhost'), port=os.environ.get('RABBIT_PORT', 15672), user=os.environ.get('RABBIT_USER', 'guest'), password=os.environ.get('RABBIT_PASS', 'guest') ) queues = client.get_queues() print(queues)
Debug
Known issues
breakingpyrabbit2 is NOT drop-in compatible with the original pyrabbit. API module structure and method signatures differ (e.g., `get_queues()` vs `get_queues()` similar but parameter names changed).
fix
Use `from pyrabbit2.api import Client` and consult pyrabbit2 docs for method arguments.
affects: all
gotchaDefault port is 15672 (management plugin HTTP port), not 5672 (AMQP). Common mistake: using AMQP port, causing connection timeout.
fix
Ensure RABBIT_PORT is set to the management plugin port (usually 15672).
affects: all
gotchaThe library provides only synchronous HTTP calls; no async support. Long-running operations may block.
fix
Use threading/asyncio wrapper or consider aio-pika for async AMQP management.
affects: all
Errors
Common errors & fixes
AttributeError: module 'pyrabbit2' has no attribute 'Client'
Incorrect import: trying `from pyrabbit2 import Client` instead of `from pyrabbit2.api import Client`.
fix
Use `from pyrabbit2.api import Client`.
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5672): Max retries exceeded
Using default AMQP port (5672) for HTTP management API; should be 15672.
fix
Pass port=15672 (or correct management port) to Client.
Upgrade
Version history
1.0.7latest on PyPI · released Jan 24, 2019
Audit
Dependencies
requestsrequiredHTTP client for RabbitMQ management API
Agent activity
14 hits · last 30 days
node
12
Resources
pyrabbit2 — pip install pyrabbit2 · libregistry