Redis task queue for Python 3 heavily inspired by Celery and RQ.
Distinctive features:
- Threaded and asyncio workers
- At-least-once or at-most-once delivery per task
- Periodic tasks without an additional process
- Concurrency limits on queued jobs
- Scheduling of tasks in batch
- Integrations with Flask, Django, Logging, Sentry and Datadog
- Embeddable workers for easier testing
- See design choices for more details
Install Spinach with pip:
pip install spinach
Create a task and schedule a job to be executed now:
from spinach import Engine, MemoryBroker
spin = Engine(MemoryBroker())
@spin.task(name='compute')
def compute(a, b):
print('Computed {} + {} = {}'.format(a, b, a + b))
# Schedule a job to be executed ASAP
spin.schedule(compute, 5, 3)
print('Starting workers, ^C to quit')
spin.start_workers()
The documentation is at https://spinach.readthedocs.io.
IRC channel for online discussions #spinach on irc.libera.chat.
BSD 2-clause