AMQP Client using the rabbitmq-c library.
Project description
- Version:
- 2.0.2-dev1
- 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.2.dev1-py3.10-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4fefbe5eb59039c818979f1549f8e95533fb6b3d2951aebf4ff55f2043bf052 |
|
MD5 | 70f1499c48efb9a5fc19290651d57a2c |
|
BLAKE2b-256 | cf9f5209ed5b79a8dd13c28715864214bf02f612428509ff14a8c5696fb87aa0 |
Hashes for librabbitmq_fork-2.0.2.dev1-py3.9-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | afcd8c72547b72c5cc64426cfa663c4298a2012df3be1f8abf95d8ee89afd8d8 |
|
MD5 | b3dc1cb9521d2fa9c0d5ba242422d67a |
|
BLAKE2b-256 | 4529b60d50937ba52917a868a1a1625b36632672f519cc147b5cc5ac94474e8c |
Hashes for librabbitmq_fork-2.0.2.dev1-py3.8-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c326bc93855293e4333ee206e5dd40e0fa8c30395aa62518b6d0a1685754ef5 |
|
MD5 | 5cbbaf9c95d4b41696d421858b467f32 |
|
BLAKE2b-256 | 6b40e93a310bad72908d133ff0a7184476c3d154fd949721a711a4e3f77a92c6 |
Hashes for librabbitmq_fork-2.0.2.dev1-py3.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 281e19ec541cb3fb158b727be932117fc3d75baac4bbe76b9227fec0f894d1bc |
|
MD5 | 7c9f74858dd22e8f80b25682ba41825a |
|
BLAKE2b-256 | a9aef50446a0e3820e108023971f7ed299cee64538fcdf0d301e88f22180d26d |
Hashes for librabbitmq_fork-2.0.2.dev1-py3.6-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d93202e1c4a9e4790db213b05446485a6827ec96e0bb491746a1f7b5f973676 |
|
MD5 | ccce3516d6b55b66fad6067773ca684c |
|
BLAKE2b-256 | 81c81a6b144944c38bba0689cc2f5d23416fb364e4e5faf052cbafc8bef8f84b |
Hashes for librabbitmq_fork-2.0.2.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d89c37fb4be656c085ffea0e4e20794306bd27364ba3addc5662a7fee4c15e1e |
|
MD5 | 2ef1f9f8a956d5fb9186cc8cfe54c479 |
|
BLAKE2b-256 | 283f02520febeed8cb67b9e79650d92b36d52ad11b5a55e2dce87a6080c41103 |
Hashes for librabbitmq_fork-2.0.2.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c2ba7503e9255772f02e73b583f3d102cc61807524d91f49412437402a4775 |
|
MD5 | 8ad99aa6415f8914bb01d0201ba5d7ab |
|
BLAKE2b-256 | 6aec3f7bbf2fc6fe662da28cf2ca4746969dc92ed0c6911fff0563d23037a6bc |
Hashes for librabbitmq_fork-2.0.2.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3315cfa1f5481208b6561adc204969f08429aac1ccbf31551224aa02a1435938 |
|
MD5 | af42de3d2a6e5f32e7ad2cfcc79b1827 |
|
BLAKE2b-256 | e3b8f5b9f206436ae5ace1267a3701e3048720f41137639af4e63a2836f94cfb |
Hashes for librabbitmq_fork-2.0.2.dev1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fbecc9ebd4c86734292b9f5ac2ce644b3c2f9b8d6e50ab684d341faad45f907 |
|
MD5 | bcf9b60c45ab2bc0f7980faf6f9082d2 |
|
BLAKE2b-256 | c19a1ac246f6024a52d079a59c93186995dc413c439ae7798044372c5832389a |
Hashes for librabbitmq_fork-2.0.2.dev1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c49b373fe7c2abc3f1757c01159be51198dcb033d533e2716dd56ff002621c8e |
|
MD5 | ad65552a8e826b02923f810a47a9c41d |
|
BLAKE2b-256 | 97707a9973c3db9bc2e33e1b5120c54c8052a7bca03ba01f853fc5f66dd15332 |