dramatiq
Background Processing for Python 3.
What it is and what it does
Dramatiq is a distributed task processing library for Python that decouples work from the main application by sending tasks to a message broker for background execution. You define tasks as Python functions decorated with @dramatiq.actor, then call .send() to queue them asynchronously. Workers consume messages from the broker and execute the tasks in parallel, enabling you to handle long-running or resource-intensive operations without blocking your main application.
The library supports RabbitMQ and Redis as message brokers and requires Python 3.10 or later. It has no runtime dependencies beyond the broker itself, making installation straightforward. The project is actively maintained with recent releases and a stable API, suitable for production use in applications that need reliable background job processing.
Use it for:
- Queue long-running HTTP requests or API calls to execute in the background without blocking the main application
- Distribute CPU-intensive computations across multiple worker processes or machines
- Send transactional emails, notifications, or batch reports asynchronously after user actions
- Process uploaded files, generate reports, or perform data transformations on a schedule or on-demand
- Implement retry logic and error handling for operations that may fail intermittently
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dramatiq is a distributed task processing library that lets you define Python functions as background workers and queue them for asynchronous execution via message brokers like RabbitMQ or Redis.
Yes. Dramatiq is a mature, actively maintained library with no known vulnerabilities and low install friction. It's well-suited for any Python application that needs reliable background task processing. The copyleft license is a consideration only if you plan to modify and redistribute the library itself. Choose it if you need a straightforward, production-ready task queue backed by RabbitMQ or Redis.
Install
dramatiq on PyPI
pip
pip install dramatiquv
uv add dramatiqpoetry
poetry add dramatiqInstalling dramatiq
Before you install
Installation is low-friction; the package itself is a pure Python wheel with no runtime dependencies. Maintenance is active with a recent release and ongoing commits, though you'll need to separately install and run a message broker as a prerequisite.
License in practice
Licensed under LGPLv3+, a copyleft license. You can use it freely in open-source projects, but if you distribute or deploy a modified version, you must make your changes available under the same license terms.
Quickstart
pip install 'dramatiq[rabbitmq]'
import dramatiq
@dramatiq.actor
def my_task(x):
return x * 2
my_task.send()
A running RabbitMQ or Redis broker is required; dramatiq itself is only the client and worker library.
Verify before relying
- Whether the package supports task result persistence or only fire-and-forget semantics
- Retry and error-handling policies available beyond what the quickstart shows
- Performance characteristics and throughput limits under typical workloads
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 58 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,607,851/month — #3,724 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dramatiq-2.2.0-py3-none-any.whl
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
django-dramatiqIntegrates Dramatiq, a distributed task queue,…
unclear · top 15,000 on PyPI
vercel-workersPython SDK for publishing and consuming…
permissive · top 5,000 on PyPI
celeryCelery is a distributed task queue that lets…
permissive · top 1,000 on PyPI
taskiqTaskiq is an asynchronous distributed task…
permissive · top 5,000 on PyPI
arqarq provides a job queue system for Python that…
permissive · top 5,000 on PyPI
rqRQ is a Python library for queueing jobs and…
permissive · top 5,000 on PyPI
pydocketDocket is a distributed background task system…
permissive · top 5,000 on PyPI
saqSAQ is an async job queue framework that runs…
permissive · top 15,000 on PyPI
redis-simple-mqA lightweight message queue built on Redis that…
permissive · top 15,000 on PyPI