class ProgressBar():
    """

    Класс для создания прогресс бара

    Взят от сюда: https://stackoverflow.com/questions/3173320/text-progress-bar-in-terminal-with-block-characters
    
    """
    
    def print(iteration, total, prefix='', suffix='', decimals=1, length=25, fill='█', printEnd="\r"):
        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=printEnd)

        # Print New Line on Complete
        if iteration == total:
            print()
