Registry / database / django-tasks-db

django-tasks-db

JSON →
library0.12.0pypypi✓ verified 86d ago

An ORM-based backend for Django Tasks, enabling task scheduling and execution using the database as the result store. Current version 0.12.0, requires Python >=3.10 and Django's async tasks framework. Released occasionally with minor updates.

pip install django-tasks-db
INSTALL
IMPORT
SIG · DJANGO-TASKS-DB
D
django-tasks-db
databasepythonv0.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatabaseBackend
✓ from django_tasks_db import DatabaseBackend
✗ from django_tasks_db.backends import DBBackend

Define a simple task and run it synchronously with DBBackend.

import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings') import django django.setup() from django_tasks import task from django_tasks_db.backends import DBBackend from django_tasks_db.settings import apply_defaults apply_defaults() backend = DBBackend() @task(backend) def add(x, y): return x + y future = add(1, 2) print(future.result)
Debug
Known issues
gotchaYou must apply defaults (apply_defaults()) or configure INSTALLED_APPS properly before using DBBackend. Missing this will cause configuration errors.
fix
Call django_tasks_db.settings.apply_defaults() or add 'django_tasks_db' to INSTALLED_APPS and run migrate.
affects: <=0.12.0
gotchaThe Result model must be migrated. Forgetting to run manage.py migrate leads to operational errors like 'no such table'.
fix
Run python manage.py migrate django_tasks_db after installing the library.
affects: all
deprecatedThe old import from django_tasks.backends.db is deprecated and removed in newer versions. Use django_tasks_db.backends instead.
fix
Change imports to from django_tasks_db.backends import DBBackend.
affects: >=0.10.0
gotchaWhen using asynchronous task execution, ensure the Django database supports concurrent access. Using SQLite in production may lead to database locked errors.
fix
Use PostgreSQL or MySQL for production, or configure a proper database backend that handles concurrent writes.
affects: all
Upgrade
Version history
0.12.0latest on PyPI · released Feb 6, 2026
Audit
Dependencies
djangorequiredDjango framework required
django-tasksrequiredBackend for Django Tasks
Agent activity
7 hits · last 30 days
node
6
Resources
django-tasks-db — pip install django-tasks-db · libregistry