All Projects → mjwestcott → Fennel

mjwestcott / Fennel

Licence: mit
A task queue library for Python and Redis

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fennel

Arq
Fast job queuing and RPC in python with asyncio and redis.
Stars: ✭ 695 (+2795.83%)
Mutual labels:  async, asyncio, redis, queue
Redis Smq
A simple high-performance Redis message queue for Node.js.
Stars: ✭ 230 (+858.33%)
Mutual labels:  redis, jobs, queue
Flask Rq2
A Flask extension for RQ.
Stars: ✭ 176 (+633.33%)
Mutual labels:  redis, jobs, queue
Rq
Simple job queues for Python
Stars: ✭ 8,065 (+33504.17%)
Mutual labels:  async, task, redis
Foundatio
Pluggable foundation blocks for building distributed apps.
Stars: ✭ 1,365 (+5587.5%)
Mutual labels:  redis, jobs, queue
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+3970.83%)
Mutual labels:  async, redis, queue
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+24154.17%)
Mutual labels:  task, redis, queue
Node Celery
Celery client for Node.js
Stars: ✭ 648 (+2600%)
Mutual labels:  task, redis, queue
qless-php
PHP Bindings for qless
Stars: ✭ 25 (+4.17%)
Mutual labels:  task, queue, jobs
Task Easy
A simple, customizable, and lightweight priority queue for promises.
Stars: ✭ 244 (+916.67%)
Mutual labels:  async, task, queue
Fastapi Plugins
FastAPI framework plugins
Stars: ✭ 104 (+333.33%)
Mutual labels:  async, asyncio, redis
spinach
Modern Redis task queue for Python 3
Stars: ✭ 46 (+91.67%)
Mutual labels:  queue, jobs, asyncio
rearq
A distributed task queue built with asyncio and redis, with built-in web interface
Stars: ✭ 81 (+237.5%)
Mutual labels:  task, queue, asyncio
Janus
Thread-safe asyncio-aware queue for Python
Stars: ✭ 475 (+1879.17%)
Mutual labels:  asyncio, queue
Groupco
PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Stars: ✭ 473 (+1870.83%)
Mutual labels:  async, redis
Then
🎬 Tame async code with battle-tested promises
Stars: ✭ 908 (+3683.33%)
Mutual labels:  async, task
Background
Runs things in the background.
Stars: ✭ 497 (+1970.83%)
Mutual labels:  background, jobs
Ring
Python cache interface with clean API and built-in memcache & redis + asyncio support.
Stars: ✭ 404 (+1583.33%)
Mutual labels:  asyncio, redis
Aiojobs
Jobs scheduler for managing background task (asyncio)
Stars: ✭ 492 (+1950%)
Mutual labels:  asyncio, jobs
Aiocache
Asyncio cache manager for redis, memcached and memory
Stars: ✭ 496 (+1966.67%)
Mutual labels:  asyncio, redis

Fennel

A task queue for Python 3.7+ based on Redis Streams with a Celery-like API.

https://fennel.dev/

Note: This is an alpha release. The project is under development, breaking changes are likely.

Features

  • Supports both sync (e.g. Django, Flask) and async (e.g. Starlette, FastAPI) code.
  • Sane defaults: at least once processing semantics, tasks acknowledged on completion.
  • Automatic retries with exponential backoff for fire-and-forget jobs.
  • Clear task statuses available (e.g. sent, executing, success).
  • Automatic task discovery (defaults to using **/tasks.py).
  • Exceptionally small and understandable codebase.

Installation

pip install fennel

Basic Usage

Run Redis and then execute your code in tasks.py:

from fennel import App

app = App(name='myapp', redis_url='redis://127.0.0.1')


@app.task
def foo(n):
    return n


# Enqueue a task to be executed in the background by a fennel worker process.
foo.delay(7)

Meanwhile, run the worker:

$ fennel worker --app tasks:app

Asynchronous API

Fennel also supports an async API. If your code is running in an event loop (e.g. via Starlette or FastAPI), you will want to use the async interface instead:

from fennel import App

app = App(name='myapp', redis_url='redis://127.0.0.1', interface='async')


@app.task
async def bar(x):
    return x


await bar.delay(5)

See also

If you need to ensure that all tasks for a given key are processed in-order, please see our sister project Runnel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].