Library that provides a system to generate tasks producers and consumers with ease.
Project description
- Version:
- 1.0.0
- Status:
- Production/Stable
Library that provides a system to generate tasks producers and consumers with ease.
Quick start
Install this package using pip:
pip install task-dispatcher
Decorate your functions as producer and consumer tasks:
from task_dispatcher import consumer, producer @consumer def square(x): return x**2 @producer def prod_function(n): for i in range(n): square.delay(i)
Consumer and Producer
This library provides convenient decorators for generating a task dispatcher system based on producer-consumer pattern. Decorated functions or methods acts as Celery tasks and can be called using his own syntax: Calling celery tasks. Also, it’s possible to compose these tasks using Celery Canvas.