{"id":44766,"library":"django-tasks-db","title":"Django Tasks DB","description":"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.","status":"active","version":"0.12.0","language":"python","source_language":"en","source_url":"https://github.com/RealOrangeOne/django-tasks-db","tags":["django","tasks","orm","backend","async"],"install":[{"cmd":"pip install django-tasks-db","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Django framework required","package":"django","optional":false},{"reason":"Backend for Django Tasks","package":"django-tasks","optional":false}],"imports":[{"wrong":"from django_tasks_db.backends import DBBackend","symbol":"DatabaseBackend","correct":"from django_tasks_db import DatabaseBackend"}],"quickstart":{"code":"import os\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')\nimport django\ndjango.setup()\nfrom django_tasks import task\nfrom django_tasks_db.backends import DBBackend\nfrom django_tasks_db.settings import apply_defaults\n\napply_defaults()\nbackend = DBBackend()\n@task(backend)\ndef add(x, y):\n    return x + y\n\nfuture = add(1, 2)\nprint(future.result)","lang":"python","description":"Define a simple task and run it synchronously with DBBackend."},"warnings":[{"fix":"Call django_tasks_db.settings.apply_defaults() or add 'django_tasks_db' to INSTALLED_APPS and run migrate.","message":"You must apply defaults (apply_defaults()) or configure INSTALLED_APPS properly before using DBBackend. Missing this will cause configuration errors.","severity":"gotcha","affected_versions":"<=0.12.0"},{"fix":"Run python manage.py migrate django_tasks_db after installing the library.","message":"The Result model must be migrated. Forgetting to run manage.py migrate leads to operational errors like 'no such table'.","severity":"gotcha","affected_versions":"all"},{"fix":"Change imports to from django_tasks_db.backends import DBBackend.","message":"The old import from django_tasks.backends.db is deprecated and removed in newer versions. Use django_tasks_db.backends instead.","severity":"deprecated","affected_versions":">=0.10.0"},{"fix":"Use PostgreSQL or MySQL for production, or configure a proper database backend that handles concurrent writes.","message":"When using asynchronous task execution, ensure the Django database supports concurrent access. Using SQLite in production may lead to database locked errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.12.0':26 '3.10':29 'async':33,45 'backend':8,44 'base':7 'current':24 'databas':19 'db':3 'django':1,10,31,41 'enabl':12 'execut':16 'framework':35 'minor':39 'occasion':37 'orm':6,43 'orm-bas':5 'python':28 'releas':36 'requir':27 'result':22 'schedul':14 'store':23 'task':2,11,13,34,42 'updat':40 'use':17 'version':25","created_at":"2026-06-07T12:51:43.655768+00:00","updated_at":"2026-06-07T12:51:43.655768+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/RealOrangeOne/django-tasks-db","github":"https://github.com/RealOrangeOne/django-tasks-db","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}