Long-running operations with live WebSocket+HTMX UI (no reload, no polling)
Project description
django-liveops
A standalone, reusable Django package for long-running operations with a live WebSocket + HTMX user interface — no page reloads, no polling.
Installation
pip install django-liveops
# optional extras:
pip install django-liveops[redis] # Redis channel layer (production)
pip install django-liveops[celery] # Celery worker runner
pip install django-liveops[cli] # tqdm progress bar for text mode
Requires Python 3.11+ and Django 5.2+. See the Getting Started guide for the full setup (channels, ASGI, settings).
The developer writes one method:
from liveops.models import LiveOperation
from liveops.progress import Progress
class MyImport(LiveOperation):
def run(self, p: Progress):
for row in p.track(rows, label="Processing"):
process(row)
p.log(f"done: {row}")
p.result()
The framework handles channels, tokens, OOB-swaps, snapshot-on-connect, throttling, and cooperative cancellation.
Try the demo
A self-contained demo project lives in example/.
# Browser demo — Daphne + Redis + Celery worker, live WebSocket progress.
# Opens http://localhost:8000 (needs Docker).
make demo
# Zero-infra text demo — runs synchronously, prints progress to stdout.
# No Docker, no Redis, no browser.
make demo-text
Both targets also work from inside example/ (cd example && make demo);
the root make just delegates there. See example/README.md
for what you'll see and how the demo is wired.
Documentation
Full docs are published at
https://iplweb.github.io/django-liveops/ (source in docs/).
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
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 django_liveops-0.2.0.tar.gz.
File metadata
- Download URL: django_liveops-0.2.0.tar.gz
- Upload date:
- Size: 271.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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 |
bdcd6e3e3960173d56bc7caec832aab11ba3c030063353c475fd9fd7953da77c
|
|
| MD5 |
02f2985585fa72ceefa2957518268bf3
|
|
| BLAKE2b-256 |
9647c7b5b0476c31bb98ee5877f0992e3c0cb4e33c4cc5a46c518953e996d42b
|
File details
Details for the file django_liveops-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_liveops-0.2.0-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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 |
4e943f50f21769b70c849d8080ff1c0d6d83f05ec1d6d5c04c93d58881698833
|
|
| MD5 |
032f04fc258f6fcf4e37c95f2ea1c348
|
|
| BLAKE2b-256 |
b8066799e3a9246df99401125d4b1b7ff868773a1f48672424d75a9cc0ad7112
|