A typed terminal progress bar library for Python. It handles custom widgets, clean output around prints and logs, multiple concurrent bars, unknown-length progress, and pipe-friendly CLI usage.
Install
pip install progressbar2
Quick start
import time
import progressbar
for item in progressbar.progressbar(range(100), desc='Loading'):
time.sleep(0.02)
Try it in your browser
Every example in the documentation runs live in the page. Press Run on any code block, no install required.
Progress with clean logs
"""A build log printing above a progress bar without corrupting it."""
from __future__ import annotations
import time
import progressbar
STEPS = 24
def main() -> None:
with progressbar.ProgressBar(
max_value=STEPS,
prefix='Build ',
redirect_stdout=True,
) as bar:
for step in range(STEPS):
if step in {8, 16}:
print(f'log: completed step {step}')
bar.update(step + 1)
# Longer than the bar's 0.05s update gate, so every step
# lands as a visible redraw.
time.sleep(0.1)
if __name__ == '__main__':
main()
Multiple bars
"""Two named bars progressing at different rates in one terminal."""
from __future__ import annotations
import sys
import time
import progressbar
STEPS = 24
def main() -> None:
with progressbar.MultiBar(fd=sys.stdout) as multibar:
build = multibar['build']
test = multibar['test']
build.max_value = STEPS
test.max_value = STEPS
for step in range(STEPS):
build.update(step + 1)
test.update(min(STEPS, max(0, round((step - 3) * 1.2))))
# Longer than the bars' 0.05s update gate, so every step
# lands as a visible redraw.
time.sleep(0.1)
# Reaching max_value doesn't finish a bar -- only finish() does.
# A MultiBar waits for every bar to report finished() before its
# context manager can exit, so without these calls the block
# above would hang forever on exit.
build.finish()
test.finish()
if __name__ == '__main__':
main()
Unknown length and animated bars
"""A bar for work whose total is not known up front."""
from __future__ import annotations
import time
import progressbar
def main() -> None:
with progressbar.ProgressBar(
max_value=progressbar.UnknownLength,
) as bar:
for value in range(0, 120, 10):
bar.update(value)
# Longer than the bar's 0.05s update gate, so every step
# lands as a visible redraw.
time.sleep(0.1)
if __name__ == '__main__':
main()
CLI usage
progressbar --progress --timer --eta --rate --bytes input.bin -o output.bin
Known terminal caveats
JetBrains IDEs need “Enable terminal in output console” for advanced terminal behavior such as MultiBar.
IDLE does not support terminal progress bars.
Jupyter buffers stdout; call sys.stdout.flush() when output appears late.
Project history
progressbar2 is based on the old Python progressbar package that was published on the now defunct Google Code. Since that project was completely abandoned by its developer and the developer did not respond to email, I decided to fork the package.
This package is still backwards compatible with the original progressbar package so you can use it as a drop-in replacement for existing projects.
Links
Documentation: https://progressbar-2.readthedocs.org/en/latest/
Bug reports: https://github.com/WoLpH/python-progressbar/issues
Package homepage: https://pypi.python.org/pypi/progressbar2
Metadata
Release files for progressbar2 4.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| progressbar2-4.6.0.tar.gz | 542.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| progressbar2-4.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 646.6 kB
Release files / progressbar2-4.6.0.tar.gz
| Download URL | progressbar2-4.6.0.tar.gz |
|---|---|
| Size | 542.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe48c8955a84428af77bff2642ba47041e1b8f7c867a5b7cc94f8bc255a8f0cf
|
|
BLAKE2b-256 checksum How to use checksums |
0c1e5bd376abe32a392e74fffd82feb42ee1472d263bd358d628af20663d0346
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency logRelease files / progressbar2-4.6.0-py3-none-any.whl
| Download URL | progressbar2-4.6.0-py3-none-any.whl |
|---|---|
| Size | 104.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d78bdeb1debef92a39dd9042e0689542bd72d6e2f30b13432db371aa9d8ee4e
|
|
BLAKE2b-256 checksum How to use checksums |
704cba64c450164fa4feaa9c4bb1c6445811d89d6a1995bfc58d039273b698af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.
Transparency log