Skip to main content

AMQP Client using the rabbitmq-c library.

Project description

Version:
2.0.0
Download:

http://pypi.python.org/pypi/librabbitmq/

Code:

http://github.com/celery/librabbitmq/

Keywords:

rabbitmq, amqp, messaging, librabbitmq, rabbitmq-c, python, kombu, celery

Python bindings to the RabbitMQ C-library rabbitmq-c. Supported by Kombu and Celery.

Installation

Install via pip:

$ pip install librabbitmq

or, install via easy_install:

$ easy_install librabbitmq

Downloading and installing from source

Download the latest version from

http://pypi.python.org/pypi/librabbitmq/

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

librabbitmq-2.0.0.tar.gz (42.6 kB view details)

Uploaded Source

Built Distributions

librabbitmq-2.0.0-cp36-cp36m-manylinux1_x86_64.whl (218.5 kB view details)

Uploaded CPython 3.6m

librabbitmq-2.0.0-cp35-cp35m-manylinux1_x86_64.whl (218.4 kB view details)

Uploaded CPython 3.5m

librabbitmq-2.0.0-cp34-cp34m-manylinux1_x86_64.whl (218.1 kB view details)

Uploaded CPython 3.4m

librabbitmq-2.0.0-cp27-cp27mu-manylinux1_x86_64.whl (214.9 kB view details)

Uploaded CPython 2.7mu

librabbitmq-2.0.0-cp27-cp27m-manylinux1_x86_64.whl (214.9 kB view details)

Uploaded CPython 2.7m

File details

Details for the file librabbitmq-2.0.0.tar.gz.

File metadata

  • Download URL: librabbitmq-2.0.0.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for librabbitmq-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ffa2363a860ab5dcc3ce3703247e05e940c73d776c03a3f3f9deaf3cf43bb96c
MD5 8b7d127fee592eaa1fecd93839ae1cc7
BLAKE2b-256 f44e8f8bf33d44f3441d6f6c29b299cc847570b2c864bd8d2f9871aa6c03b73e

See more details on using hashes here.

File details

Details for the file librabbitmq-2.0.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for librabbitmq-2.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5cdfb473573396d43d54cef9e9b4c74fa3d1516da51d04a7b261f6ef4e0bd8be
MD5 a460ca38aac94e5646f940655f0a17c2
BLAKE2b-256 cef72dd0d069f0591fccb1140dea73e43272943b5ff87da044119e037812cb05

See more details on using hashes here.

File details

Details for the file librabbitmq-2.0.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for librabbitmq-2.0.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 98e355f486964dadae7e8b51c9a60e9aa0653bbe27f6b14542687f305c4c3652
MD5 ae1e56d298f2c5796524e9b1285673f8
BLAKE2b-256 431e888817ac962e1c888d87af7f78a1f9eba841c0545b146c410f716277c54a

See more details on using hashes here.

File details

Details for the file librabbitmq-2.0.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for librabbitmq-2.0.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cd9cc09343b193d7cf2cff6c6a578061863bd986a4bdf38f922e9dc32e15d944
MD5 75b8e579b6f97b5c27e04941f5f219c3
BLAKE2b-256 ebfd7738795dae1beea24036fa8609841c552514cb3b79775f7f45bee226e74a

See more details on using hashes here.

File details

Details for the file librabbitmq-2.0.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for librabbitmq-2.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3116e40c02d4285b8dd69834e4cbcb1a89ea534ca9147e865f11d44e7cc56eea
MD5 d62a225adc342c70ccd680b4a2a15085
BLAKE2b-256 cc6021de22227f7b15637010614498844311c6baef319913b03fcc4cc6728d34

See more details on using hashes here.

File details

Details for the file librabbitmq-2.0.0-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for librabbitmq-2.0.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c2a8113d3c831808d1d940fdf43e4882636a1efe2864df7ab3bb709a45016b37
MD5 53d0bbc225504de718c3f29cfe2510c1
BLAKE2b-256 165f6acb0d17f4a1fb33bd146b16b1666339c6b13da8a6429f627e5d8148ed40

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