A simple progressbar to track progress with built in timer
Project description
Progress Bar
This is a simple progress bar that allows for easy use to display progress.
Features
- Timer to estimate time remaining
- Timer adjusts to rates
- Learning rate can be changed
- Choice of length of bar
- Choice of character bar is made of
- Option for item count or percentage completed (or both)
- Option for method of computing completion time.
Installation
Install with pip: pip install progressbar_easy
Usage
Imported with from progressbar import ProgressBar
Initialize object with bar = ProgressBar(number of iterations)
Use in loop. Inside loop at the end, put bar.update(K)
or bar += K
where K is the number of iterations completed since last update.
Prefer bar.update(K)
if you want to update the bar every iteration.
Defaults to use the Bellman equation to estimate time remaining.
Add use_average=(True, N)
arguement to use the average of the last N iterations instead of Bellman equation.
Example: bar = ProgressBar(range(2000), use_average=(True, 420)):
Or
Use as an iterator object
for i in ProgressBar(range(100), lr=.0001):
...
Change Log
1.1.1 (4/21/2022)
- Added ability to use generators
1.1.0 (10/22/2021)
- Added ability to use the average time to estimate future time.
- Added docstrings.
- Improved performance when using "+=" opperator.
- Increased efficiency of object.
1.0.4.4 (6/11/2021)
- Bug Fixes
1.0.4 (6/11/2021)
- Added "iter" attribute to allow for more effective use in loops.
Example:
for i in ProgressBar(range(10)):
...
1.0.3.3 (6/8/2021)
- Bug Fixes
1.0.3 (6/2/2021)
- Added ability to adjust "learning rate" for the rate of items
- Made "completed" arguement for "update" method default to None, which just means increment by one
1.0.2.2 (5/7/2021)
- Bug Fixes
1.0.2 (5/6/2021)
- Added support for updating multiple items (timer would update as one item)
- Added ability to adjust the starting rate of items for the timer
- Fixed bugs using "+=" (iadd) (caused timer to not work)
1.0.1.2 (5/6/2021)
- Bug Fixes
1.0.0 (5/6/2021)
- First Release
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
File details
Details for the file progressbar_easy-1.1.1.3.tar.gz
.
File metadata
- Download URL: progressbar_easy-1.1.1.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7095f776d815580340733e884ad73b1dd6069da037f0b1111f6c4d969d9adafa |
|
MD5 | c7f98af42a4f92c0319c43c6a36cc778 |
|
BLAKE2b-256 | b00979b14dbc39a575da2f01736b18f55a6f8f35cec2fa60a296d5b6d5cb5a4e |