Skip to main content

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


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 details)

Uploaded Source

Built Distribution

pyrabbitmq-0.0.5-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file pyrabbitmq-0.0.5.tar.gz.

File metadata

  • Download URL: pyrabbitmq-0.0.5.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pyrabbitmq-0.0.5.tar.gz
Algorithm Hash digest
SHA256 87ddc0ef02250359c21684acbe6e164fc3baa4c2c0aa6cac6de8184ac31b083d
MD5 2acae819fa59ed2ac1db08e1c22e5064
BLAKE2b-256 7692615c848b93d76548f2c3ad59e2f42f7452f3e8c04fc99f1edd3e50ec1ee8

See more details on using hashes here.

File details

Details for the file pyrabbitmq-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pyrabbitmq-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pyrabbitmq-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6d9b146c22860abf6b59926aaa5c04ecef1a81d00880eea5b7124402175f5560
MD5 ea02cd7b2edf0363c66ab8138760a3da
BLAKE2b-256 105ecbd0e1aac480048dd79915c66762020fb73353cb1748a46d87ee32bca500

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page