simple-progress-bar

Simple progress bar for your console apps in python


Keywords
progress, bar, progress-bar, console, terminal
License
MIT
Install
pip install simple-progress-bar==0.0.2

Documentation

Simple Progress Bar

This module will print a progress bar for console apps. It should be used inside a for loop.

Installation

pip install simple-progress-bar

Usage

# import function from module
from simple_progress_bar import print_progressbar

def test_function():
    
    df_test = pd.read_excel('test_file_read.xls')
    df_test_size = len(df_dles.index)

    # iterate through anything - here is a pandas dataframe
    for index, row in df_test.iterrows():
        index_fix = index + 1
        result = 'Test' 
        df_test.loc[index, 'result'] = result

        # Printing the progress bar
        print_progressbar(index_fix, df_test_size, blank='-', description=f"Testing: Line {index_fix} of {df_test_size}")

    df_test.to_excel('test_file_write.xls')