OSS TanbouSign in with GitHub

move Python background tasks to RabbitMQ or Redis with actors and worker processes

OSS scale score 237.1OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
5,326
Primary language
Python
License
LGPL-3.0-or-later
Repository last updated
Oct 5, 2026
On this page

Overview

Dramatiq is a distributed task processing library for Python. Python functions become actors, messages are sent through RabbitMQ or Redis, and independent worker processes execute background tasks outside the application request process.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Turn Python functions into actors and send messages to workers

@dramatiq.actor registers a function as a task and .send() enqueues a message through the broker. Workers import the module and process actor messages independently from the web application request process.

Sources: [2]

Choose RabbitMQ or Redis and operate workers as separate processes

Official extras provide RabbitMQ and Redis broker integrations, while the dramatiq module CLI starts worker processes. The watch extra can add file-change-driven worker reload during development.

Sources: [2][3]

Best fit

Fits Python backends that want a compact background-task processing model

It is useful when a service needs broker-backed background work but prefers an API centered on actors, messages, and workers, especially when RabbitMQ or Redis already exists in the infrastructure.

Sources: [2]

Before adoption

Dramatiq 2.2.1 requires Python 3.10+; validate broker failures and async actor error paths

Dramatiq 2.2.1 requires Python 3.10 or newer and depends on an external broker process. Delivery and retry behavior should be tested against the actual RabbitMQ or Redis deployment. Version 2.2.1 fixes reference cycles from async actor exceptions and improves logging when RabbitMQ shuts down.

Sources: [3][4]

Official sources

  1. [1]Bogdanp/dramatiq — GitHub repository(2026-10-06)
  2. [2]Dramatiq 2.2.1 — README(2026-10-06)
  3. [3]Dramatiq 2.2.1 — setup.py(2026-10-06)
  4. [4]Dramatiq 2.2.1 release(2026-10-06)
  5. [5]Dramatiq LGPL-3.0-or-later license(2026-10-06)
Supplemental curator note

The actor/message/worker model keeps background processing conceptually small. Because the broker remains an external component, validate worker shutdown, reconnect, retry, and idempotency behavior before moving critical tasks onto it.

Try it in 3 steps

  1. 1

    Install Dramatiq 2.2.1 with RabbitMQ support

    Pin the reviewed release and RabbitMQ broker dependency. Python 3.10 or newer and RabbitMQ on localhost are required.

    python -m pip install "dramatiq[rabbitmq]==2.2.1"
  2. 2

    Create a minimal actor

    Use the actor/message pattern from the official Quickstart with a minimal task that does not require external HTTP access.

    cat > example.py <<'PY' import dramatiq @dramatiq.actor def add(x, y): print(f'{x} + {y} = {x + y}') if __name__ == '__main__': add.send(2, 3) PY
  3. 3

    Start a worker and send the message

    Start the worker, enqueue the message from another terminal, and confirm 2 + 3 = 5 in the worker log.

    dramatiq example # In another terminal: python example.py
Check the official README

Growth

Growth trends · Last 30 days

5,326 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • distributed-lock
  • python
  • rabbit
  • redis
  • task
  • task-manager
  • task-runner
  • task-scheduler
Stars
5,326
Forks
384
Watchers
58
Open issues
67
Contributors
118
Owner type
User
Primary language
Python
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?