Progress bar for Python and CLI tools
Top 1.2% on sourcepulse
tqdm provides a fast, extensible, and highly customizable progress bar for Python loops and command-line operations. It aims to offer a negligible overhead, making it suitable for even the tightest loops, and supports various environments from standard terminals to Jupyter notebooks.
How It Works
tqdm wraps any Python iterable, automatically displaying a smart progress meter with ETA and iteration speed. It employs algorithms to predict remaining time and skip unnecessary displays, minimizing overhead. The library is dependency-free, relying only on Python's standard capabilities for terminal control.
Quick Start & Requirements
pip install tqdm
conda install -c conda-forge tqdm
Highlighted Details
tqdm.notebook
), Matplotlib (tqdm.gui
), and Tkinter (tqdm.tk
).Maintenance & Community
The project is actively maintained by a core team, with Casper da Costa-Luis as the primary maintainer. Contributions are welcome, and community support is available via GitHub issues.
Licensing & Compatibility
Open Source (OSI approved). Compatible with commercial and closed-source applications.
Limitations & Caveats
Some older or non-standard terminal environments (e.g., certain cloud consoles, IDEs like PyCharm) might have issues with nested progress bars or Unicode rendering, potentially requiring configuration like TQDM_POSITION=-1
or ascii=True
. Asynchronous iterator break
statements may not trigger proper cleanup without manual close()
calls or context manager usage.
2 months ago
Inactive