Registry / web-framework / django-background-tasks

django-background-tasks

JSON →
library1.2.8pypypi✓ verified 81d ago

Database backed asynchronous task queue for Django. Version 1.2.8. Release cadence: irregular, last release 2020.

pip install django-background-tasks
INSTALL
IMPORT
SIG · DJANGO-BACKGROUND-
D
django-background-tasks
web-frameworkpythonv1.2.8
Install
3.4s avg
Import
Disk
66MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 66.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.000s · 67MB
66MB installed
● package 66MB
Code
Verified usage

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

background
from background_task import background
from background_task import background_task
default_app_config
from background_task import default_app_config

Define a task using the decorator and run the worker.

# models.py def print_hello(): from background_task import background_task @background_task(schedule=10) def hello(name): print("Hello %s" % name) hello("World", schedule=10) # run: python manage.py process_tasks
Debug
Known issues
gotchaThe decorator-based task registration must be called at module import time; tasks defined inside functions or conditionally may not be registered.
fix
Place @background_task decorator on top-level functions.
affects: all
deprecatedRemoved log options from management command; use Django LOGGING setting.
fix
Configure logging in settings.py, not via command-line options.
affects: >=1.1.0rc2
Upgrade
Version history
1.2.8latest on PyPI · released Aug 16, 2024
Audit
Dependencies
DjangorequiredRequired; compatible with Django 1.8+ to 3.x
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
django-background-tasks — pip install django-background-tasks · libregistry