Background Processing for Python 3.
Project description
dramatiq
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dramatiq-1.8.0.tar.gz
.
File metadata
- Download URL: dramatiq-1.8.0.tar.gz
- Upload date:
- Size: 64.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1384f2dd3b7cd614a4e6e51edadb58e7e27b99ff1eaebe7f750e5fcd7c5f98 |
|
MD5 | 6aa50d6f3e0536c1eac4102fd73faaf1 |
|
BLAKE2b-256 | 929ee2cc340ab65beed4e1007c2e0570284d45188adb0232182ab53f4e6af6b9 |
Provenance
File details
Details for the file dramatiq-1.8.0-py3-none-any.whl
.
File metadata
- Download URL: dramatiq-1.8.0-py3-none-any.whl
- Upload date:
- Size: 107.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7633aca34b92c77f4f02156c2168018aabb99293396d57e406785538fca61f21 |
|
MD5 | c0135714ff9e356d4c9275a84800976d |
|
BLAKE2b-256 | 5a01abf97fcb6fc998fcde30ded6b5f4027102357fd80656eb0737b6e92aa713 |