Python task queue libraries

Updated Nov 2026

Python task queue libraries run functions in background worker processes instead of inside the request that triggered them. A producer puts each job on a broker such as Redis, RabbitMQ, or PostgreSQL before a worker picks it up and records the result. These libraries let web apps and AI agents hand slow work to background workers.

Popularity

Celery has the most monthly downloads in this comparison, at 54.1M.

LibraryMonthly downloadsStarsLast releaseLicense
Celery
54.1M
29.2KNov 2026BSD-3-Clause
Huey
15.7M
6.1KNov 2026MIT
RQ
13.2M
10.7KOct 2026BSD-2-Clause
arq
5.7M
3.0KApr 2026MIT
Procrastinate
4.3M
1.5KNov 2026MIT
Taskiq
2.6M
2.4KSep 2026MIT
dramatiq
2.5M
5.3KSep 2026LGPL-3.0
django-rq
931.3K
2.0KAug 2026MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Dispatches Python tasks to worker processes through a message broker, with configurable result backends.

Downloads / mo
54.1M
Stars
29.2K
Last release
5.7.0
License
BSD-3-Clause

Strengths

  • Supports several result backends. Choose a result store independently of the task broker.
  • Retries selected exception types. Configure automatic retries with exception filters and backoff.

Limitations

  • Results need a configured backend. Task return values are unavailable until a result backend is configured.
  • Late acknowledgments can repeat work. Make tasks duplicate-safe when workers acknowledge after execution.
$ python -m pip install "celery[redis]==5.7.0"
# tasks.py
from celery import Celery

app = Celery("tasks", broker="redis://localhost:6379/0")

@app.task
def add(x, y):
    return x + y

# producer.py
import tasks

result = tasks.add.delay(1, 2)

Celery examples

From open-source projects on GitHub

Runs a small task queue.

Downloads / mo
15.7M
Stars
6.1K
Last release
3.5.4
License
MIT

Quickstart

From guide.html
$ python -m pip install huey==3.5.4
# tasks.py
from huey import SqliteHuey

huey = SqliteHuey("demo", filename="huey.db")

@huey.task()
def add(x, y):
    return x + y

# producer.py
import tasks

result = tasks.add(1, 2)

Queues Python function calls for background workers backed by Redis or Valkey.

Downloads / mo
13.2M
Stars
10.7K
Last release
3.0.0
License
BSD-2-Clause

Strengths

  • Enqueues ordinary Python functions. Dispatch an existing function with its arguments through Queue.enqueue.
  • Tracks multiple execution results. Inspect execution outcomes retained for the same job.

Limitations

  • Each worker handles one job. Start additional workers to process jobs concurrently.
  • Job protocol stays Python-only. Use another protocol for workers implemented in other languages.

Quickstart

From run_example.py
$ python -m pip install rq==3.0.0
from redis import Redis
from rq import Queue

queue = Queue(connection=Redis())
job = queue.enqueue("math.floor", 2.7)

RQ examples

From open-source projects on GitHub

Runs asyncio jobs through Redis, with deferred execution, results, and cancellation controls.

Downloads / mo
5.7M
Stars
3.0K
Last release
0.28.0
License
MIT

Strengths

  • Runs asynchronous jobs natively. Use asyncio functions for nonblocking enqueueing and execution.
  • Defers jobs without separate scheduling. Set a delay or target time when enqueueing a job.

Limitations

  • Development is maintenance-only. Evaluate the maintenance policy before adopting it for new infrastructure.
  • Interrupted jobs can run again. Make task effects duplicate-safe when workers restart.

Quickstart

From arq-docs.helpmanual.io
$ python -m pip install arq==0.28.0 "redis>=5.3,<6"
import asyncio
from arq import create_pool
from arq.connections import RedisSettings

async def add(ctx, x, y):
    return x + y

class WorkerSettings:
    functions = [add]

async def main():
    redis = await create_pool(RedisSettings())
    try:
        await redis.enqueue_job("add", 1, 2)
    finally:
        await redis.aclose()

if __name__ == "__main__":
    asyncio.run(main())

arq examples

From open-source projects on GitHub

Procrastinate

Processes distributed tasks on PostgreSQL.

Downloads / mo
4.3M
Stars
1.5K
Last release
3.12.0
License
MIT

Quickstart

From README.md
$ python -m pip install procrastinate
import procrastinate

app = procrastinate.App(connector=procrastinate.SyncPsycopgConnector(
    conninfo="postgresql://localhost/procrastinate"))

@app.task
def add(a, b):
    return a + b

with app.open():
    job_id = add.defer(a=3, b=5)

Procrastinate examples

From open-source projects on GitHub

Runs distributed tasks with full async support.

Downloads / mo
2.6M
Stars
2.4K
Last release
0.13.0
License
MIT

Quickstart

From getting-started.html
$ python -m pip install taskiq==0.13.0
import asyncio
from taskiq import InMemoryBroker

broker = InMemoryBroker()

@broker.task
async def add_one(value: int) -> int:
    return value + 1

async def main():
    await broker.startup()
    try:
        task = await add_one.kiq(1)
        result = await task.wait_result(timeout=2)
        print(result.return_value)
    finally:
        await broker.shutdown()

if __name__ == "__main__":
    asyncio.run(main())

Taskiq examples

From open-source projects on GitHub

Runs actor-based Python background tasks through RabbitMQ or Redis, with composable worker middleware.

Downloads / mo
2.5M
Stars
5.3K
Last release
2.2.1
License
LGPL-3.0

Strengths

  • Retries failed messages automatically. Retry actor failures with exponential backoff.
  • Supports two broker families. Choose RabbitMQ or Redis without replacing the actor API.

Limitations

  • Arguments must be JSON-encodable. Convert custom objects before sending them to actors.
  • Time limits are best effort. Blocking system calls can outlive an actor’s time limit.

Quickstart

From guide.html
$ python -m pip install "dramatiq[redis]==2.2.1"
# tasks.py
import dramatiq
from dramatiq.brokers.redis import RedisBroker

dramatiq.set_broker(RedisBroker(url="redis://localhost:6379/0"))

@dramatiq.actor
def add(x, y):
    return x + y

# producer.py
import tasks

message = tasks.add.send(1, 2)

dramatiq examples

From open-source projects on GitHub

Integrates RQ with Django.

Downloads / mo
931.3K
Stars
2.0K
Last release
4.2.0
License
MIT

Quickstart

From README.rst
$ python -m pip install django-rq
import django_rq

queue = django_rq.get_queue("default")
job = queue.enqueue("math.floor", 2.7)

django-rq examples

From open-source projects on GitHub

FAQ

Celery suits distributed workers with several brokers and result backends. RQ suits Redis-backed queues of ordinary Python functions. Dramatiq suits actor-based workers with automatic retries. arq suits asyncio jobs on Redis.

Celery dispatches Python tasks to worker processes through a message broker, with configurable result backends. Late acknowledgment can let a task run more than once after a worker crash.

Dramatiq runs actor-based background tasks through RabbitMQ or Redis. It retries failed actors automatically with exponential backoff. Actor arguments must be JSON-encodable.

Taskiq is a distributed task queue with full async support. Its broker integrations install separately.

Celery supports several brokers, result backends, and task chains. RQ queues ordinary Python functions on Redis or Valkey, with workers that each handle one job at a time.

arq runs asyncio jobs through Redis, with deferred execution, results, and cancellation. Its development is maintenance-only.

For coding agents

Found your task queue library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official