django-background-tasks
Database backed asynchronous task queue
What it is and what it does
Django Background Tasks is a database-backed asynchronous task queue for Django applications. Instead of requiring a separate message broker like Redis or RabbitMQ, it stores pending jobs directly in your Django database and executes them via a scheduled process or long-running worker. You define tasks as decorated Python functions, register them with the scheduler, and then run a management command or background process to execute queued jobs.
The package is designed for Django projects that want background job capability without the operational overhead of maintaining a separate queue infrastructure. It trades some performance and scalability for simplicity—suitable for moderate task volumes and non-critical background work. The package supports Django 3.0 through 5.0 and Python 3.8 through 3.12.
Use it for:
- Send emails asynchronously after user signup or form submission without blocking the HTTP response
- Schedule periodic data cleanup, report generation, or batch processing jobs to run outside request cycles
- Defer expensive computations (image resizing, PDF generation) to a background worker to keep web responses fast
- Implement retry logic for flaky external API calls without cluttering your view code
- Queue notifications or webhooks to be delivered reliably even if the initial request fails
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Django Background Tasks is a database-backed task queue for Django that lets you schedule and execute background jobs asynchronously using database storage instead of a separate message broker.
Yes, if you need background task capability in a Django project and want to avoid setting up a separate message broker. The low install friction, permissive license, and stable API make it a practical choice for small to medium workloads. However, the aging maintenance status (last release 728 days ago) means you should verify compatibility with your specific Django and Python versions before committing to production use, and consider a more actively maintained alternative if you need high throughput or strict SLAs.
Install
django-background-tasks on PyPI
pip
pip install django-background-tasksuv
uv add django-background-taskspoetry
poetry add django-background-tasksInstalling django-background-tasks
Before you install
Low install friction with only two runtime dependencies (Django and six). Maintenance status is aging—last release was 728 days ago, though the repository remains active with a recent commit on 2025-06-19 and 623 stars. Suitable for established projects but not under active development.
License in practice
BSD license is permissive, allowing use in commercial and proprietary projects with minimal restrictions. You may use, modify, and distribute the package freely as long as you include the original license notice.
Quickstart
pip install django-background-tasks
from django_background_tasks import background
@background()
def my_task():
pass
my_task()
Requires Django to be installed and configured; tasks execute via a management command or long-running process that polls the database for pending jobs.
Verify before relying
- Whether the package works reliably with Django 5.0 given the aging maintenance status
- Performance characteristics when handling high task volumes in production
- Whether database-backed queueing is suitable for your latency and throughput requirements versus a dedicated broker
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — six, Django |
| Maintenance | aging — 728 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 123,140/month — #11,921 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_background_tasks-1.2.8-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-celery-beatStores Celery periodic task schedules in a…
permissive · top 5,000 on PyPI
django-q2Django Q2 is a multiprocessing distributed task…
permissive · top 15,000 on PyPI
django-dramatiqIntegrates Dramatiq, a distributed task queue,…
unclear · top 15,000 on PyPI
pgqueuerPgQueuer turns PostgreSQL into a background job…
permissive · top 15,000 on PyPI
arqarq provides a job queue system for Python that…
permissive · top 5,000 on PyPI
APSchedulerAPScheduler lets you schedule Python code to…
permissive · top 1,000 on PyPI
saqSAQ is an async job queue framework that runs…
permissive · top 15,000 on PyPI
dvc-taskdvc-task queues and runs background jobs from…
permissive · top 5,000 on PyPI
django-tasksProvides a backport of Django's built-in Tasks…
permissive · top 5,000 on PyPI
rq-schedulerAdds job scheduling capabilities to RQ (Redis…
permissive · top 15,000 on PyPI