Skip to main content

Background Processing for Python 3.

Project description

dramatiq

Build Status PyPI version Documentation Discourse

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


Changelog: https://dramatiq.io/changelog.html
Community: https://reddit.com/r/dramatiq
Documentation: https://dramatiq.io


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-1.9.0.tar.gz (66.8 kB view details)

Uploaded Source

Built Distribution

dramatiq-1.9.0-py3-none-any.whl (110.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dramatiq-1.9.0.tar.gz
  • Upload date:
  • Size: 66.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for dramatiq-1.9.0.tar.gz
Algorithm Hash digest
SHA256 8112941ab2eda4f0288bacd137a991f9b1b1c600fe3dd5960eaba4256c873839
MD5 de41b0709a974dea80a395ec65560f59
BLAKE2b-256 cd27241fc914f3728f4d813824a5d3e701de1bb197c659680b48ce67b91283ad

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: dramatiq-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 110.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for dramatiq-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 360cd436a434a513c87a9769943543c1d065835e3fa0b01f96c4fdd959bfa1c3
MD5 bb32d4986ec503da9139a185a3c40d63
BLAKE2b-256 eccf6053b8cce1cbef8770448fdb31e6577e3cc16022283a706dd486c8b2f374

See more details on using hashes here.

Provenance

Supported by

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