Skip to main content

Simple progress bar for your console apps in python

Project description

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_progress_bar-0.0.5.win-amd64.zip (6.2 kB view hashes)

Uploaded Source

Built Distribution

simple_progress_bar-0.0.5-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page