Django integration layer for Weft
Project description
weft-django
weft-django is the first-party Django integration for Weft.
It provides:
@weft_taskfor 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
755069d0ecba7c4180a818f6665dfe335f257b097fe75a6ceb3974ab6c6199ca
|
|
| MD5 |
5d9d5cd926ff3888f1c1e154f9bd286d
|
|
| BLAKE2b-256 |
c7609c2a70aa6d07198164d629a07b03024e3aace188414e5388172a28323e35
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
943efba98b0a55a29bff633e18210a785b0fe9502592a6af5a5c4a41b8b91e9b
|
|
| MD5 |
ac97cb98f1c4ce288e7c77b1962e0598
|
|
| BLAKE2b-256 |
69fa594a931046e7c38daec06cad9137f11e3c7e6594f93f10186c2157f3ca84
|