alive-progress is a versatile and highly customizable Python library for creating animated progress bars in the terminal. It provides visual feedback for long-running tasks with real-time throughput, Estimated Time of Arrival (ETA), and a variety of cool animations. Currently at version 3.3.0, the library maintains an active development and release cadence, offering robust features for CLI applications.
pip install alive-progressVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the most common usage pattern for `alive-progress` using the `alive_bar` context manager. It initializes a progress bar with a total count and updates it in each iteration of a loop.
Use `with alive_bar(total, force_tty=True) as bar:` to explicitly enable the display in such environments.
Always use the `text='your message'` keyword argument when setting an inline message: `bar(text='current status')`. The `bar()` call without arguments increments the bar.
If `total` is provided, `bar()` increments. To set a specific percentage, call `bar(fractional_value)` (e.g., `bar(i / total)`). If no `total` is given, it operates in 'unknown' mode with no ETA, and `bar()` simply updates the spinner.
Ensure your project uses Python 3.9 or newer.
Install the package using pip: 'pip install alive-progress'.
Ensure the package is installed and use the correct import statement: 'from alive_progress import alive_bar'.
Enable notebook mode by adding 'from alive_progress.notebook import set_notebook' and 'set_notebook()' before using 'alive_bar'.
Force TTY mode by setting 'force_tty=True' in 'alive_bar': 'with alive_bar(100, force_tty=True) as bar:'.
Upgrade alive-progress to version 3.0 or newer: `pip install --upgrade alive-progress`
No dependency data recorded yet.