tqdm wraps iterables or manual counters to show progress bars in terminals, GUIs, notebooks, and shell pipelines. It targets low overhead and works without extra dependencies beyond Python.
Overview
tqdm adds a meter to loops and streaming workflows so you can see iteration count, rate, and estimated time remaining. Wrapping any iterable with tqdm() updates a dynamic bar on stderr by default, and trange() provides a shortcut around range().
The library supports manual update mode with context managers, postfix messages, nested bars, and piping on the command line via python -m tqdm between shell stages. Predictive timing skips redundant redraws to keep overhead small in tight loops.
tqdm runs on Linux, Windows, macOS, FreeBSD, NetBSD, and Solaris/SunOS, in consoles or GUI environments, and cooperates with IPython and Jupyter. It needs only carriage-return and line-feed control, with optional ascii mode when Unicode rendering is unreliable.
Installation paths include pip, conda-forge, Snap packages for CLI-only use, and a Docker image for trying the CLI. Environment variables can override default display intervals, which helps in CI or container logs.
Key features
- Iterable and manual progress modes
- CLI pipe-friendly meter
- Jupyter and IPython support
- Nested and threaded bar layouts
- Configurable units and formatting
- Low per-iteration overhead
- Snap and Docker CLI distributions
- Environment variable defaults
Use cases
- Showing training loop progress
- Timing long shell pipelines
- Notebook experiment monitoring
- Batch file processing scripts
- Manual multi-stage job tracking