Skip to main content

Travis status:

https://travis-ci.org/WoLpH/python-progressbar.png?branch=master

Coverage:

https://coveralls.io/repos/WoLpH/python-progressbar/badge.png?branch=master

Introduction

NOTE: This version has been completely rewritten and might not be 100% compatible with the old version. If you encounter any problems while using it please let me know: https://github.com/WoLpH/python-progressbar/issues

A text progress bar is typically used to display the progress of a long running operation, providing a visual cue that processing is underway.

The ProgressBar class manages the current progress, and the format of the line is given by a number of widgets. A widget is an object that may display differently depending on the state of the progress bar. There are many types of widgets:

  • Timer

  • ETA

  • AdaptiveETA

  • FileTransferSpeed

  • AdaptiveTransferSpeed

  • AnimatedMarker

  • Counter

  • Percentage

  • FormatLabel

  • SimpleProgress

  • Bar

  • ReverseBar

  • BouncingBar

  • RotatingMarker

  • DynamicMessage

The progressbar module is very easy to use, yet very powerful. It will also automatically enable features like auto-resizing when the system supports it.

Usage

There are many ways to use Python Progressbar, you can see a few basic examples here but there are many more in the examples file.

Wrapping an iterable

import time
import progressbar

bar = progressbar.ProgressBar()
for i in bar(range(100)):
    time.sleep(0.02)

Context wrapper

import time
import progressbar

with progressbar.ProgressBar(max_value=10) as bar:
    for i in range(10):
        time.sleep(0.1)
        bar.update(i)

Combining progressbars with print output

import time
import progressbar

bar = progressbar.ProgressBar(redirect_stdout=True)
for i in range(100):
    print 'Some text', i
    time.sleep(0.1)
    bar.update(i)

Progressbar with unknown length

import time
import progressbar

bar = progressbar.ProgressBar(max_value=progressbar.UnknownLength)
for i in range(20):
    time.sleep(0.1)
    bar.update(i)

Bar with custom widgets

import time
import progressbar

bar = progressbar.ProgressBar(widgets=[
    ' [', progressbar.Timer(), '] ',
    progressbar.Bar(),
    ' (', progressbar.ETA(), ') ',
])
for i in bar(range(20)):
    time.sleep(0.1)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

progressbar2-3.10.0.tar.gz (23.6 kB view details)

Uploaded Source

File details

Details for the file progressbar2-3.10.0.tar.gz.

File metadata

  • Download URL: progressbar2-3.10.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for progressbar2-3.10.0.tar.gz
Algorithm Hash digest
SHA256 cd7fb87f56bdaad8dee2a6a1148bad61cd573063e1f6845b7738fd9a7e34a040
MD5 301bd35188f4a85147c4d3492aab1185
BLAKE2b-256 919125303ce6fe685a2c800424a042638f7d420a69657a4c1e977a87cb41ef15

See more details on using hashes here.

Release history Release notifications | RSS feed

4.6.0

2 files

4.5.0

2 files

4.4.3

2 files

4.4.2

2 files

4.4.1

2 files

4.4.0

2 files

4.3.2

2 files

4.3.1

2 files

4.3.0

2 files

4.2.0

2 files

4.1.1

2 files

4.1.0

2 files

4.0.0

2 files

3.55.0

2 files

3.54.0

2 files

3.53.3

2 files

3.53.2

2 files

3.53.1

2 files

3.53.0

2 files

3.52.1

2 files

3.51.4

2 files

3.51.3

2 files

3.51.2

2 files

3.51.1

2 files

3.51.0

2 files

3.50.1

2 files

3.50.0

2 files

3.47.0

2 files

3.46.1

2 files

3.46.0

2 files

3.45.1

2 files

3.43.1

2 files

3.42.0

2 files

3.41.0

2 files

3.39.3

2 files

3.39.2

2 files

3.39.0

2 files

3.38.0

2 files

3.37.1

2 files

3.37.0

2 files

3.36.0

2 files

3.35.2

2 files

3.35.1

2 files

3.35.0

2 files

3.34.3

2 files

3.34.2

2 files

3.34.0

2 files

3.33.2

2 files

3.33.1

2 files

3.33.0

2 files

3.32.1

2 files

3.32.0

2 files

3.31.1

2 files

3.30.2

2 files

3.30.0

2 files

3.20.2

2 files

3.20.1

2 files

3.20.0

2 files

3.18.1

2 files

3.18.0

2 files

3.17.1

2 files

3.17.0

2 files

3.16.1

2 files

3.16.0

2 files

3.15.1

2 files

3.15.0

2 files

3.12.0

2 files

3.11.0

2 files

3.10.1

2 files

This release

3.10.0 This release

1 file

3.9.4

2 files

3.9.3

2 files

3.9.2

2 files

3.9.1

2 files

3.9.0

2 files

3.8.1

2 files

3.8.0

2 files

3.7.0

2 files

3.6.2

2 files

3.6.1

1 file

3.6.0

1 file

3.5.2

1 file

3.5.1

1 file

3.5.0

1 file

3.4.3

1 file

3.4.2

1 file

3.4.1

1 file

3.4.0

1 file

3.3.3

1 file

3.3.2

1 file

3.3.1

1 file

3.3.0

1 file

3.2.0

1 file

3.1.0

1 file

3.0.1

1 file

2.7.3

1 file

2.7.0

1 file

2.6.9

1 file

2.6.8

1 file

2.6.7

1 file

2.6.6

1 file

2.6.5

1 file

2.6.4

1 file

2.6.3

1 file

2.6.2

1 file

2.6.1

1 file

2.6.0

1 file

2.5.0

1 file

2.4.1

1 file

2.4.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page