tqdm is the standard tool for monitoring long-running loops in Python. It has negligible overhead (about 60ns per iteration) and works everywhere: in the console, in Jupyter notebooks, and even in GUIs.
Official docs: https://tqdm.github.io/ GitHub: https://github.com/tqdm/tqdm Search patterns: from tqdm import tqdm, tqdm.pandas(), tqdm.notebook, tqdm.contrib
Iterative Wrapper The simplest way to use tqdm is to wrap any iterable: for item in tqdm(iterable):. It automatically calculates the length and estimates the time remaining.
A fast, extensible progress bar for Python and CLI. Instantly makes your loops show a smart progress meter with ETA, iterations per second, and customizable statistics. Minimal overhead. Use for monitoring long-running loops, simulations, data processing, ML training, file downloads, I/O operations, command-line tools, pandas operations, parallel tasks, and nested progress bars. Source: tondevrel/scientific-agent-skills.