skillfed

dramatiq

Background Processing for Python 3.

dramatiq v2.2.0 1.6M downloads/30d#3,724 on PyPI5,309
Copyleft license Active released

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 dramatiq

uv

uv add dramatiq

poetry

poetry add dramatiq

Installing 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

License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: System :: Distributed Computing

Tags

distributed task queuebackground job processingasync task workermessage broker task processingpython task schedulingrabbitmq worker libraryredis job queue
task-queuebackground-jobsmessage-broker

More Distributed Computing packages