Modern Redis task queue for Python 3
Project description
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
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.
IRC channel for online discussions #spinach on irc.libera.chat.
License
BSD 2-clause
Copyright (c) 2017-2021, Nicolas Le Manchet All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spinach-0.0.25.tar.gz
.
File metadata
- Download URL: spinach-0.0.25.tar.gz
- Upload date:
- Size: 42.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 727fa4b4fbd22e34aae79d60a86d82cf48106dd7e8df64e4e74fa98d2d45585e |
|
MD5 | e8379adee36dd5ba65c96f6effded379 |
|
BLAKE2b-256 | 8ed869d766db9890be8adc71793e8d840b02c3bc7bdd30bf5a11d5a2bd7569f5 |
File details
Details for the file spinach-0.0.25-py3-none-any.whl
.
File metadata
- Download URL: spinach-0.0.25-py3-none-any.whl
- Upload date:
- Size: 43.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e0730a535f16dbded708bf67e543a9ea0de948205931c4f849a6e8e3704b1c |
|
MD5 | 5eaa53b7614cba260da61a5c10f6f7c0 |
|
BLAKE2b-256 | 4e381af9d7bcd50688ccb513c056117dcc6e7c825c70c5437cd52cf283be2deb |