Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Priority message queue with Redis

Project description


pyrediq (py-re-ddi-ck) is a Python (2.7) library providing an implementation of priority messaging queue using Redis. The message payload is serialized by MessagePack.

pyrediq is licensed under the MIT License (MIT).

Basic Usage

import redis
from pyrediq import PriorityQueue, QueueEmpty

redis_conn = redis.StrictRedis()

# create a queue
queue = PriorityQueue('myqueue', redis_conn)

# enqueue a message to the queue
queue.put({'mykey': 'myvalue'}, priority=-1)

# create a consumer
with queue.consumer() as consumer:
        msg = consumer.get(block=False)
    except QueueEmpty:

    success = do_task(msg.payload)

    # the message is either acked or rejected after task is done.
    # a rejected message can optionally be requeued
    if success:
        consumer.reject(msg, requeue=True)


To remove all message from a queue and remove the queue itself, run PriorityQueue.purge method:



To install pyrediq using pip, run this command on the shell:

pip install pyrediq

To use pyrediq, Redis needs to be installed and running on the computer. For example, on a Debian box, running this command should suffice:

sudo apt-get install redis-server

Consult the official Redis distribution site for the install procedure.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


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
pyrediq-0.3.4.tar.gz (8.3 kB) Copy SHA256 hash SHA256 Source None Mar 16, 2017

Supported by

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