Progress
The `progress` library (current version 1.6.1) provides easy-to-use, text-based progress bars and spinners for command-line interfaces. It offers a straightforward API with several built-in styles and aims for minimalism and speed, without external dependencies.
Warnings
- gotcha The `progress` library does not support Jupyter notebooks or similar interactive environments, as it is primarily designed for terminal-based applications.
- gotcha Progress bars created with `progress` do not dynamically resize if the terminal window changes size during execution.
- gotcha This library (PyPI: `progress`) is often confused with `progressbar2` (PyPI: `progressbar2`). Ensure you install `progress` if you intend to use this specific library.
- gotcha The `progress` library offers fewer customization options compared to more feature-rich progress bar libraries like `tqdm` or `progressbar2`.
Install
-
pip install progress
Imports
- Bar
from progress.bar import Bar
- ChargingBar
from progress.bar import ChargingBar
- IncrementalBar
from progress.bar import IncrementalBar
- Spinner
from progress.spinner import Spinner
Quickstart
import time
from progress.bar import Bar
# Example with a simple Bar
with Bar('Processing...') as bar:
for i in range(100):
# Simulate work
time.sleep(0.02)
bar.next()