Skip to main content

webprogress-python

The progress-reporter client for webprogress: a drop-in tqdm that renders the usual local progress bar and mirrors each tick, best-effort, to a webprogress server so you can watch a long-running task from your browser dashboard.

Reporting is a transparent side effect — if the server is down, slow, or rejecting, updates are silently dropped and your task runs unaffected.

Install

uv pip install -e .      # or: pip install -e .

Configure

The reporter needs two inputs — a server base address and a credential token (minted in the web UI). Supply them via the environment (optionally a local .env):

export WEBPROGRESS_HOST=http://localhost:8775
export WEBPROGRESS_KEY=<your credential token>

…or directly in code, which takes precedence over the environment.

Use

import time

from webprogress_python import tqdm
from webprogress_python.config import settings

for a in tqdm(range(10), desc="foo", endpoint=settings):
    time.sleep(1)

tqdm accepts all standard tqdm arguments plus:

Argument Meaning
endpoint A Settings (or anything with host/key); defaults to the env-loaded settings.
host Server base address; overrides endpoint.host.
key Credential token; overrides endpoint.key.
script Script the task belongs to; groups tasks on the dashboard.
tags Free-form labels shown as chips on the dashboard (protocol v2).
report_timeout Per-send timeout in seconds, or a (connect, read) tuple.

tags was added in protocol version 2. It is only put on the wire once the client has negotiated a v2 server through the /version handshake — which a Tracker does automatically. Against a v1 server it is silently omitted.

If the handshake finds the server advertising a protocol version this client does not implement (e.g. a newer server), the client cannot safely shape a message for it: it emits an UnsupportedProtocolWarning and disables reporting for that session — nothing is sent to the server. The tracked task still runs unaffected. (A server that is simply unreachable or that advertises no version is different: the client falls back to its default protocol and keeps reporting best-effort.)

A Tracker can set run-wide tags for every bar it creates; a bar's own tags merge on top:

with Tracker(script="train.py", tags=["gpu", "nightly"]) as t:
    for _ in t.tqdm(range(1000), desc="epoch 3/12", tags=["batch-7"]):
        ...

How it works

On each display tick the reporter draws the local bar first, builds one update message from the current progress state (the shared contract), attaches the token, and POSTs it to the server's /handler endpoint with a short timeout. Any transport failure or rejection is caught and ignored.

Develop

uv pip install -e '.[dev]'
pytest

Metadata

Release files for webprogress-python 0.1.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 webprogress-python 0.1.0
File Size Uploaded Provenance
webprogress_python-0.1.0.tar.gz 15.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for webprogress-python 0.1.0
File Interpreter ABI Platform
webprogress_python-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / webprogress_python-0.1.0.tar.gz

Download URL webprogress_python-0.1.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8143b09036d41d0c85be6e2f0a931512782ec08991ea3adc6010f463e08f4427
BLAKE2b-256 checksum
How to use checksums
074712705bd0a988f15d24d87f586a5106b9a4b96c821fdbd382b8ee30f61bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / webprogress_python-0.1.0-py3-none-any.whl

Download URL webprogress_python-0.1.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f718053fe3532da7623c86538fb61e19d29e635cf129c791245384a9247a686
BLAKE2b-256 checksum
How to use checksums
b8c0ebe733534d6b5ed75c7db15362392b8c16b5f398531066640178653e601b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for webprogress-python 0.1.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