Skip to main content

Flask-Dramatiq

Flask-Dramatiq plugs Dramatiq task queue in your Flask web application.

// Features //

  • Configure Dramatiq from Flask configuration.
  • Ensure Flask app is available to Dramatiq actor.
  • Add worker command to Flask CLI.
  • Enable Flask Application factory.
  • Handle multiple brokers with configurable prefix.
  • Integrates periodiq. Optionnal.

Full documentation at flask-dramatiq.readthedocs.io.

// Installation and Usage //

Flask-Dramatiq is licensed under BSD-3-Clause. Add flask-dramatiq to your project:

$ uv add flask-dramatiq

Then use Dramatiq object as a regular Flask extension:

from flask import Flask
from flask_dramatiq import Dramatiq

app = Flask(__name__)
dramatiq = Dramatiq(app)

@dramatiq.actor()
def my_actor():
    ...

@app.route("/")
def myhandler():
    my_actor.send()

Flask-Dramatiq adds two configuration keys:

  • DRAMATIQ_BROKER, points to broker class like dramatiq.brokers.rabbitmq:RabbitmqBroker or dramatiq.brokers.redis:RedisBroker.
  • DRAMATIQ_BROKER_URL is passed as url keyword argument to broker class.

Now run worker program to consume messages and execute tasks in the background:

$ flask worker --processes=1

A complete flask app is available in project source tree example.py.

// Credit and Support //

Feel free to open an issue or suggest a merge request on Github project page. Contribution welcome!

The project is based on Bogdanp/flask_dramatiq_example.

Metadata

Release files for flask-dramatiq 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-dramatiq 0.8.0
File Size Uploaded
flask_dramatiq-0.8.0.tar.gz 601.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-dramatiq 0.8.0
File Interpreter ABI Platform
flask_dramatiq-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 608.1 kB

Release files / flask_dramatiq-0.8.0.tar.gz

Download URL flask_dramatiq-0.8.0.tar.gz
Size 601.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6a5b2d6c8b1689021e3c868c15e260bc185c7da67f75c807d6a5d10b91882d08
BLAKE2b-256 checksum
How to use checksums
b83355765919e7b3cf2a643b841d45f3c3b78c277173994921d4f6ba63972bcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release files / flask_dramatiq-0.8.0-py3-none-any.whl

Download URL flask_dramatiq-0.8.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79e085781cc591e37cd5406e28b7c6ffb6ffdae9fa7cbf4b1dfb974446cfef8a
BLAKE2b-256 checksum
How to use checksums
8fbf3ca5bcf892daf95d282d6c398f7c4173126b6861c9e050db317c8a6b30df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page