A simple progress bar for loop progress measurement and time estimation.
Project description
Progress Bar
A simple progress bar for loop progress measurement and time estimation.
The original idea and base script for this repository was created by @carlospuenteg. I just decided to refactor the code and add some nice features such as remaining and elapsed time counting.
Features+
- Simple and easy to use (create a progress bar and update it)
- Colorful output so that you always see how your loop is progressing
- Estimated time of completion prediction. No need to stare at the screen for minutes!
- Elapsed time display. Know the efficiency of your loops!
Installation
macOS / UNIX
# Clone the repository:
git clone https://github.com/erlete/progress-bar
# Copy the `progress-bar.py` file to your project folder:
cp progress-bar/progress-bar.py path/to/your/project/folder
Usage
Just import the ProgressBar
class and it will be ready to go!
from progress_bar import ProgressBar
Example
from time import sleep
from progress_bar import ProgressBar
ITERATIONS = 100
# Use default settings:
pb = ProgressBar(ITERATIONS)
for i in range(ITERATIONS):
sleep(0.05)
pb.update(i)
# Or customize them all you want!
pb = ProgressBar(ITERATIONS, text="Loading...", width=30)
for i in range(ITERATIONS):
sleep(0.05)
pb.update(i)
Disclaimer
This progress bar does not serve a performance counting purpose. It is only meant to be used for orientative loop progress measurement and time estimation. Do not use it for strict performance measurements.
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
Built Distribution
File details
Details for the file ezbar-1.2.tar.gz
.
File metadata
- Download URL: ezbar-1.2.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5bf02102ab7749bdcece4d23c2b65541f1652f11a773212e346816a83a7e6c5 |
|
MD5 | 55c0c15d645dd65d8b881a8ab1120013 |
|
BLAKE2b-256 | 0f088355d51c694695e3a292c94de18a3f23506a28d2ab5f98697e98cee2a27d |
File details
Details for the file ezbar-1.2-py3-none-any.whl
.
File metadata
- Download URL: ezbar-1.2-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1e31c31d81f8488c02dedb241cd76178fab008e02919e9b246ece39a19d8f4 |
|
MD5 | a434a9d998dfbd3f2438d77a96725384 |
|
BLAKE2b-256 | b3c4ae136ca0d532e8cfb7ec266bf4a8c76f738d5f1ec6bdf4925e4dec7aa8e5 |