Skip to main content

Elastic Queue is a library to bear a PubSub projects.

Project description

# EQueue
Elastic Queue is a library to bear a PubSub projects

### How to use it

Install via PIP

$ pip install equeue

#### Producing

Using ipython


In [1]: from equeue.rabbit.publisher import Publisher

In [2]: pub = Publisher(host='localhost', username='guest', password='guest', queue_name='t')

In [3]: pub.put(message_dict={'id': 1})
Out[3]: <promise@0x10ef18b78>


#### By poll

Using ipython


In [1]: from equeue.rabbit.subscriber import Subscriber

In [2]: sub = Subscriber(host='localhost', username='guest', password='guest', queue_name='t')

In [3]: msg = sub.get()

In [4]: if msg:
...: print(msg)

#### Consuming

Creating a you'd see better.


from equeue.rabbit.subscriber import Subscriber

def events_out(callback, message, delivery_tag):

def main():

sub = Subscriber(host='localhost', username='guest',
password='guest', queue_name='t')

while True:
if __name__ == '__main__':



$ python

### Developing mode

Running tests

To run the project's test you will need to have pytest installed. The instalation is simple as :

$ pip install pytest

And to run the tests you need to ajust yout `PYTHONPATH`

$ PYTHONPATH=equeue py.test

Release history Release notifications

This version
History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
equeue-0.1.5.tar.gz (5.5 kB) Copy SHA256 hash SHA256 Source None Dec 23, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page