Simple messaging with RabbitMQ and Python.
Project description
BunnyMQ
Simple messaging with RabbitMQ and Python.
This is a small library inspired by the Python standard library queue module and the hotqueue library. Primarily geared towards programmer happiness :slightly_smiling_face:
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()
Head over to the tutorial to get started.
Features
- Simple usage
- Automatic serialization and deserialization of Python objects
- Automatic retry while publishing
- Automatic handling of connection failures while consuming
- Automatic handling of message redeliveries because of failure to send acknowledgement at the end of processing. This is a frequent scenario for long running consumer tasks. If you have encountered this problem, do read the details.
- Easy parallelization by starting multiple workers to share the load.
Install
pip install bunnymq
Requirements
- Python 3.6+
- RabbitMQ server
- Pika
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 Distribution
bunnymq-0.0.6.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for bunnymq-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 550c6df1873d02ea01b28b84627ca20092e7b2e71fa128ffb430d82c3ae49eed |
|
MD5 | 72781a9c67866fceae3b96b283176eba |
|
BLAKE2b-256 | 089d670777d26322b2bfa04345f8c1e56c4a04bc3566cbd340fba0168617f014 |