AMQP Client using the rabbitmq-c library.
Project description
- Version:
- 2.0.1-dev6
- Download:
- Code:
- Keywords:
rabbitmq, amqp, messaging, librabbitmq, rabbitmq-c, python, kombu, celery
Note: This is a (temporary) fork of librabbitmq with fixes for memory leaks included in https://github.com/celery/librabbitmq/pull/145.
Python bindings to the RabbitMQ C-library rabbitmq-c. Supported by Kombu and Celery.
Installation
Install via pip:
$ pip install librabbitmq-fork
or, install via easy_install:
$ easy_install librabbitmq-fork
Downloading and installing from source
- Download the latest version from
Then install it by doing the following,:
$ tar xvfz librabbitmq-0.0.0.tar.gz $ cd librabbitmq-0.0.0 $ python setup.py build # python setup.py install # as root
Using the development version
You can clone the repository by doing the following:
$ git clone git://github.com/celery/librabbitmq.git
Then install it by doing the following:
$ cd librabbitmq $ make install # or make develop
Examples
Using with Kombu:
>>> from kombu import Connection >>> x = Connection("librabbitmq://")
Stand-alone:
>>> from librabbitmq import Connection >>> conn = Connection(host="localhost", userid="guest", ... password="guest", virtual_host="/") >>> channel = conn.channel() >>> channel.exchange_declare(exchange, type, ...) >>> channel.queue_declare(queue, ...) >>> channel.queue_bind(queue, exchange, routing_key)
Producing
>>> channel.basic_publish(body, exchange, routing_key, ...)
Consuming
>>> def dump_message(message): ... print("Body:'%s', Properties:'%s', DeliveryInfo:'%s'" % ( ... message.body, message.properties, message.delivery_info)) ... message.ack() >>> channel.basic_consume(queue, ..., callback=dump_message) >>> while True: ... connection.drain_events()
Poll
>>> message = channel.basic_get(queue, ...) >>> if message: ... dump_message(message) ... print("Body:'%s' Properties:'%s' DeliveryInfo:'%s'" % ( ... message.body, message.properties, message.delivery_info))
Other
>>> channel.queue_unbind(queue, ...) >>> channel.close() >>> connection.close()
License
This software is licensed under the Mozilla Public License. See the LICENSE-MPL-RabbitMQ file in the top distribution directory for the full license text.
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 Distributions
Built Distributions
Hashes for librabbitmq_fork-2.0.1.dev6-py3.8-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5690adaa2a4e746e20f64531cc71c5f56d65f4073458be5fcf67f6d810c89e9 |
|
MD5 | e562cee23f19ecdd891a83ff58022f96 |
|
BLAKE2b-256 | 393c0a662e560e66da6c48f946d965eac3eac5daf350a5ca60dfb06848e3543b |
Hashes for librabbitmq_fork-2.0.1.dev6-py3.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 564221f2d5c57b60f9acc527a2eb8b11d14737a9d74ff36de5e46dde23e7ee5e |
|
MD5 | 73b9b45d1c8043f3e75551f1779018eb |
|
BLAKE2b-256 | 6b79cd0263fcedabb5ea24f81caa78a26fb29f90f7612738a7e7eedfa5f81373 |
Hashes for librabbitmq_fork-2.0.1.dev6-py3.6-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7ac742dd085c6ce17605e5e3ead806a38eed8c0398ab716548b9e1588d73a1 |
|
MD5 | 19c24f443fdd1bda51ceffbb1ce7119d |
|
BLAKE2b-256 | 0a197576d2c9f86cf2d0ebb332efca8f8495f1ef698c003bcb59b7c606139066 |
Hashes for librabbitmq_fork-2.0.1.dev6-py3.5-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 663a08fedd6129f97af29ebbf1060cf6046104b33da3227d5412a9424b86b541 |
|
MD5 | 324613f7eda793a6dd1a4ec5cfa4ae47 |
|
BLAKE2b-256 | 24f3806aa967a2938cfbf156eefee6996cd40e4bcef0e28eccae040859418caa |
Hashes for librabbitmq_fork-2.0.1.dev6-py2.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 412c87156299123e879e6e7ead04be2f8b2297318bba0b8b4338516118be9a53 |
|
MD5 | bd7713897e3e4a6f84fb41428aa2d84f |
|
BLAKE2b-256 | 9b585e4a513dc7412b3c970f513415dd054c948231252b0653e6edbbb17af79a |
Hashes for librabbitmq_fork-2.0.1.dev6-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b7f1c107bd6e72120006b30526cce22015fe6ff17fce0768846dd4f2e8d0f1 |
|
MD5 | 21e376e77ef4f9141ec950bc6175c54c |
|
BLAKE2b-256 | e5f1d8b4418a4b755e885e657bb3cefcb94d1cc3bdc3d8cdaaa5a82b3b423516 |
Hashes for librabbitmq_fork-2.0.1.dev6-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ef771b0f60dc4890954cd5bdd6d165d3722dd1aa032c9639be0a3f6b395320 |
|
MD5 | d89ef13ac319c6e9d44cb1a9cc7ccb45 |
|
BLAKE2b-256 | f35edfbb02e02c3b35e19bac9e0e594b4bbed7a0a42ea3e7af78b3416371f0e8 |
Hashes for librabbitmq_fork-2.0.1.dev6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff9d53b06d0277079121d41a0bf4632468f0479389683e902868c4df53f25858 |
|
MD5 | 778974bf1b85c2913cd95da8df937620 |
|
BLAKE2b-256 | 8cd439f52951603115166ddeee5491cb2831c782f5cbc8e7d6194ec47fc20029 |
Hashes for librabbitmq_fork-2.0.1.dev6-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b2234978eceb845a46d5d2e1c07856280640213bfda5d5f743ea372c29fd639 |
|
MD5 | e892a2631602a3bb2b46eb373a38a5b8 |
|
BLAKE2b-256 | 3b7b71e9e1f8e28bf120879dbf79cb0799c373eeebdbb88bc27e9f1912814f58 |
Hashes for librabbitmq_fork-2.0.1.dev6-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9cddc259765ce52c28b89851b9939eb0676ca8f5aa2f4ca589d3acbcbafb5f8 |
|
MD5 | 3f4db150046da8b9f1b610752b3ccd62 |
|
BLAKE2b-256 | 570eab47148ced8ca172c00426fdf9ec5c2abfc485cb4f1c72ac93efbbb49eb0 |
Hashes for librabbitmq_fork-2.0.1.dev6-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e889c0ec29f79cb4a12052ae9079d956a02106973f404fd47ee7e201432dfffe |
|
MD5 | 92c79a758bcfa4e419f8e399f38bb4f9 |
|
BLAKE2b-256 | 9bd55e6f538d18da8a14fcef28a283e9294d0a9269bfabd97588b8506f27bae1 |