Simple Library for Progress Bar
Install
- With pipenv
pipenv install mortalprogressbar
Usage
Import
from progress import ProgressBar
Use
with ProgressBar(total=100, width=30, prefix="Processing...") as bar:
bar.update(add=1)
Example
with ProgressBar(total=100, width=30, prefix="Processing...") as bar:
for _ in range(total):
bar.update(add=1)
time.sleep(0.05)
Result
| Testing... |ββββββββββββββββββββββββββββββ| 100% - 100 / 100 | TTL / ETA: 2.49s / 0.00s | AVG: 40.13/s |
ε·²ζ―ζ΄δΈζ prefix
| θηδΈ... |ββββββββββββββββββββββββββββββ| 100% - 100 / 100 | TTL / ETA: 2.49s / 0.00s | AVG: 40.13/s |
θ₯ width == -1 εζε‘«ζ»Ώζ΄ε terminal ι·εΊ¦