MCPcopy
hub / github.com/Bogdanp/dramatiq

github.com/Bogdanp/dramatiq @v2.2.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.2.0 ↗
948 symbols 3,950 edges 121 files 246 documented · 26%
README

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.

Core symbols most depended-on inside this repo

join
called by 178
dramatiq/broker.py
send
called by 117
dramatiq/actor.py
add_middleware
called by 50
dramatiq/broker.py
message
called by 47
dramatiq/actor.py
wait
called by 30
dramatiq/composition.py
get_logger
called by 29
dramatiq/logging.py
emit_after
called by 25
dramatiq/broker.py
send_with_options
called by 23
dramatiq/actor.py

Shape

Function 457
Method 366
Class 114
Route 11

Languages

Python100%

Modules by API surface

tests/test_actors.py51 symbols
tests/test_rabbitmq.py37 symbols
dramatiq/broker.py37 symbols
dramatiq/brokers/rabbitmq.py34 symbols
dramatiq/worker.py33 symbols
dramatiq/middleware/middleware.py29 symbols
tests/test_composition.py28 symbols
tests/test_cli.py28 symbols
tests/test_redis.py27 symbols
tests/test_generic_actors.py26 symbols
tests/test_results.py25 symbols
dramatiq/middleware/shutdown.py24 symbols

For agents

$ claude mcp add dramatiq \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact