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.
Styling
The package ships a neutral default stylesheet (liveops/liveops.css) for the
live-operation components — progress bar, stage stepper, status line, log,
result box and the cancel/retry controls. The built-in operation.html
template loads it automatically; render {% live_operation %} in your own
template and you can add
<link rel="stylesheet" href="{% static 'liveops/liveops.css' %}"> yourself.
It's framework-agnostic, low-specificity CSS — override any rule from your own
stylesheet, or drop it and style the semantic classes directly.
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.
Release files for django-liveops 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_liveops-0.4.1.tar.gz | 279.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_liveops-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 357.5 kB
Release files / django_liveops-0.4.1.tar.gz
| Download URL | django_liveops-0.4.1.tar.gz |
|---|---|
| Size | 279.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c6903881f26f287ce642503726172a650f846ab3b031879ed28655fdd6a2aa9
|
|
BLAKE2b-256 checksum How to use checksums |
78eeee27891ea2e81d44b3d100b3b2b03b6fee2775bfe895bd98fd48d75fb7d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / django_liveops-0.4.1-py3-none-any.whl
| Download URL | django_liveops-0.4.1-py3-none-any.whl |
|---|---|
| Size | 78.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb33fbc19fd35346285883251c093cf0f7c73efe26c871fa9ba01d48dc168171
|
|
BLAKE2b-256 checksum How to use checksums |
f09f136cc2f536637baec3ed11fd777d7c57bb127b1ae6ef13f8bb4282405790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|