Skip to main content

An easy-to-use and colorful progress bar for python.

Project description


image image image image

A beautiful , fast, easy-to-use progress bar for python.


pip install pyprobar

nightly build:

python install


28.71% |████████>>>>>>>>>>>>>>>>>  | 0:00:22|0:00:31 ETC: 05-20 18:08:15


For 10000000 loops:

probar: # this repo
100.00%|█████████████████████████████| 0:00:00|0:00:02  ETC: 06-07 12:08:03

bar: # this repo
100.00%|█████████████████████████████| 0:00:00|0:00:03  ETC: 06-07 12:11:15

100%|██████████| 10000000/10000000 [00:03<00:00, 2634907.84it/s]

100% (10000000 of 10000000) |############| Elapsed Time: 0:00:46 Time:  0:00:46


Use probar or bar for different situations:


from pyprobar import bar, probar
import time

for idx, x in probar(range(1234), enum=True): 
>>> 18.31%|█████>>>>>                  | 0:00:20|0:00:25  ETC: 05-20 19:00:39

Or used in List comprehension:

res = [i for i in probar(range(10))]
>>> 100.00%|███████████████████████████| 0:00:00|0:00:00 ETC: 05-20 12:14:33
>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]


import numpy as np
N = 1024
a = np.linspace(2, 5, N)
for idx, i in enumerate(a):
    bar(idx, N)
>>> 100.00% |███████████████████████████| 0:00:00|0:00:10  ETC: 05-20 20:33:34 

You can set your own progress bar by using the parameters symbol_1 and symbol_2 :

for i in probar(range(1234), symbol_2="o"):
>>> 23.10%|██████ooooooooooooooooooo    | 0:00:10|0:00:14  ETC: 05-20 17:29:57

Tip: Searchcharmap in win10 start menu, you can find a lot of interesting characters.

Supports progress bars in different colors:

for idx, i in enumerate(a):
    bar(idx, N, color='1') # `color` options: '1','2','3','4','5','0','update_random'

Of course, you can also add text or variables to the progress bar:

for idx, i in enumerate(a):
    text = f"what you want see is {x}"
    bar(idx, N, text=text)

multi-line text :

for idx, i in enumerate(a):
    text = f"{v1}, frame:{idx}\n"
    bar(idx, N, text=text)

Specify the time zone:

for i in enumerate(a):
    bar(idx, N, time_zone="Asia/Shanghai")

print RGB color string:

from pyprobar.styleString import rgb_str
    text = rgb_str("I'm green!", RGB_fore=[0,255,0])


  • <input type="checkbox" checked="" disabled="" /> Thread problem with probar() in jupyter notebook
  • <input type="checkbox" disabled="" /> Thread problem with bar() in jupyter notebook
  • <input type="checkbox" disabled="" /> Speed of information
  • <input type="checkbox" disabled="" /> Multithreading

Project details

Download files

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

Files for pyprobar, version
Filename, size File type Python version Upload date Hashes
Filename, size pyprobar- (16.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyprobar- (11.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page