Skip to main content

Django integration layer for Weft

Project description

weft-django

weft-django is the first-party Django integration for Weft.

It provides:

  • @weft_task for Django-owned synchronous background functions
  • transaction-safe submission helpers such as enqueue_on_commit()
  • native TaskSpec, stored spec, and pipeline submission helpers
  • read-only Django URLs for task inspection
  • Django management commands for task status and control

Install:

uv add weft-django

Or from the main package convenience extra:

uv add "weft[django]"

Basic usage:

from weft_django import weft_task


@weft_task(name="billing.send_invoice", timeout=60)
def send_invoice(invoice_id: int) -> None:
    ...


submission = send_invoice.enqueue(123)
submission.result(timeout=30)

Celery migration guide:

Celery habit weft-django
@shared_task @weft_task
task.delay(...) task.enqueue(...)
transaction.on_commit(lambda: task.delay(...)) task.enqueue_on_commit(...)

delay and shared_task are intentionally not shipped. They are close enough to invite mechanical porting and far enough from Weft semantics to create delayed failures.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weft_django-0.9.4.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weft_django-0.9.4-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file weft_django-0.9.4.tar.gz.

File metadata

  • Download URL: weft_django-0.9.4.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for weft_django-0.9.4.tar.gz
Algorithm Hash digest
SHA256 755069d0ecba7c4180a818f6665dfe335f257b097fe75a6ceb3974ab6c6199ca
MD5 5d9d5cd926ff3888f1c1e154f9bd286d
BLAKE2b-256 c7609c2a70aa6d07198164d629a07b03024e3aace188414e5388172a28323e35

See more details on using hashes here.

File details

Details for the file weft_django-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: weft_django-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for weft_django-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 943efba98b0a55a29bff633e18210a785b0fe9502592a6af5a5c4a41b8b91e9b
MD5 ac97cb98f1c4ce288e7c77b1962e0598
BLAKE2b-256 69fa594a931046e7c38daec06cad9137f11e3c7e6594f93f10186c2157f3ca84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page