A decentralized iterable, function and log tracker
Project description
This project provides an easy-to-use tool for tracking the progress of Python iterables, functions, and log messages to an independent log server. It allows users to monitor multiple Python scripts from any device with an internet connection. With this decentralized approach, users can collaborate and monitor the real-time progress of various scripts running on different devices and processes. This tool enables seamless tracking across distributed systems, making it ideal for collaborative projects and remote monitoring.
Key Features
- Progress Tracking: Track the progress of Python iterables, functions, and log messages in real-time.
- Decentralized Monitoring: Monitor multiple Python scripts from any device with an internet connection.
- Collaborative Projects: Collaborate and monitor the real-time progress of various scripts running on different devices and processes.
- Distributed Systems: Track progress across distributed systems for seamless monitoring and remote collaboration.
- Function Tracking: Track the call-count, execution time distribution, execution history, time between calls, error count, function file origin, and function name.
- Iterable Tracking: Track the progress of iterables and generators with a progress bar. Additionally, track the total number of iterations, current iteration, and percentage completion, time remaining, iteration execution time, and iteration rate.
- Log Server: Start a log server to receive progress updates from Python scripts. The log server can be accessed from any device with an internet connection.
- Threading support: Track the progress of multiple threads and processes simultaneously.
- Search Functionality: Search for specific functions and iterables in the log server.
Installation
Clone
Navigate to your desired installation directory and clone the repository using the following command:
git clone https://github.com/levi2234/Progresspal
Navigate to the installation directory and use either a pip install or python setup.py install to install the package.
Pip Install
pip install .
Python Setup
python setup.py install
Pip Install
pip install ProgressPal
Usage
Log server
The progresspal package reports the progress of iterables, functions, and log messages to a log server. The log server can be started by running the following command in the terminal (by default can be found on http://127.0.0.1:5000).
ProgressPal start
If this command does not work it is possible to start the log server by running the following code in a Python script.
from ProgressPal.webapp.webapp import start_web_server
start_web_server()
Iterables and generators
Using ProgressPal is simple and might even feel familiar to those who have used tqdm and the logging module in Python. The following is a simple example of how to use ProgressPal to track the progress of a for loop.
from ProgressPal import ltrack
import time
for i in ltrack(np.arange(100)):
time.sleep(0.1)
Which will report the progress of the for loop to the ProgressPal server. This can be done with any iterable or generator.
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)
The result of the above code can be seen in the ProgressPal server as such:
Functions
ProgressPal can also be used to track the execution functions . The following is an example of how to use ProgressPal to track the progress of a function
from ProgressPal import ftrack
@ftrack() # Decorator to track the progress of the function
def test_function():
time.sleep(1)
for i in range(10):
test_function()
The result of the above code can be seen in the ProgressPal server as such:
Collaborate using ProgressPal
ProgressPal is designed to be a collaborative tool that allows users to monitor the progress of various scripts running on different devices and processes. Through this approach it is possible to monitor the progress of multiple scripts in real-time, making it ideal for collaborative projects and remote monitoring. To do this the logserver needs to be publically hosted in order to be accessed by people outside of the local network. This can be done by port forwarding the logserver or by hosting the logserver on a cloud service.
After the logserver is publically hosted other users can access the logserver by redirecting their progresspal to the publically hosted logserver. This can be done by including the following arguments in ftrack ltrack and Plog functions:
from ProgressPal import ftrack, ltrack, plog
# FTRACK
@ftrack(host = 'yourhost', port = 'yourport') # Decorator to track the progress of the function
def test_function():
time.sleep(1)
# LTRACK
for i in ltrack([1,2,3,4], host ='yourhost', port ='yourport'):
time.sleep(0.1)
# PLOG
logger = plog(host = 'yourhost', port = 'yourport')
logger.info('This is a test message')
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file progresspal-0.0.2.tar.gz
.
File metadata
- Download URL: progresspal-0.0.2.tar.gz
- Upload date:
- Size: 725.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23defdc6e1ce3236b03eefffa9dba44f9228cc649f19a21bae5b514d79b25ee2 |
|
MD5 | 2583ca0c2347cf16c35ad416a66b54da |
|
BLAKE2b-256 | d6e5b74a9f95c3d7eac7a8a260cfab755bcca3c0e49af995c4d10e9ef4cafe01 |
Provenance
The following attestation bundles were made for progresspal-0.0.2.tar.gz
:
Publisher:
release.yaml
on levi2234/Progresspal
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
progresspal-0.0.2.tar.gz
- Subject digest:
23defdc6e1ce3236b03eefffa9dba44f9228cc649f19a21bae5b514d79b25ee2
- Sigstore transparency entry: 148208032
- Sigstore integration time:
- Predicate type:
File details
Details for the file ProgressPal-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ProgressPal-0.0.2-py3-none-any.whl
- Upload date:
- Size: 727.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a3fb086b6f6cba94fb1dfc52b7710d9a90d689c26337ef668c12e96978aaaab |
|
MD5 | ff0779f4d871be43a906c727a9e8813e |
|
BLAKE2b-256 | 7b8deaa33387a3fc9e3d762423475e062ecc026e216b6e8ffc504a3d3f50e2aa |
Provenance
The following attestation bundles were made for ProgressPal-0.0.2-py3-none-any.whl
:
Publisher:
release.yaml
on levi2234/Progresspal
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
progresspal-0.0.2-py3-none-any.whl
- Subject digest:
6a3fb086b6f6cba94fb1dfc52b7710d9a90d689c26337ef668c12e96978aaaab
- Sigstore transparency entry: 148208034
- Sigstore integration time:
- Predicate type: