core.progressbar

class core.progressbar.msg_stack[source]

Bases: object

add()[source]
clean_above()[source]
get()[source]
info(**kwargs)[source]
reset_cursor()[source]
reset_screen()[source]
stack = []
update_and_print_stack()[source]
class core.progressbar.progressbar(iterable, prefix, nth=1)[source]

Bases: object

ascii_loading(fps: int = 10, style: Literal['dots', 'vbar', 'moon', 'earth'] = 'dots')[source]
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”

finish()[source]
get_depth()[source]

Get the depth of the progress bar in the stack (ignoring finished bars)

pbar_length = 30
update()[source]