Skip to main content

taskferry-django

Django integration for Taskferry.

flowchart BT
    DJ["Django"]
    TPD["taskferry-django"]
    TP["taskferry"]

    DJ --> TPD --> TP

Taskferry does not invent a parallel task API — Django 6 already has one. This package supplies a backend for the standard TASKS setting, so your @task code never changes while the engine behind it becomes a configuration choice.

pip install taskferry-django taskferry-procrastinate

Your code never changes

# myapp/tasks.py
from django.tasks import task


@task
def resize_image(image_id: int) -> None: ...
# anywhere
resize_image.enqueue(42)

Settings

TASKS = {"default": {"BACKEND": "taskferry_django.TaskferryBackend"}}

TASKFERRY = {
    "backends": {
        "pg": {"factory": "procrastinate", "app": "myapp.tasks:app"},
        "heavy": {"factory": "cloudrun", "project": "p", "location": "europe-west1"},
    },
    "routes": [
        {"kind": "task", "queue": "metadata", "backend": "pg"},
        {"kind": "job", "profile": "heavy", "backend": "heavy"},
    ],
    "defaults": {"task": "pg", "job": "heavy"},
}

With no TASKFERRY setting at all, everything runs locally — a fresh project works immediately and is obviously not production.

What else you get

Enqueue after commit. The classic race — a worker reaching a row before the transaction that created it commits — with the classic fix:

from django.db import transaction
from taskferry_django import task_on_commit


def create_order(request):
    with transaction.atomic():
        order = Order.objects.create(...)
        task_on_commit("myapp.tasks:process_order", order.id)

System checks. manage.py check builds every configured backend, because "the adapter is installed" and "the adapter works with these options" are different questions:

taskferry.E002  the Taskferry backend 'heavy' cannot be built: CloudRunJobBackend
               needs both 'project' and 'location'
taskferry.W003  DEBUG is False but these Taskferry backends run in this process and
               lose pending work on restart: fast

The CLI, with settings loaded.

python manage.py taskferry doctor
python manage.py taskferry capabilities pg

Jobs and inline execution, through the same runtime:

from taskferry_django import get_runtime

get_runtime().jobs.submit("build-cog", image="gdal:latest", profile="heavy")

The dependency direction

taskferry never imports Django. The test suite for the core runs — and CI runs it — in an environment where Django is not installed. The same TASKFERRY dict works verbatim in a FastAPI service, a CLI or a library.

License

Apache-2.0.

Release files for taskferry-django 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskferry-django 0.2.0
File Size Uploaded
taskferry_django-0.2.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskferry-django 0.2.0
File Interpreter ABI Platform
taskferry_django-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / taskferry_django-0.2.0.tar.gz

Download URL taskferry_django-0.2.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
691db5afb11a81be222d56b7b6c93d77e2c30aa708c909afea8e3866aa71b503
BLAKE2b-256 checksum
How to use checksums
b5b42574cf85000c161a4e35cbe034b21ed10da7932d28e1276967700fe95cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / taskferry_django-0.2.0-py3-none-any.whl

Download URL taskferry_django-0.2.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f1da767e2ea8a07839deb8734ee7b3bd7cc1259a3303d52b6849c7584f1a56a
BLAKE2b-256 checksum
How to use checksums
08040029b535a1f6b97bf7f0c81845f1853a2ebe5b5c2dd06b8fc66f443e9d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page