tenant-schemas-celery
Celery integration for django-tenant-schemas and django-tenants
Decision gist · record as of 2026-08-14
Yes—if you use Celery with multi-tenant applications. The package is actively maintained, has no known vulnerabilities, low install friction, and solves the non-trivial problem of schema context management across async task boundaries. The MIT license imposes no restrictions. Install only if you are already committed to both Celery and a multi-tenant architecture; it adds no value as a standalone tool.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.11, a multi-tenant application using django-tenants, and a running Celery worker.
- Low friction: single runtime dependency (celery) and a pure-Python wheel.
- Actively maintained with a recent release (13 days old) and quick issue response, though infrequent commits suggest stable, feature-complete code rather than active development.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations—only attribution required.
last release 2026-08-01 (13 days) · last repo commit 2026-08-11 · 223 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 213,292 downloads/mo, #9,441 on PyPI
Alternatives
Verify before relying
pip install tenant-schemas-celery
from tenant_schemas_celery.app import CeleryApp as TenantAwareCeleryApp
app = TenantAwareCeleryApp()
app.config_from_object('django.conf:settings')
@app.task
def my_task():
print(connection.schema_name)- Whether tenant object caching (tenant_cache_seconds) significantly improves performance in production workloads.
- Behavior and deadlock risk when celery beat attempts to schedule tasks for newly created tenants before migrations complete.
- Compatibility with specific versions of django-tenants and whether the package is tested against the latest releases.
What it is and what it does
tenant-schemas-celery bridges Celery and multi-tenant applications by automatically injecting the current tenant's schema name into task arguments and restoring the correct schema context when tasks execute. This allows background jobs to operate safely within isolated tenant databases without manual schema switching. The package provides a drop-in CeleryApp subclass and a TenantTask base class that transparently handle schema context, plus optional schedulers for celery beat that iterate over all tenant schemas to run periodic tasks in each one.
The package supports multiple databases, tenant object caching to reduce refetch overhead, and database-driven periodic task scheduling. It requires Python >=3.11 and Celery >=5. The codebase is stable and rarely updated, but maintainers respond quickly to issues.
Use it for
- Run background jobs (email, reports, cleanup) for each tenant independently without cross-tenant data leakage.
- Schedule periodic maintenance tasks across all tenants using celery beat.
- Execute long-running operations asynchronously while preserving tenant isolation and schema context.
- Store periodic task definitions per-tenant in the database for dynamic scheduling.
- Cache tenant objects across task retries to reduce database queries in high-frequency scenarios.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes—if you use Celery with multi-tenant applications.
The package is actively maintained, has no known vulnerabilities, low install friction, and solves the non-trivial problem of schema context management across async task boundaries. The MIT license imposes no restrictions. Install only if you are already committed to both Celery and a multi-tenant architecture; it adds no value as a standalone tool.
Install
tenant-schemas-celery on PyPI
Before you install
Low friction: single runtime dependency (celery) and a pure-Python wheel. Actively maintained with a recent release (13 days old) and quick issue response, though infrequent commits suggest stable, feature-complete code rather than active development.
Requires Python >=3.11, a multi-tenant application using django-tenants, and a running Celery worker.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations—only attribution required.
Quickstart
pip install tenant-schemas-celery
from tenant_schemas_celery.app import CeleryApp as TenantAwareCeleryApp
app = TenantAwareCeleryApp()
app.config_from_object('django.conf:settings')
@app.task
def my_task():
print(connection.schema_name)
Verify before relying
- Whether tenant object caching (tenant_cache_seconds) significantly improves performance in production workloads.
- Behavior and deadlock risk when celery beat attempts to schedule tasks for newly created tenants before migrations complete.
- Compatibility with specific versions of django-tenants and whether the package is tested against the latest releases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagecelery |
| Maintenance | Actively maintained 13 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 213,292 / month, #9,441 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: DjangoLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python |
Evidence: tenant_schemas_celery-5.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “celery multi-tenant tasks”
- tenant-schemas-celeryIntegrates Celery task queuing with multi-tenant Django applications…
- dagster-celery-k8sIntegrates Dagster data orchestration with Celery task queue and…
- apache-airflow-providers-celeryIntegrates Celery distributed task execution with Apache Airflow,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also django-tenants · django-celery-beat · django-multitenant · sqlalchemy-celery-beat · celery · dvc-task · celery-singleton · dbt-copilot-python · celery-redbeat · taskiq