Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

taskferry-django

Latest version: v0.4.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
PyPI package Publisher: cesar-benjamin
0 Stars
0 Forks
3 Versions
188 Downloads
Python Repo language

Scan summary

taskferry-django was last scanned on 28 Nov 2026 at version 0.4.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published within 2 days (27 and 28 Nov 2026).
  • Findings: No rules fired in version 0.4.0.
  • Downloads: 188 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.4.0 LATEST 28 Nov 2026 No rules fired
0.3.1 27 Nov 2026 No rules fired
0.3.0 27 Nov 2026 No rules fired

No rules fired in 0.4.0

Findings

Findings for v0.4.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.4.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

taskferry-django

Django integration for Taskferry.

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

    DJ --> TPD --> TP

This package supports Django 6.0+ native django.tasks. Django introduced that API in 6.0; this package imports it directly and does not integrate the third-party django-tasks backport. Taskferry does not invent a parallel API. 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": {
        "celery": {"factory": "celery", "app": "myproject.celery:app"},
        "gcp": {
            "factory": "cloudtasks",
            "project": "my-project",
            "location": "us-central1",
            "url": "https://example.run.app/_taskferry/execute",
        },
    },
    "routes": [
        {"kind": "task", "queue": "local-workers", "backend": "celery"},
        {"kind": "task", "queue": "serverless", "backend": "gcp"},
    ],
    "defaults": {"task": "celery"},
}

For Celery, configure broker/result storage on myproject.celery:app itself; the backend name in Taskferry chooses the Celery execution adapter, while Celery chooses its broker and optional result store. Change the queue routes or default to move Django tasks between Celery and Cloud Tasks without changing task code.

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

Choosing execution and storage

Choose an engine through TASKFERRY.backends and route queues with the usual routes/defaults configuration. Django's native Tasks API is the enqueue interface; it does not include a production queue or durable task store. Provider integrations are separate optional distributions:

pip install taskferry-django taskferry-celery[celery]
# If Redis is your chosen Celery broker and/or result backend:
pip install 'taskferry-celery[redis]'
# If RabbitMQ is your chosen Celery broker:
pip install 'taskferry-celery[rabbitmq]'
# For GCP push delivery:
pip install taskferry-django 'taskferry-cloudtasks[gcp]'

Celery's broker and result backend are configured on the Celery app, independently of Taskferry routing. Redis is optional; Celery can use other supported brokers and result stores, or run without result storage. The rabbitmq extra is an installation alias; Celery includes its AMQP transport. RabbitMQ can also use Celery's transient rpc:// result backend, or pair with a separate database result backend. The Taskferry Celery adapter advertises result retrieval only when app.conf.result_backend is configured. Cloud Tasks is a push queue: it cannot report execution state or persist return values, so persist progress and results in application-owned storage if required.

Taskferry serializes task names and arguments as JSON; pass identifiers or other JSON-safe values, never ORM instances or pickled objects. Cloud Tasks provides time-bounded task-name deduplication when an idempotency key is supplied; Celery does not, so keyed submissions are rejected there. Cloud Tasks and Celery retry through their native engines according to the Taskferry retry policy. Delivery can be duplicated: make task handlers idempotent. Celery revoke is best effort and does not interrupt a running handler; Cloud Tasks does not expose cancellation. Taskferry has no portable progress reporting contract yet. Celery's persisted state can show queued/started/terminal state when configured, but richer progress belongs in application storage.

Portable per-task retries

Declare retry intent with Taskferry's provider-neutral RetryPolicy. Django 6.1 passes custom @task() options to the configured backend's task class, so use the native decorator form:

from django.tasks import task
from taskferry import Backoff, RetryPolicy


@task(
    retry_policy=RetryPolicy(
        max_attempts=4,  # includes the first attempt
        backoff=Backoff.EXPONENTIAL,
        initial_delay=2,
        max_delay=30,
        jitter=True,
        retry_on=("ConnectionError", "myapp.errors.TemporaryFailure"),
    )
)
def refresh_index(index_id: int) -> None: ...

For Django 6.0, whose @task does not accept backend-specific keyword arguments, attach the same policy before decorating:

from django.tasks import task
from taskferry import RetryPolicy
from taskferry_django import with_retry_policy


@task
@with_retry_policy(RetryPolicy(max_attempts=4, initial_delay=2))
def refresh_index(index_id: int) -> None: ...

With no policy, the backend keeps the current behavior: one attempt. A policy uses total attempts including the first; exception filters match exception class names or fully qualified class names, and no_retry_on takes precedence over retry_on. Delays are deterministic in the portable policy; Celery applies jitter when requested. Exactly one layer owns retries: by default the selected provider applies the policy. owner=RetryOwner.APPLICATION reserves retrying for application code and configures one provider attempt; RetryOwner.NONE disables retries.

Cloud Tasks supports a per-task RetryConfig, which overrides queue retry settings. Taskferry sets it for every submitted task, including a one-attempt configuration when no policy is declared, so queue-wide retries do not silently change Django task semantics. Cloud Tasks has no jitter setting; jitter is ignored there. Its backoff durations have whole-second precision, so a policy with subsecond or immediate delays, more than 100 attempts, or backoff over one hour is rejected at submission. It has no exception-class filter: the receiver acknowledges a non-matching exception with HTTP 204 to stop further delivery and logs it. Cloud Tasks deletes completed and exhausted tasks, so this does not create a durable failure record. Persist outcomes in your own storage when you need them. The gcp extra requires google-cloud-tasks>=2.26 for task-level retry configuration.

TaskContext and provider ids

Tasks declared with Django's native @task(takes_context=True) receive Django's TaskContext from the Taskferry dispatcher. context.task_result.id is the portable Taskferry execution id; the enqueue result exposes the provider's separate native id as result.provider_id (for example, a Celery task UUID or a Cloud Tasks resource name). Reading provider_id does not require get_result() or a provider state lookup.

Context tasks are accepted only on backends that supply the portable execution id and current attempt: the local thread backend, Celery, and Cloud Tasks. Other adapters reject them before enqueueing until they can provide that metadata. Celery uses its retry counter; Cloud Tasks uses X-CloudTasks-TaskRetryCount + 1; the thread backend counts its own retry loop. The context result is marked RUNNING, has current arguments and the observed start time, and reports the current attempt. enqueued_at is None because the dispatcher cannot recover the provider's enqueue timestamp. Prior attempt errors and worker history are not persisted by Taskferry; worker ids are included only when the engine exposes the current worker id. These fields are not a substitute for a durable Django TaskResult store, and get_result() remains unsupported.

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.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases taskferry-django

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Frame 2085668439 (1)
Group 1261154229