Python Lua
Clone or download
Permalink
Failed to load latest commit information.
.github doc: fix issue template formatting Apr 14, 2018
artwork chore: add artwork folder Nov 15, 2017
benchmarks refactor(rabbitmq): upgrade to pika 0.12 in prep for 1.0 Jun 26, 2018
bin fix: use "correct" shebang for dramatiq-gevent Nov 14, 2017
docs doc: add quotes around dramatiq[rabbitmq, watch] Jul 30, 2018
dramatiq fix(pipelines): allow actors to set pipe_ignore Jul 15, 2018
examples refactor(rabbitmq): upgrade to pika 0.12 in prep for 1.0 Jun 26, 2018
tests refactor(rabbitmq): upgrade to pika 0.12 in prep for 1.0 Jun 26, 2018
.bumpversion.cfg chore: bump version 1.2.1 → 1.3.0 Jul 5, 2018
.codeclimate.yml chore: add codeclimate.yml Jun 4, 2017
.gitignore refactor: harden pid handling Mar 31, 2018
.travis.yml chore(packaging): drop requirements files May 26, 2018
CONTRIBUTING.md chore(ci): add isort and flake8-quotes linters Apr 22, 2018
CONTRIBUTORS.md chore: add @viiicky to contributors list Jul 30, 2018
COPYING chore: relicense under the LGPL Mar 31, 2018
COPYING.LESSER chore: relicense under the LGPL Mar 31, 2018
MANIFEST.in chore(packaging): drop requirements files May 26, 2018
README.md doc: quote all the relevant installation instructions May 21, 2018
appveyor.yml chore(appveyor): install memcached from an archive Apr 28, 2018
setup.cfg chore: add flake8-bugbear May 26, 2018
setup.py refactor(rabbitmq): upgrade to pika 0.12 in prep for 1.0 Jun 26, 2018
tox.ini chore(packaging): drop requirements files May 26, 2018

README.md

dramatiq

Build Status Test Coverage Maintainability PyPI version Documentation Discourse

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


Changelog: https://dramatiq.io/changelog.html
Community: https://discuss.dramatiq.io
Documentation: https://dramatiq.io


Installation

If you want to use it with RabbitMQ

pipenv install 'dramatiq[rabbitmq, watch]'

or if you want to use it with Redis

pipenv 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.