AMQP Client using the rabbitmq-c library.
Project description
- Version:
- 2.0.1-dev7
- 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.dev7-py3.8-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfc87904972cb61bf3487cd24139981cb2318c601290345f1e1e381377f07bf3 |
|
MD5 | c8c9c76c6c9cf8df3d0104d03b7e8dfc |
|
BLAKE2b-256 | 0ce4134523e6cd45e63e6452505d5cccc66da14115f6668fb5f7fb5369c0a9ca |
Hashes for librabbitmq_fork-2.0.1.dev7-py3.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdba88af5109d8b9c6fbb2706606b1701695510c8257ffde6f4dcd6e8649149e |
|
MD5 | 9c8738ddd2e1a99f49c4a26db6a6754e |
|
BLAKE2b-256 | 72f7e2d31a5beb8274bf2f19ed3707cc2d68be069fb3b95cd52d242f4906a640 |
Hashes for librabbitmq_fork-2.0.1.dev7-py3.6-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca8c1d5404f1c5ebddf63ec97f688f2979d64994b1a2043f06b495311589cf3a |
|
MD5 | 11d52892ed2722df567ab35f75df54c3 |
|
BLAKE2b-256 | 49b31547ee86ea37e91cf5d8815705fff19d9c762a82cdbbb763e6030e1ff15d |
Hashes for librabbitmq_fork-2.0.1.dev7-py3.5-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4a35da6effb18d171d45cda752e936b64c6e3082b0db510658d3c08fd3eb97d |
|
MD5 | b9ae6cc8357ca8c612d8f842e31879ad |
|
BLAKE2b-256 | a626a7d0becbfa540edbe463710c31e385d4968db4c5c6beae1b23e3f43412c2 |
Hashes for librabbitmq_fork-2.0.1.dev7-py2.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631ab72fb345524c6148c3ded8224380bb5f8a95801ce2fc3076c1136ebba2fe |
|
MD5 | 3e0a544b8465a7d1cdae022fb9a62f44 |
|
BLAKE2b-256 | 42e52c75c73612650a93b5ddf4e40ee56438ab02a8fd06d77b80c54105a25e46 |
Hashes for librabbitmq_fork-2.0.1.dev7-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d23c61dccdfe32cadaa1eb64ce9c2872b575fd2f5f42578f4c7d0cb8ae7f5aec |
|
MD5 | d7ab0d52f827e377d1721dd44831304c |
|
BLAKE2b-256 | 9270d4264d2960c2342fd9619799af7a234527fedbd141cfe1e2e5e7cae9c403 |
Hashes for librabbitmq_fork-2.0.1.dev7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f684b9f2e2a5c52a4b2152265c6b3b3b577304d1d98bff1a44f11242689113b0 |
|
MD5 | ce8c4e6ec17b0839503695e535d3411c |
|
BLAKE2b-256 | a5a9e5060ad0bd49c77dbd1af075d9b5ad54a507d36618ceb66c40def7c51428 |
Hashes for librabbitmq_fork-2.0.1.dev7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 380af3a5ed4d3f82dd615548a0d2a3deecc2cdf68b5601892326d7e42cea74c0 |
|
MD5 | 8343d7dc91ff06d476b427976e4312d0 |
|
BLAKE2b-256 | 5c6bb795a75ec3dd7040faa8f04add84da69ba26254e9f665c4fa0998fec5f3a |
Hashes for librabbitmq_fork-2.0.1.dev7-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83887e23ea7bb13812e00e875ab87ddaa938aa3083b9d528640db7092cb31246 |
|
MD5 | 2d15870736b8e99d033f3d1a53558289 |
|
BLAKE2b-256 | b062cc3a2c6ab0d95076f57c5becbbd00ff2ad7f54f3c42da5398732335f356f |
Hashes for librabbitmq_fork-2.0.1.dev7-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e51e810423ac774bc2c122bfaa1c39c0a23d5a775f7c1d078078e867c3fe5a71 |
|
MD5 | dbe339d9a0abfd544fc75d65a348069d |
|
BLAKE2b-256 | 2b6e09b69196be059b1fa7b66638da6358088b023b67e4e8c6f23c03bae29b13 |
Hashes for librabbitmq_fork-2.0.1.dev7-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060d87d364225f6985c01e289a6404587ffc09254450ac071da4e2e40709505d |
|
MD5 | 1dc8dcc09687cdd886029543f390f5fe |
|
BLAKE2b-256 | 4e5c23fb0fb2d26716e2fcfa5243969dc4938a7d178d9c6590e8444799928ab9 |