Simple Python client library for RabbitMQ
Project description
pyrabbitmq
Scenarios
The library is not proposed with same functions as 'pika'. It helps to initialize a rabbitmq instance via its native API in following cases:
- Many rabbitmq instances to be kicked via scripts but not its management UI, or
- For some reason you need reset rabbitmq instances more often.
Good Luck.
Usage
from pyrabbitmq import connection
# rmq = connection.Instance(
# rabbitmq_host="127.0.0.1",
# rabbitmq_port="5673",
# rabbitmq_admin_user="guest",
# rabbitmq_admin_password="guest",
# rabbitmq_tls_enabled=False
# )
# It reads the rabbitmq os $env values.
# If no $env variables find, default values used..
rmq = connection.Instance()
# Virtual Hosts
v = rmq.VirtualHost
v.create('a-vhost-name')
v.delete('a-vhost-name')
# Users
u = rmq.User
u.create('test-user','test-user-password')
u.delete('test-user')
# Queues
q = rmq.Queue
q.create(vhost='vhost01', queue='queue01')
q.delete(vhost='vhost01', queue='queue01')
# Bindings
b = rmq.Binding
b.create(vhost='vhost01',exchange='exchange01', queue='queue01')
b.delete(vhost='vhost01',exchange='exchange01',queue='queue01',routing_key='routing_key-queue01')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrabbitmq-0.0.5.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for pyrabbitmq-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d9b146c22860abf6b59926aaa5c04ecef1a81d00880eea5b7124402175f5560 |
|
MD5 | ea02cd7b2edf0363c66ab8138760a3da |
|
BLAKE2b-256 | 105ecbd0e1aac480048dd79915c66762020fb73353cb1748a46d87ee32bca500 |