Skip to main content

Lightweight task progress tracking with pluggable storage backends

Project description

progressorx

progressor — lightweight progress-tracking package for long-running tasks.

Features:

  • report_progress(task_id, progress=None, increase=None) — set or increment progress (0..100).
  • get_progress(task_id) — get current progress and status.
  • Pluggable backends: InMemory, Redis, SQLAlchemy (SQLite/Postgres).
  • Thread/process/distributed safe when using a proper backend (Redis/SQL).

Quick example

from progressorx import ProgressManager
from progressorx.backends.memory import InMemoryStore

store = InMemoryStore()
mgr = ProgressManager(store)

# create task
mgr.create('task-1')

# set and increment progress
mgr.report_progress('task-1', progress=10)
mgr.report_progress('task-1', increase=5)

rec = mgr.get_progress('task-1')
print(rec.task_id, rec.progress, rec.status)  # task-1 15.0 in_progress

Examples

  • Basic runnable example: src/progressorx/examples/basic.py
    • Run: python -m progressorx.examples.basic
  • FastAPI integration: src/progressorx/examples/fastapi.py
    • Run: uvicorn progressorx.examples.fastapi:app --reload

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

progressorx-0.0.9.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

progressorx-0.0.9-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file progressorx-0.0.9.tar.gz.

File metadata

  • Download URL: progressorx-0.0.9.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for progressorx-0.0.9.tar.gz
Algorithm Hash digest
SHA256 58a563e70a30078a4973ab45e1c23f44ef05b7d3415b7028e9172ab44aea700f
MD5 c77366df21522011497daed3c41773c9
BLAKE2b-256 7bded16697cbfcd6fca27b2347b9d8009bd115f2a022f6fe057df1efcfc1214c

See more details on using hashes here.

File details

Details for the file progressorx-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: progressorx-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for progressorx-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6e0293436e1208baa2326fc83389ed302659418a830c12d48ef176f1834c21
MD5 568e023ac62fa75f72389058352f510a
BLAKE2b-256 05bdd80447f6086708e8e9291e1b584277ee9c19e671aa36308f9fc7ab24010f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page