Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.rst

Spinach

https://travis-ci.org/NicolasLM/spinach.svg?branch=master https://coveralls.io/repos/github/NicolasLM/spinach/badge.svg?branch=master https://readthedocs.org/projects/spinach/badge/?version=latest

Redis task queue for Python 3 heavily inspired by Celery and RQ.

Distinctive features:

  • At-least-once or at-most-once delivery per task
  • Periodic tasks without an additional process
  • Scheduling of tasks in batch
  • Integrations with Flask, Django, Logging, Sentry and Datadog
  • Embeddable workers for easier testing
  • Python 3, threaded, explicit... see design choices for more details

Quickstart

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()

Documentation

The documentation is at https://spinach.readthedocs.io.

License

BSD 2-clause

You can’t perform that action at this time.