Skip to main content

Background Processing for Python 3.

Project description

dramatiq

Build Status PyPI version Documentation Discuss

A fast and reliable distributed task processing library for Python 3.


Changelog: https://dramatiq.io/changelog.html
Community: https://groups.io/g/dramatiq-users
Documentation: https://dramatiq.io


Sponsors

Installation

If you want to use it with RabbitMQ

pip install 'dramatiq[rabbitmq, watch]'

or if you want to use it with Redis

pip install 'dramatiq[redis, watch]'

Quickstart

Make sure you've got RabbitMQ running, then create a new file called example.py:

import dramatiq
import requests
import sys


@dramatiq.actor
def count_words(url):
    response = requests.get(url)
    count = len(response.text.split(" "))
    print(f"There are {count} words at {url!r}.")


if __name__ == "__main__":
    count_words.send(sys.argv[1])

In one terminal, run your workers:

dramatiq example

In another, start enqueueing messages:

python example.py http://example.com
python example.py https://github.com
python example.py https://news.ycombinator.com

Check out the user guide to learn more!

License

dramatiq is licensed under the LGPL. Please see COPYING and COPYING.LESSER for licensing details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dramatiq-2.1.0.tar.gz (105.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dramatiq-2.1.0-py3-none-any.whl (125.5 kB view details)

Uploaded Python 3

File details

Details for the file dramatiq-2.1.0.tar.gz.

File metadata

  • Download URL: dramatiq-2.1.0.tar.gz
  • Upload date:
  • Size: 105.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dramatiq-2.1.0.tar.gz
Algorithm Hash digest
SHA256 cf81550729de6cf64234b05bd63970645654aaf38967faa7a2b6e401384bb090
MD5 41f7844de4ed608fe17add87ba064232
BLAKE2b-256 226902b54e3fc4fe75721b322bc578054b4f03cec258ba614fa98a1a5bbe1efe

See more details on using hashes here.

File details

Details for the file dramatiq-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: dramatiq-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 125.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dramatiq-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef940c2815722d3679aed79ef96c805f02fd33d4361529b2de30f01511ca44d
MD5 bf8e371b3094d623704725e07535f476
BLAKE2b-256 c291422960c8c415fd31ca1519d71d6f7e4bcabb2cdcc5872f784467e9fe7237

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page