blitzmanager/logger.py
def progress_bar(iteration: int, total: int, prefix='', suffix='', decimals=1, length=20, fill='█', print_end="\r"):
    """
    Call in a loop to create terminal progress bar
    @params:
        iteration   - Required  : current iteration (Int)
        total       - Required  : total iterations (Int)
        prefix      - Optional  : prefix string (Str)
        suffix      - Optional  : suffix string (Str)
        decimals    - Optional  : positive number of decimals in percent complete (Int)
        length      - Optional  : character length of bar (Int)
        fill        - Optional  : bar fill character (Str)
        printEnd    - Optional  : end character (e.g. "\r", "\r\n") (Str)
    """
    assert isinstance(iteration, int)
    assert isinstance(total, int)
    percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total)))
    filledLength = int(length * iteration // total)
    bar = fill * filledLength + '-' * (length - filledLength)
    print(f'\r{prefix} |{bar}| {percent}% {suffix}', end=print_end)
    # Print New Line on Complete
    if iteration == total:
        print()

    Call in a loop to create terminal progress bar
    @params:
        iteration   - Required  : current iteration (Int)
        total       - Required  : total iterations (Int)
        prefix      - Optional  : prefix string (Str)
        suffix      - Optional  : suffix string (Str)
        decimals    - Optional  : positive number of decimals in percent complete (Int)
        length      - Optional  : character length of bar (Int)
        fill        - Optional  : bar fill character (Str)
        printEnd    - Optional  : end character (e.g. "\r", "\r\n") (Str)
    
Call in a loop to create terminal progress bar
Call in a loop to create terminal progress bar
def progress_bar(iteration: int, total: int, prefix='', suffix='', decimals=1, length=20, fill='█', print_end="\r"):
    assert isinstance(iteration, int)
    assert isinstance(total, int)
    percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total)))
    filledLength = int(length * iteration // total)
    bar = fill * filledLength + '-' * (length - filledLength)
    print(f'\r{prefix} |{bar}| {percent}% {suffix}', end=print_end)
    if iteration == total:
        print()
def progress_bar ( iteration : int , total : int , prefix = '' , suffix = '' , decimals = 1 , length = 20 , fill = '█',  p int_end=" \ r"): assert isinstance ( iteration , int ) assert isinstance ( total , int ) percent = ( "{0:." + str ( decimals ) + "f}" ) . format ( 100 * ( iteration / float ( total ) ) ) filledLength = int ( length * iteration // total ) bar = fill * filledLength + '-' * ( length - filledLength ) print ( f'\r{prefix} |{bar}| {percent}% {suffix}' , end = print_end ) if iteration == total : print ( )
Call in a loop to create terminal progress bar
Call in a loop to create terminal progress bar
"""
    Call in a loop to create terminal progress bar
    @params:
        iteration   - Required  : current iteration (Int)
        total       - Required  : total iterations (Int)
        prefix      - Optional  : prefix string (Str)
        suffix      - Optional  : suffix string (Str)
        decimals    - Optional  : positive number of decimals in percent complete (Int)
        length      - Optional  : character length of bar (Int)
        fill        - Optional  : bar fill character (Str)
        printEnd    - Optional  : end character (e.g. "\r", "\r\n") (Str)
    """ # Print New Line on Complete
iteration
int
total
int
prefix
suffix
decimals
length
fill
print_end
params
iteration   - Required  : current iteration (Int)
total       - Required  : total iterations (Int)
prefix      - Optional  : prefix string (Str)
suffix      - Optional  : suffix string (Str)
decimals    - Optional  : positive number of decimals in percent complete (Int)
length      - Optional  : character length of bar (Int)
fill        - Optional  : bar fill character (Str)
printEnd    - Optional  : end character  (Str)
iteration - Required : current iteration ( Int ) total - Required : total iterations ( Int ) prefix - Optional : prefix string ( Str ) suffix - Optional : suffix string ( Str ) decimals - Optional : positive number of decimals in percent complete ( Int ) length - Optional : character length of bar ( Int ) fill - Optional : bar fill character ( Str ) printEnd - Optional : end character ( Str )