progressbar2¶
A quick taste¶
After pip install progressbar2 (Installation), wrapping any
iterable shows a live bar:
import time
import progressbar
for item in progressbar.progressbar(range(100)):
time.sleep(0.02)
That is the whole API for the common case. From there:
Tutorial builds up from that one line to custom widgets in five steps.
How-to guides answers specific questions: printing while a bar is running, several bars at once, unknown-length work, colors.
Widget reference has a page per widget, each with an animation you can run in your browser.
Explanation covers why the bar redraws when it does, how terminal detection works, and what the fast path costs.
Every example on this site is a tested, runnable module. In an HTML browser each one carries a Run button that executes it in place with real CPython compiled to WebAssembly, nothing installed.
Documentation
- Installation
- Tutorial
- How-to guides
- Wrap an iterable without managing the bar yourself
- Print while a bar is running
- Send logging output above a running bar
- Print one line per update instead of overwriting
- Color a bar, solid or gradient
- Write a custom widget
- Show a custom value next to the bar
- Put live values in the prefix or suffix
- Switch from tqdm without renaming your keywords
- Report a transfer’s size and speed
- Show progress when the total isn’t known
- Track several jobs at once with MultiBar
- Stack independent bars without MultiBar
- Widget reference
- AbsoluteETA
- AdaptiveETA
- AdaptiveTransferSpeed
- AnimatedMarker
- Bar
- BouncingBar
- Counter
- CurrentTime
- DataSize
- DynamicMessage
- ETA
- FileTransferSpeed
- FormatCustomText
- FormatLabel
- FormatLabelBar
- GranularBar
- JobStatusBar
- MultiProgressBar
- MultiRangeBar
- Percentage
- PercentageLabelBar
- Postfix
- ReverseBar
- RotatingMarker
- SimpleProgress
- SmoothingETA
- Timer
- UnitProgress
- Variable
- Reference
- Explanation
Project