pyrabbit
raw JSON → 1.1.0 verified Mon Apr 27 auth: no python maintenance
A Pythonic interface to the RabbitMQ Management HTTP API. Version 1.1.0, low release cadence (last release 2013).
pip install pyrabbit Common errors
error ImportError: cannot import name 'Client' from 'pyrabbit' ↓
cause Client is in the api submodule, not in __init__.py.
fix
Use 'from pyrabbit.api import Client' instead of 'from pyrabbit import Client'.
error pyrabbit.api.Client object has no attribute 'is_alive' ↓
cause Method name might be incorrect in older versions or typo.
fix
Check available methods: get_nodes(), get_queues(), etc. Use client.is_alive() only if available; otherwise use client.aliveness_test('/').
error requests.exceptions.ConnectionError: HTTPConnectionPool: Failed to establish a new connection: [Errno 61] Connection refused ↓
cause Wrong port (using 5672 instead of 15672) or RabbitMQ Management plugin not enabled.
fix
Enable management plugin: rabbitmq-plugins enable rabbitmq_management. Use port 15672.
Warnings
deprecated pyrabbit is no longer actively maintained. Last release in 2013. Consider using aio-pika or pika with HTTP client for management API. ↓
fix Switch to a library with active maintenance and async support.
gotcha Client object is not instantiated correctly: use pyrabbit.api.Client, not pyrabbit.Client. ↓
fix from pyrabbit.api import Client
gotcha Default port for RabbitMQ Management API is 15672, not 5672 (AMQP port). ↓
fix Use http://host:15672 as the base URL.
Imports
- Client wrong
from pyrabbit import Clientcorrectfrom pyrabbit.api import Client
Quickstart
from pyrabbit.api import Client
client = Client('http://localhost:15672', 'guest', 'guest')
alive = client.is_alive()
print(alive)