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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.680s · 21MB
glibcpy 3.10–3.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)
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`.
fixUse `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.
fixPass 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