alive-progress

3.3.0 · active · verified Fri Apr 10

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.

Warnings

Install

Imports

Quickstart

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.

import time
from alive_progress import alive_bar

TOTAL_ITEMS = 100

with alive_bar(TOTAL_ITEMS, title='Processing items') as bar:
    for i in range(TOTAL_ITEMS):
        # Simulate a task
        time.sleep(0.05)
        bar() # Update the progress bar

print("Task completed!")

view raw JSON →