skillfed

django-background-tasks

Database backed asynchronous task queue

django-background-tasks v1.2.8 123.1K downloads/30d#11,921 on PyPI623
Permissive license BSD AGING released

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-tasks

uv

uv add django-background-tasks

poetry

poetry add django-background-tasks

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.0Framework :: Django :: 4.0Framework :: Django :: 5.0Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

django background task queuedatabase-backed async tasks djangodjango delayed jobschedule background jobs djangodjango task schedulingasynchronous task execution djangodjango work queue
django-integrationtask-queuedatabase-backed

More Python Modules packages