{"name":"dramatiq: Fast & Reliable Background Task Processing for Python 3","description":"dramatiq is a powerful and efficient Python 3 library designed for processing background tasks. It enables developers to offload time-consuming operations to a separate process, improving application responsiveness. With robust support for message brokers like RabbitMQ and Redis, dramatiq ensures reliable and scalable task execution.","github":"https://github.com/Bogdanp/dramatiq","url":"https://osrepos.com/repo/bogdanp-dramatiq","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/bogdanp-dramatiq","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/bogdanp-dramatiq.md","json":"https://osrepos.com/repo/bogdanp-dramatiq.json","topics":["python","background tasks","task manager","task scheduler","redis","rabbitmq","distributed systems"],"keywords":["python","background tasks","task manager","task scheduler","redis","rabbitmq","distributed systems"],"stars":null,"summary":"dramatiq is a powerful and efficient Python 3 library designed for processing background tasks. It enables developers to offload time-consuming operations to a separate process, improving application responsiveness. With robust support for message brokers like RabbitMQ and Redis, dramatiq ensures reliable and scalable task execution.","content":"## Introduction\n\ndramatiq is a powerful and efficient Python 3 library designed for processing background tasks. It offers a fast and reliable way for applications to offload long-running or resource-intensive operations, ensuring that the main application thread remains responsive. By leveraging message brokers like RabbitMQ and Redis, dramatiq facilitates robust and scalable distributed task execution, making your applications more performant and resilient.\n\n## Installation\n\nTo get started with dramatiq, you can install it via pip. Choose the installation method based on your preferred message broker:\n\nIf you want to use it with [RabbitMQ](https://www.rabbitmq.com/):\n\nbash\npip install 'dramatiq[rabbitmq, watch]'\n\n\nOr if you want to use it with [Redis](https://redis.io):\n\nbash\npip install 'dramatiq[redis, watch]'\n\n\n## Examples\n\nHere's a quickstart example demonstrating how to define and dispatch a background task using dramatiq. First, create a file named `example.py`:\n\npython\nimport dramatiq\nimport requests\nimport sys\n\n\n@dramatiq.actor\ndef count_words(url):\n    response = requests.get(url)\n    count = len(response.text.split(\" \"))\n    print(f\"There are {count} words at {url!r}.\")\n\n\nif __name__ == \"__main__\":\n    count_words.send(sys.argv[1])\n\n\nIn one terminal, run your dramatiq workers:\n\nbash\ndramatiq example\n\n\nIn another terminal, you can start enqueueing messages:\n\nbash\npython example.py http://example.com\npython example.py https://github.com\npython example.py https://news.ycombinator.com\n\n\n## Why use dramatiq?\n\ndramatiq stands out as an excellent choice for background task processing due to several key advantages:\n\n*   **Speed and Reliability:** Engineered for high performance and dependable task execution, even under heavy loads.\n*   **Python 3 Focus:** Built specifically for modern Python development, taking advantage of its features.\n*   **Broker Flexibility:** Seamlessly integrates with popular message brokers such as RabbitMQ and Redis, offering flexibility in your infrastructure.\n*   **Improved Responsiveness:** Offloads time-consuming tasks, preventing your main application from freezing and enhancing user experience.\n*   **Scalability:** Supports distributed task processing, allowing you to scale your background workers independently.\n*   **Simple API:** Provides a straightforward and intuitive API for defining actors and dispatching tasks.\n\n## Links\n\n*   **Documentation:** [https://dramatiq.io](https://dramatiq.io)\n*   **Community:** [https://groups.io/g/dramatiq-users](https://groups.io/g/dramatiq-users)\n*   **Changelog:** [https://dramatiq.io/changelog.html](https://dramatiq.io/changelog.html)\n*   **GitHub Repository:** [https://github.com/Bogdanp/dramatiq](https://github.com/Bogdanp/dramatiq)\n*   **RabbitMQ:** [https://www.rabbitmq.com/](https://www.rabbitmq.com/)\n*   **Redis:** [https://redis.io](https://redis.io)","metrics":{"detailViews":0,"githubClicks":0},"dates":{"published":null,"modified":"2026-08-05T15:39:26.000Z"}}