DEV Community

k38f
k38f

Posted on

I built flashbar — a zero-dependency progress bar for Python

I love tqdm and rich, but for quick scripts I always felt like I was importing a whole framework just to show a loading bar. So I built flashbar.

Quick start

from flashbar import track

for item in track(range(100), label="Downloading"):
    do_work(item)
Enter fullscreen mode Exit fullscreen mode

One import. One line. Done.

Demo

flashbar demo

Features

  • 8 built-in themes (default, retro, dots, arrow, slim, minimal, green, red)
  • Spinners for unknown-duration tasks
  • ETA and speed display
  • Custom hex colors (#FF5733) and characters
  • Context manager support
  • Zero dependencies
  • Python 3.8 — 3.14

Themes

from flashbar import Bar

for name in ["default", "retro", "slim", "dots", "arrow"]:
    bar = Bar(30, theme=name, label=f"{name:8s}")
    for _ in range(30):
        bar.update()
Enter fullscreen mode Exit fullscreen mode

Spinners

from flashbar import Spinner

with Spinner("Loading data...", style="dots"):
    do_something()
Enter fullscreen mode Exit fullscreen mode

Why not tqdm/rich?

Nothing wrong with them — they're great. But if your use case is "show me a bar while this loop runs," flashbar does it in ~300 lines with zero dependencies. No Jupyter, no nested bars, no async — just a pretty bar in your terminal.

Links

Feedback welcome!

Top comments (0)