core.progressbar
- class core.progressbar.progressbar(iterable, prefix, nth=1)[source]
Bases:
object- ascii_pbar(nchars: int, fmt: str = None, bar_style: Literal['square_dot', 'square_void', 'block_void', 'block_dot', 'hash_dash', 'hash_void', 'equal_void'] = None, border_style: Literal['brackets', 'pipes', 'none'] = None, icon_style: Literal['dots', 'vbar', 'moon', 'earth'] = None)[source]
Generate an ASCII progress bar string. - nchars: Length of the progress bar in characters. - bar_style: any of:
square_dot : [■■■···]
square_void : [■■■ ]
block_void : [███░ ]
block_dot : [███···]
hash_dash : [###—]
hash_void : [### ]
equal_void : [=== ]
- border_style: any of:
brackets : [bar]
pipes : |bar|
none : bar
- loading_style: any of:
dots : ⣠
vbar : ▁▂▃▄▅▆▇█
moon : 🌗
earth : 🌍
- fmt can contain:
%icon : loading animation
%pct : percentage completed
%bar : the progress bar itself
%itr : current iteration / total iterations
%time : elapsed time and estimated remaining time
if any of the style parameters is None, it will try to get it from the env var HYGEOS_PBAR_STYLE which is a string like “fmt|bar_style|border_style|icon_style”
- pbar_length = 30