django-absurd¶
Run background tasks in Django on Postgres — no separate broker, no Redis, no Celery. It plugs Absurd, a Postgres-native workflow engine, into Django's built-in Tasks framework and reuses your existing database connection.
Alpha
APIs and behavior may change between releases.
Requirements¶
- Python 3.12+, Django 6.0+
- PostgreSQL with the psycopg (v3) driver (
django.db.backends.postgresql). Absurd reuses Django's connection — psycopg2 won't work.
Install¶
django-absurd is in alpha — only pre-releases are published, so your installer must be allowed to pick them up.
Using pip:
Quickstart¶
1. Add the app and point Django's TASKS setting at the backend:
INSTALLED_APPS = [
# ...
"django_absurd",
]
TASKS = {
"default": {
"BACKEND": "django_absurd.backends.AbsurdBackend",
},
}
2. Migrate. This installs Absurd's schema and provisions your declared queues:
3. Write a task with Django's @task decorator — anywhere importable:
4. Enqueue it. Returns a TaskResult; a worker runs it:
5. Run a worker:
That's the whole loop. The task runs on the worker, and the
result is stored in Postgres — fetch it later with
add.get_result(result.id).
Next¶
- Tasks — enqueue with retries and other options, and read results.
- Configuration — every setting, in one place.
- How it works — how queues, runs, checkpoints, and the admin fit together, with links to the Absurd and Django docs.