Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A simple but useful redis queue/worker

Project description

# Redis simple queue


Very simple implementation from article : http://peter-hoffmann.com/2012/python-simple-queue-redis-queue.html


## usage

```shell
pip install py_redis_simple_queue
```

### The sender
```python
from redis import Redis

from redis_simple_queue import RedisQueue


connection = Redis() # see docs at https://docs.objectrocket.com/redis_python_examples.html


queue = RedisQueue('my_queue', connection)
queue.put('my message')
```

### The worker

```python
from redis import Redis

from redis_simple_queue import Worker, RedisQueue

class MyWorker(Worker):

def run(self, msg):
print(msg)
# do something with message

connection = Redis()
queue = RedisQueue('my_queue', connection)
worker = MyWorker(queue)
worker.dequeue()
```

Project details


Download files

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

Files for py_redis_simple_queue, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size py_redis_simple_queue-0.0.3.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page