Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A Python Task Queue library using RabbitMQ (aioamqp) and asyncio

Project Description
# aioqueue
A Python Task Queue library using RabbitMQ (aioamqp) and asyncio

## Install
```bash
pip install aioqueue
```

## Create a queue
```python
from aioqueue import Queue
q = Queue() # connects to rmqp://localhost:5671 by default
await q.start()
```

## Define a task
```python
# defines a queue named 'my task' when `start()` is called
@q.on('my task')
def my_task(data):
message = data['message']
print(message)
return 'world'
```

## Trigger a task
```python
t = await q.create('my task', { 'message': 'hello' })
```

## Get the result of a task
```python
result = await t.result()
```
Note: A call to `result()` isn't necessary if you don't want the result of the task. You can also pass `no_response=True` to `q.create()` if you really don't want the result and don't want the queue waiting around for a result. In that case, a call to `result()` will always return `None`.

## License
MIT
Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
aioqueue-0.1.1-py3-none-any.whl (5.2 kB) Copy SHA256 Checksum SHA256 py3 Wheel May 21, 2017
aioqueue-0.1.1.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source May 21, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting