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.0
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.0.tar.gz | 278.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_liveops-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 357.1 kB
Release files / django_liveops-0.4.0.tar.gz
| Download URL | django_liveops-0.4.0.tar.gz |
|---|---|
| Size | 278.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afec32be5093e5906e9e10818b128db30ebb20f39800a0fa2cd8392ba2bd23dd
|
|
BLAKE2b-256 checksum How to use checksums |
10294123555061c6f6f8bd7eeb83113e7cdb7a9a8989049ea15a30ce9841f90b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.2
|
Release files / django_liveops-0.4.0-py3-none-any.whl
| Download URL | django_liveops-0.4.0-py3-none-any.whl |
|---|---|
| Size | 78.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43bd5150efe642b65f3bd62a4ebcee6e361abb739d7d8ffd0346f07911ed3e84
|
|
BLAKE2b-256 checksum How to use checksums |
d27f2143a3d82b68bb97a54b31ba9d0b2fe3cb1a4d2b02025b1b53527be194d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.2
|