C Python C++ Makefile Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Modules/_librabbitmq Bumped version to 2.0 Jan 19, 2018
contrib/release Fix releaseok target for paver Sep 27, 2011
funtests Unittests can be run directly without installation of library Jan 21, 2018
librabbitmq Unittests can be run directly without installation of library Jan 21, 2018
rabbitmq-c @ caad0ef Moved rabbitmq-c submodule to v0.8.0 tag Sep 5, 2017
requirements Unittests can be run directly without installation of library Jan 21, 2018
tests Unittests can be run directly without installation of library Jan 21, 2018
wheelhouse Manylinux1 wheels Aug 19, 2016
.gitignore Use 'make dist' to compile from May 29, 2012
.gitmodules Added official rabbitmq-c repo as submodule Sep 5, 2017
.travis.yml Added .travis.yml Jan 22, 2018
AUTHORS Adds rmihael to AUTHORS Oct 30, 2015
Changelog Update Changelog Mar 12, 2018
LICENSE-GPL-2.0 Prepare distribution for release Jun 14, 2010
LICENSE-MPL-RabbitMQ Prepare distribution for release Jun 14, 2010
MANIFEST.in Fix MANIFEST.in to exclude rabbitmq-c/ and add behaviour of make targ… Feb 13, 2018
Makefile lets you build for python 3 by doing make PYTHON=python3 or make PYTH… Mar 7, 2018
README.rst Bump version info in README Jan 22, 2018
TODO Channel.basic_cancel, Channel.flow, Channel.recover, + (read on) May 23, 2012
benchmark.py Add CLI interface to benchmark.py Jan 2, 2018
build-manylinux1-wheels.sh Manylinux1 wheels Aug 19, 2016
manylinux1 Manylinux1 wheels Aug 19, 2016
setup.cfg Merge branch '1.6' Nov 17, 2014
setup.py Dont expect that paths are relative to source root Mar 20, 2018

README.rst

librabbitmq - Python AMQP Client using the rabbitmq-c library.

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.