Skip to main content
  1. Posts/

Top 7 Python Libraries for Progress Bars

··222 words·2 mins·

Loading... 100% |████████████| Done — Are you using the right library for your progress bars?

Progress bars may seem like a minor detail, but in ML scripts or data processing they make a huge difference. Here are the top 7:

1. tqdm — The de facto standard

for record in tqdm(records, desc="Cleaning"):
    process(record)
# Cleaning: 100%|██████| 1000/1000 [00:02<00:00, 457it/s]

2. rich — Visual and colorful

for api in track(endpoints, description="Fetching APIs"):
    fetch(api)

3. alive-progress — Animated and dynamic

with alive_bar(epochs, title="Training") as bar:
    train(); bar()

4. halo — Spinners for indeterminate tasks

spinner = Halo(text="Connecting...", spinner="dots")
spinner.start(); connect(); spinner.succeed("Connected")

5. ipywidgets — For Jupyter Notebooks

progress = widgets.IntProgress(value=0, max=100)
display(progress)

6. progress — Minimalist and simple 7. click — Built into CLIs

💡 Explanation in a nutshell
#

tqdm is the safe choice for most cases: zero config, works in terminal and notebook, very low overhead. Use rich if you want something prettier in a CLI. halo when you don’t know how long it will take. ipywidgets if you’re in Jupyter. The rest are for specific use cases.

More information at the link 👇

Also published on LinkedIn.
Juan Pedro Bretti Mandarano
Author
Juan Pedro Bretti Mandarano