Python Programming/Progress Bars

Progress bars in Python are abundant. There are several well-known packages for progress bars out there.

External Progress BarsEdit

Some of the top bars are from the progress and the tqdm library.


Easy to use progress bars
PyPi Link
Pip command pip install progress
Import command import or import progress.spinner

The progress module provides 7 different progress bars to use. They are:

  • Bar
  • ChargingBar
  • FillingSquaresBar
  • FillingCirclesBar
  • IncrementalBar
  • PixelBar
  • ShadyBar

The module also provides 6 spinners. These do not have a finish. They are:

  • Spinner
  • PieSpinner
  • MoonSpinner
  • LineSpinner
  • PixelSpinner

In order to access a bar/spinner, you run progress.a.b, where a is the type of indicator you want (bar or spinner) and b is the name of the bar/spinner. Furthermore, you have to import the module as progress.a or else it cannot see the bar/spinner.

Example codeEdit

import time

b ='Waiting', max = 100)

for i in range(100):

We can also make it an iterator so we can put it into a for loop.

from __future__ import print_function
import time

b ='Printing', max = 26)
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

for letter in b.iter(letters):


Fast, Extensible Progress Meter
PyPi Link
Pip command pip install tqdm

The tqdm module relies off of one main class, the tqdm class. It has a GUI version, and a jupyter notebook-compatible version, and one for pandas. It will run as an iterator, a callable bar, and an action in a with statement.

Basic CodeEdit

from tqdm import tqdm

adder = 1
sum = 0

for i in tqdm(range(100)):
    sum += adder