Skip to main content

Context Progress

Context Progress lets you emit progress updates from anywhere in a call chain without passing progress objects through every function.

It uses a context-local task stack, so nested work can report progress via a small global API.

Install

Base package:

uv add context-progress

With Rich integration:

uv add 'context-progress[rich]'

Core API

  • add(backend): register a backend for the current context.
  • remove(backend): unregister a backend.
  • subtask(name, description=None, total=None): create a nested task scope.
  • update(description=..., total=..., advance=...): push updates to all active backends.

RichProgress

context_progress.richprogress.RichProgress is a Rich backend for the core API.

Use RichProgress.session(...) for the simplest setup. It creates an SProgress instance, registers the backend on enter, and unregisters it on exit.

from time import sleep

from rich.progress import BarColumn, TaskProgressColumn, TextColumn, TimeElapsedColumn

from context_progress import subtask, update
from context_progress.richprogress import RichProgress


def run_step(description: str, total: int, delay: float = 0.1) -> None:
	update(description=description)
	for _ in range(total):
		sleep(delay)
		update(advance=1)


with RichProgress.session(
	TextColumn("[progress.description]{task.description}"),
	BarColumn(),
	TaskProgressColumn(),
	TimeElapsedColumn(),
):
	with subtask("download", total=2):
		run_step("metadata", total=2)
		with subtask("artifacts", total=3):
			run_step("files", total=3)

For a complete runnable example, see examples/richprogress.py.

RichProgress Behavior

  • Nested subtasks are indented for readability.
  • Child tasks are inserted directly after their parent in render order.
  • Updating a RichTask description keeps the task name as a prefix.

Metadata

Release files for context-progress 0.1.5

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

Source distribution (sdist)

Source distribution for context-progress 0.1.5
File Size Uploaded
context_progress-0.1.5.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for context-progress 0.1.5
File Interpreter ABI Platform
context_progress-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / context_progress-0.1.5.tar.gz

Download URL context_progress-0.1.5.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
159a0f10ac8bbece52ab005d61887a4ddb3c58359716d403636eff4ca686ede4
BLAKE2b-256 checksum
How to use checksums
6f182bb6504d7484b13c1cf110aa482654de37e17bce6536be1c7add2b242020
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / context_progress-0.1.5-py3-none-any.whl

Download URL context_progress-0.1.5-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
319dd0a82c6fa69e363ff1589e9ffc820f5865f213f8a62f8b344f021e434f8f
BLAKE2b-256 checksum
How to use checksums
31cec3e646528b52a312ce25d025bca89172f23fba603b9a28902693cce50f01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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