AMQP Client using the rabbitmq-c library.
Project description
- Version:
- 2.0.1-dev4
- 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.dev4-py3.8-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52aac9a553210d4f759b9a6306800fbd791e5b98494ef349e43eaf4c8f58758 |
|
MD5 | 359e33cacbd17f3a681e6e5e24840715 |
|
BLAKE2b-256 | 0f1e30d6fbae90ac3216c50c4eacb591e91b3bafddf2b4289e4f7fea5c123673 |
Hashes for librabbitmq_fork-2.0.1.dev4-py3.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4110062e111542a5a161b83ae34797a22713a361fe75489cb735dcc969d9b87 |
|
MD5 | 0b7b92cd6618a1c32860d7cc7ef6ff20 |
|
BLAKE2b-256 | 2f8cdad757c099d67026e68efba07386cdce2883f06a18b0196cf4acf99f2045 |
Hashes for librabbitmq_fork-2.0.1.dev4-py3.6-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4411142f7cdb91fbf5166dcbe701e40c6aee1df4e2285ccc49d9548a564369c9 |
|
MD5 | b0353e56737541b436d0df26099d955f |
|
BLAKE2b-256 | 7439db540119ef93788907fd61433f88afed3d3ac5b2d8a597efccbb66436b86 |
Hashes for librabbitmq_fork-2.0.1.dev4-py3.5-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ed13159388d5439a36366e60ef4d5f6eef19a3948cc86e9e3b7a2170fac7e5d |
|
MD5 | 5a8435f1d21911a5972d0b229ad18660 |
|
BLAKE2b-256 | c477213ac519aa862b3a65d3186104a1f3200ddf1c6fa7892416218f3376d4f5 |
Hashes for librabbitmq_fork-2.0.1.dev4-py2.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95bd750456eea89c739ff38a4babc3383a8ec62869612ccabe0f4eed2eb980de |
|
MD5 | b7290518b7db774104d927f3eab2f040 |
|
BLAKE2b-256 | 21ecb69c4c5ac2572c1977806a2d40253d90ca9729d9dab20b5d93c1a7b0f335 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c41480d0357959104fa28d5f5c6ea919aeb6a264d218e41a43ad65049afb1cf7 |
|
MD5 | 336bab04e3ea56607e519ae043000585 |
|
BLAKE2b-256 | fd63949beff6e36234c0f7dd46f2d764a132d623f0385ab895a272e9d3ff26d8 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b360248bb98c9065adf7d9128dcbfa0e79c54fd828d06521f0e134921b7f6e6a |
|
MD5 | 14bf3e94faaa23ab0ae82fbdf7766302 |
|
BLAKE2b-256 | 3bb031e59ac141022fea2dc51d9acb3a56d9bdd02e83b04fde77524a6f5f40d6 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 039adf62b166a005c26d1416ec91e2fc7223aeb5f5d5bc63080bb6d0d14b3710 |
|
MD5 | 64e64c187b6266649f77d76a761a9405 |
|
BLAKE2b-256 | c91afee96e4c859459ace4f542fd338fb800160da0778f33653b0ee08b21d451 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a12902608d993073489938de6b05021f031b28167e3616dc640eba323a3e00c |
|
MD5 | 1ed1bf09015019dc8572850e15d2891b |
|
BLAKE2b-256 | f288d68c1ca532b55b22de47191300192c233f82d7a12718372cbd3565355504 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72b3c12b3b7f29050712dd472178c92232cee019756d00275213ca7572bc05d9 |
|
MD5 | 36e7dc8d09d0856801ab3b5043c28db7 |
|
BLAKE2b-256 | 220eb52bf98be238cab683c70427ed5f7b11e2cb45e77a114ee91237413a6c96 |
Hashes for librabbitmq_fork-2.0.1.dev4-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1c25a933f414579e485d4b3c3f32dd1311da2291f8ef1c5fb1b8311eec05ea1 |
|
MD5 | 0cba046cb60195fba355a5c1cf7a3eda |
|
BLAKE2b-256 | 6740ac4d05ef4b19c7cd8f700193cc37c7f1783599b69cb4b1729b91596ac8c5 |