ProgressPal: A Python Progress Tracker for Functions, Iterables, and Logs with Distributed and Parallel Support
ProgressPal is a Python library that extends tqdm‑style progress bars to track functions, iterables, and log messages across threads, processes, and distributed systems, offering a web‑based dashboard, logging server, and easy integration with threading, concurrent.futures, and joblib for collaborative monitoring.
ProgressPal provides an easy‑to‑use environment for tracking Python functions, iterables, and log messages, preserving the familiar tqdm syntax while extending support for threads, parallel processes, and distributed runtimes. It offers a centralized online dashboard accessible from any internet‑connected device.
Key features include real‑time progress tracking, distributed monitoring, collaborative dashboards, function call statistics, iterable and generator progress, log server integration, thread support, and searchable logs.
Installation
pip install ProgressPalStarting the log server
ProgressPal startIf the command fails, the server can be launched from Python:
from ProgressPal.webapp.webapp import start_web_server
start_web_server()Tracking iterables and generators
from ProgressPal import ltrack
import time
for i in ltrack(np.arange(100)):
time.sleep(0.1)or with a generator where the total must be supplied:
from ProgressPal import ltrack
import time
for i in ltrack(range(100), total=100):
# providing a total is required for generators
time.sleep(0.1)Parallel and threaded tracking
from ProgressPal import ltrack
# example function
def testfunction(id):
for i in ltrack(range(100), taskid=f"Loop {id}"):
time.sleep(1)
# Threading example
from threading import Thread
threads = []
for i in ltrack(range(10), total=10, taskid="Tracking progress of Threading Threads"):
thread = Thread(target=testfunction, args=(i,))
threads.append(thread)
thread.start()
# Concurrent futures example
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=5) as executor:
for i in ltrack(range(10), total=10, taskid="Tracking progress of concurrent threads"):
executor.submit(testfunction, i)
# Joblib example
from joblib import Parallel, delayed
Parallel(n_jobs=5)(delayed(testfunction)(i) for i in ltrack(range(10), total=10, taskid="Tracking progress of Joblib jobs"))Function tracking
from ProgressPal import ftrack
# Decorator usage
@ftrack()
def test_function_decorator():
time.sleep(1)
for i in range(10):
test_function_decorator()
# Direct function usage
def test_function_inline():
time.sleep(1)
u = ftrack(test_function_inline, taskid="Inline function tracking u")
v = ftrack(test_function_inline, taskid="Inline function tracking v")
for i in range(10):
u()
v()All tracking results are visualized on the ProgressPal web dashboard, as shown in the included screenshots. For more examples, refer to the GitHub repository https://github.com/levi2234/Progresspal .
Python Programming Learning Circle
A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.