Skip to main content

taskwire

Progress reporting and awaitable dialogs for long-running operations, in Python and TypeScript.

A long-running job — an import, a report, a batch — needs to tell whoever started it what it is doing while it is doing it, and sometimes needs to ask them something before it can continue. taskwire is that conversation, and the four things it carries:

  • progress, with nested subtasks whose percentages compose correctly rather than overwriting each other, and commits coalesced so a tight loop cannot flood anything;
  • awaitable dialogs — the worker asks a question mid-job and blocks until the answer arrives, with the first answer winning across every tab that is looking;
  • cancellation, cooperative and sticky, which raises in the worker at its next progress call;
  • collectable results — the job parks a file or a value for later collection and exits, holding no worker while the record waits.

The one idea worth knowing

The store is the truth; a push is only an accelerator. Every state change is written before anything is sent anywhere, so a dropped, coalesced or suppressed push never changes what the next read returns. There is no event log, no sequence numbers and no replay: a client is entitled to current state, and asking for it is always enough.

One protocol, three implementations

The layering is the shape of the source tree:

             protocol            documents, envelopes, the six kinds, the state
                 │               machines, validation.  Knows of no transport.
     ┌───────────┼───────────┐
   local        REST         WS         three independent implementations of it
     │           │           │
  (none)   fastapi / asgi   muxws       one adapter each, to the world outside

The protocol is specified once and depends on nothing. Each implementation carries it over one medium and is written against the protocol layer alone, never against another implementation. Each adapter is the thin piece that binds an implementation to a particular framework, and is the only place that framework is imported.

Implementation Carries the protocol over Adapter Needs
local the process itself — no wire, no socket, no serialization none nothing
REST request/response polling; the baseline everywhere contrib.viewsets, contrib.fastapi, contrib.asgi nothing in core
WS one push per envelope down, the six calls up, lowest latency contrib.muxws muxws

Swapping one for another changes latency and nothing else — no feature, no state, no document. Both languages ship the protocol and the operating half, so a browser-only application runs operations rather than only watching them; the adapters, the Redis store and the Celery entry are Python's, and the polling client and the register are TypeScript's.

Install

pip install taskwire                 # core: no runtime dependencies at all
pip install "taskwire[redis]"        # cross-process store and backplane
pip install "taskwire[fastapi]"      # the REST adapter
pip install "taskwire[viewsets]"     # the REST API as a fastapi-viewsets viewset
pip install "taskwire[celery]"       # the worker entry point
pip install "taskwire[muxws]"        # the WebSocket transport
npm install taskwire

The demo

pip install -e ".[fastapi,viewsets,demo]" && npm install
python demo.py                       # then open http://127.0.0.1:5174

A night batch over one book: four back-office jobs that between them exercise progress, nested progress, awaitable dialogs, cancellation and collectable results. See demo/README.md.

Status

Pre-1.0 and under active construction. The wire format is versioned independently of the package (Envelope.v), so package semver says nothing about it.

License

MIT. Copyright (c) 2026 Jure Erznožnik.

Metadata

Release files for taskwire 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taskwire 0.4.0
File Size Uploaded Provenance Actions
taskwire-0.4.0.tar.gz 102.3 kB Without provenance Details for taskwire-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for taskwire 0.4.0
File Interpreter ABI Platform Actions
taskwire-0.4.0-py3-none-any.whl Python 3 none any Details for taskwire-0.4.0-py3-none-any.whl

Total release size: 218.2 kB

Release files / taskwire-0.4.0.tar.gz

Download URL taskwire-0.4.0.tar.gz
Size 102.3 kB
Tags Source
SHA-256 checksum
How to use checksums
72734b0d195257d06eca067a2db45f8f465cc0483dd6e59bc046f72e03262e46
BLAKE2b-256 checksum
How to use checksums
faad62c16b5e52b20a475fa9f34edf0ad117d92f7b2e2004334b839d95de8cfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / taskwire-0.4.0-py3-none-any.whl

Download URL taskwire-0.4.0-py3-none-any.whl
Size 115.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87ebf8d460d3e6c87b9ce812fb9b25fa8209cb7515bf229670a4d7bddf9a588f
BLAKE2b-256 checksum
How to use checksums
d7cc3b5eb1ffbd7ad0b7f71bc41e472c49aa990d7e99fbcf95e6adcce9b952f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Security for taskwire 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page