Simple messaging with RabbitMQ and Python.


License
MIT
Install
pip install bunnymq==0.0.15

Documentation

BunnyMQ

Build Status PyPI pyversions PyPI version fury.io

Simple messaging with RabbitMQ and Python.

Head over to the tutorial to get started.

This is a small library inspired by the Python standard library queue module and the hotqueue library. Primarily geared towards programmer happiness 🙂

Basic Usage:

>>> queue = Queue('test')

>>> queue.put(1)
>>> queue.put('hello', priority=8)
>>> queue.put({'a': 1})

>>> queue.get()
'hello'
>>> queue.task_done()

>>> queue.get()
1
>>> queue.requeue()

Iterating over a queue indefinitely, waiting if nothing is available:

>>> for item in queue:
...     print(item)
...     queue.task_done()

Features

  • Simple usage
  • Automatic serialization and deserialization of Python objects
  • Adding custom serializers or turning serialization off is trivial
  • Automatic retry while publishing
  • Automatic handling of connection failures while consuming
  • Easy parallelization by starting multiple workers to share the load.

Install

pip install bunnymq

Requirements