Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Dead simple task queue using redis

Project Description

Dead simple task queue using redis.

import dsq
manager = dsq.create_manager()

def add(a, b):
    print a + b

if __name__ == '__main__':
    add.push(1, 2)
$ python
$ dsq worker -bt tasks normal

See full DSQ documentation.


  • Low latency.
  • Expiring tasks (TTL).
  • Delayed tasks (ETA).
  • Retries (forever or particular amount).
  • Periodic tasks.
  • Crontab.
  • Dead letters.
  • Queue priorities.
  • Worker lifetime.
  • Task execution timeout.
  • Task forwarder from one redis instance to another.
  • HTTP interface.
  • Inspect tools.
  • Supports 2.7, 3.4, 3.5, 3.6 and PyPy.
  • 100% test coverage.

The goal is a simple design. There is no worker manager, one can use supervisord/circus/whatever to spawn N workers. Simple storage model. Queue is a list and scheduled tasks are a sorted set. There are no task keys. Tasks are items of list and sorted set. There is no any registry to manage workers, basic requirements (die after some lifetime and do not hang) can be handled by workers themselves. Worker do not store result by default.

Queue overhead benchmarks

DSQ has a little overhead in compare with RQ and Celery (

Pushing and processing 10k trivial add tasks:

=== DSQ ===
real        0m0.906s
user        0m0.790s
sys         0m0.107s

real        0m1.949s
user        0m0.763s
sys         0m0.103s

=== RQ ===
real        0m3.617s
user        0m3.177s
sys         0m0.293s

real        0m57.706s
user        0m29.807s
sys         0m20.070s

=== Celery ===
real        0m5.753s
user        0m5.237s
sys         0m0.327s

Release History

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.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(13.5 kB) Copy SHA256 Hash SHA256
Source Aug 2, 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