Celery

Distributed task queue for running asynchronous jobs, scheduled work, and complex workflows across Python applications at scale.

Library
PyPI
v5.6.3
28,863stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
92/100Excellent
Development Activity100
Maintenance84
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
90/100Excellent
Architecture90
Code Quality88
Innovation80
Learning Curve100

Celery is the standard distributed task queue for Python. An application defines a Celery instance, decorates functions with @app.task, and Celery takes care of routing each call as a message to a broker (RabbitMQ, Redis, Amazon SQS, and others) where a pool of worker processes picks it up and executes it out-of-band from the request/response cycle. It requires no configuration files to get started, retries automatically on connection loss, and can scale from a single machine to a fleet of workers spread across datacenters.

Beyond simple fire-and-forget jobs, Celery’s canvas API (chain, group, chord, chunks) composes tasks into multi-step workflows — running steps in sequence, fanning work out in parallel, or collecting results from a group into a callback. Celery Beat adds cron-like periodic scheduling, and results can be stored in Redis, a database, or a cache backend for later retrieval. Because the wire protocol is broker-based rather than Python-specific, Celery interoperates with non-Python workers and integrates cleanly into Django, Flask, and FastAPI applications without needing a dedicated integration package.

What You Get

  • A Celery app object and @app.task decorator for turning any Python function into an asynchronously executable unit of work
  • Pluggable broker and result-backend support — RabbitMQ, Redis, Amazon SQS, SQLAlchemy, MongoDB, and more
  • A canvas API (chain, group, chord, chunks, map/starmap) for composing tasks into sequential, parallel, and callback-driven workflows
  • Celery Beat for cron-style periodic task scheduling without an external scheduler
  • Multiple concurrency pools — prefork (multiprocessing), threads, eventlet, and gevent — selectable per deployment
  • Automatic retry, rate limiting, task revocation, and result expiry built into the worker and task lifecycle
  • A CLI (celery worker, celery beat, celery inspect, celery control) for running, monitoring, and managing workers in production

Common Use Cases

  • Offloading slow operations (sending email, generating PDFs, processing uploads, calling third-party APIs) out of a web request so responses stay fast
  • Running scheduled/periodic jobs — nightly reports, cache warmups, cleanup tasks — via Celery Beat instead of cron
  • Building multi-step data pipelines with chain/chord, where each stage runs as an independent, retryable, horizontally scalable worker task
  • Fan-out/fan-in processing — splitting a large batch into a group of parallel subtasks and aggregating results in a chord callback
  • Decoupling microservices via a message broker so producers and consumers scale independently of each other

Under The Hood

Architecture Celery is organized around a central Celery app instance (celery/app/base.py) that owns configuration, task registration (TaskRegistry), signal dispatch, and broker connection management; tasks defined with @app.task become Signature-based proxy objects (celery/canvas.py) that can be composed into chain, group, and chord workflows before being serialized and sent through an AMQP-style transport layer provided by the separate Kombu library. On the consumption side, celery/worker/ implements the actual process/thread pool (concurrency/prefork.py, eventlet.py, gevent.py, thread.py), a Bootstep-based startup sequence (bootsteps.py) that wires up connection, consumer, and pool components independently, and worker/request.py/worker/strategy.py handling per-message execution, retries, and revocation. This bootstep/component design lets brokers, pools, and result backends be swapped without touching task-authoring code — the core abstraction that would be most disruptive to change is the Signature object, since canvas composition, serialization, and the worker’s execution trace (app/trace.py) all depend on its shape.

Tech Stack Celery is pure Python (3.9–3.13, plus PyPy3.9+) built on top of its own sibling libraries: Kombu for messaging/transport abstraction, Billiard for the enhanced multiprocessing pool, and Vine for promise-style callback chaining. The CLI is built on Click (click, click-didyoumean, click-repl, click-plugins), with python-dateutil for schedule parsing and tzlocal/tzdata for timezone handling. Broker and backend support is delivered through optional extras (celery[redis], celery[sqs], celery[sqlalchemy], celery[elasticsearch], and many more) rather than hard dependencies, keeping the core install lean while supporting a wide array of production backends including Redis, RabbitMQ, Amazon SQS, MongoDB, Cassandra, and several cloud object stores as result backends.

Code Quality The project has a large, well-organized test suite split into t/unit (per-module unit tests mirroring the celery/ package layout), t/integration, and t/smoke (Docker-based end-to-end scenarios using pytest-docker-tools with automatic retries), all run through pytest and coordinated via tox.ini across unit/integration/smoke environments. CI (GitHub Actions) runs a dedicated linter workflow, CodeQL and Semgrep static analysis, and a matrix Python-package test workflow; pyproject.toml configures mypy (targeted at core modules with disallow_untyped_defs) and flake8/codespell. Error handling is deliberately explicit throughout the worker and app layers, with a dedicated celery.exceptions module and structured retry/revocation paths rather than broad exception swallowing.

What Makes It Unique Celery’s canvas primitives (chain, group, chord, chunks, map/starmap) give it a workflow-composition capability that goes well beyond simple task dispatch — tasks can be wired into arbitrarily nested pipelines with fan-out/fan-in semantics and callback-driven completion, all serializable and inspectable before execution. Combined with a broker-agnostic protocol (the same task can, in principle, be consumed by non-Python workers implementing the protocol) and a pluggable concurrency-pool model that lets a single codebase run under prefork, eventlet, or gevent depending on the I/O profile of its tasks, Celery covers a broader workflow-orchestration surface than most background-job libraries in its category, which tend to focus on simple enqueue/dequeue semantics.

Used by 16 apps in this directory

Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,755

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python90%
Updated yesterday
Python
68%
Other

Baserow

No Code Platforms · Databases

5,830

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python68%
JavaScript16%
Vue12%
Updated yesterday
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

154,649

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
67
Dependency
Built with
TypeScript50%
Python46%
Updated yesterday
Python
50%
MIT

Docs

File Storage · CMS

16,788

Open-source collaborative knowledge platform with real-time editing, AI writing tools, and full self-hosting control — built by the French and German governments.

View details
88
Repo Health
81
Technical
71
Dependency
Built with
Python50%
TypeScript42%
Updated yesterday
C++
74%
Other

Dragonfly

Databases · Developer Tools · Devops

31,438

A modern Redis and Memcached replacement engineered for multi-core servers — delivering 25x more throughput, better cache hit rates, and up to 80% lower memory consumption with full API compatibility.

View details
90
Repo Health
9
Technical
71
Dependency
Built with
C++74%
Python16%
Updated yesterday
TypeScript
53%
Apache 2.0

Flowsint

Automation · Developer Tools

7,800

A privacy-first, graph-based OSINT investigation platform with 30+ automated enrichers for mapping relationships between domains, IPs, people, and organizations.

View details
85
Repo Health
71
Technical
70
Dependency
Built with
TypeScript53%
Python44%
Updated yesterday
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,372

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
65
Dependency
Built with
TypeScript71%
Go16%
Updated 2 weeks ago
Python
85%
Apache 2.0

knowhere

AI Development · Developer Tools

2,942

Transform messy, unstructured documents into persistent, navigable memory that AI agents can actually use.

View details
83
Repo Health
75
Technical
69
Dependency
Built with
Python85%
HTML15%
Updated yesterday
Python
45%
GPL 3.0

MaxKB

AI Development · Knowledge Management

22,727

Build enterprise-grade AI agents with RAG, workflows & multi-modal support

View details
91
Repo Health
68
Technical
66
Dependency
Built with
Python45%
Vue37%
TypeScript17%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search