Skip to main content

ProgressBar

Python class for creating and print ProgressBar.

Prerequisites

Developed and tested in Linux and Python 3.6

Installing

pip3 install ebx_progressbar

or from source:

python3 -m pip install [your_path]/ebx_progressbar/

Functions

Creating a object / instance

progressBar(fixed_width = 0, pos_Line = 0, pos_Column = 0, ind_NewLine = False)\

Description: Init class with max Size(fixed_width) Line (pos_Line) and Column (pos_Column) to show progress bar, and ind_NewLine that show all status update in same line (False) or in new line (True)


print_Running

print_Running(int_Progress = 0, str_AdditionalText = '', pre_Text = '', ind_Simple = False)

Description: Progress with running format [|], [/], [-], [], [|], [/], [-], [-], [|]

Parameter Description
int_Progress: incremental value to progress
str_AdditionalText: Print text on the end of progressbar
pre_Text: Print text on the beginning of progressbar
ind_Simple: True shows additional time elapsed: Ex.: [Elapsed Time: 0:00:01]

Call this function adding the value of int_Progress to progress

Return: None

Example of pre_Text and AdditionalText:
pre_Text: [-] AdditionalText


print_Bar

print_Bar(int_Progress = 0, pre_Text = ''):\

Description: Progress with common format:
pre_Text [Elapsed Time: 0:00:04] [#################################### ] (40%)

Parameter Description
int_Progress: incremental value to progress until 100 (100%)
pre_Text: Print text on the beginning of progressbar

Call this function adding the value of int_Progress to progress

Return: None


Examples of use

import ebx_progressbar

import time

lst_Files = ['song.odt', 'want.csv', 'information.js', 'green.gif']

##############################################################################
# Example 1:

print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(ind_NewLine=False)
for satr_File in lst_Files:
    for i in range(0, 101, 10):
        obj_ProgressBar.print_Running(i, str_AdditionalText='Logging ', pre_Text='File: ' + satr_File + ' ',
                                      ind_Simple=True)
        time.sleep(1)
    print('\r')


# Example 2:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(pos_Line=10, pos_Column=50, ind_NewLine=False)
for satr_File in lst_Files:
    for i in range(0, 101, 1):
        obj_ProgressBar.print_Running(i, str_AdditionalText='Logging ', pre_Text='File: ' + satr_File + ' ',
                                      ind_Simple=True)
        time.sleep(1)
    print('\r')


# Example 3:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(ind_NewLine=True)
for satr_File in lst_Files:
    for i in range(0, 101, 1):
        obj_ProgressBar.print_Running(i, str_AdditionalText='Logging ', pre_Text='File: ' + satr_File + ' ',
                                      ind_Simple=True)
        time.sleep(1)
    print('\r')

# Example 4:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(pos_Line=10, pos_Column=50, ind_NewLine=False)
for satr_File in lst_Files:
    for i in range(0, 101, 1):
        obj_ProgressBar.print_Running(i, str_AdditionalText='Logging ', pre_Text='File: ' + satr_File + ' ',
                                      ind_Simple=False)
        time.sleep(1)
    print('\r')

##############################################################################
# Example 5:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar()
for satr_File in lst_Files:
    for i in range(0, 101, 10):
        obj_ProgressBar.print_Bar(i, pre_Text='File: ' + satr_File)
        time.sleep(1)
    print('\r')
    obj_ProgressBar.reset()

##############################################################################
# Example 6:

print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(100, 30, 1, ind_NewLine=False)
for satr_File in lst_Files:
    for i in range(0, 101, 10):
        obj_ProgressBar.print_Bar(i, pre_Text='File: ' + satr_File + ' ')
        time.sleep(1)
    print('\r')

# Example 7:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(200, 30, 1, ind_NewLine=True)
for satr_File in lst_Files:
    print('File: ' + satr_File + ' ')
    for i in range(0, 101, 10):
        obj_ProgressBar.print_Bar(i)
        time.sleep(1)
    print('\r')


# Example 8:
print("\033c")
obj_ProgressBar = ebx_progressbar.progressBar(ind_NewLine=True)
for satr_File in lst_Files:
    for i in range(0, 101, 10):
        obj_ProgressBar.print_Bar(i, pre_Text='File: ' + satr_File)
        time.sleep(1)
    print('\r')
    obj_ProgressBar.reset()

Versioning

=======================================================================================
== Log Changes:
== Date:            2015-05-13
== Author:          Fausto Branco
== Version:         1.0.0
== Description:     Initial Version
=======================================================================================

License

Metadata

Release files for ebx-progressbar 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebx-progressbar 1.1.1
File Size Uploaded Provenance Actions
ebx_progressbar-1.1.1.tar.gz 16.9 kB Without provenance Details for ebx_progressbar-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ebx-progressbar 1.1.1
File Interpreter ABI Platform Actions
ebx_progressbar-1.1.1-py3-none-any.whl Python 3 none any Details for ebx_progressbar-1.1.1-py3-none-any.whl

Total release size: 33.0 kB

Release files / ebx_progressbar-1.1.1.tar.gz

Download URL ebx_progressbar-1.1.1.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1a73cc41512517fcff8cfe79a1faad9c885fd234384c98e45482d8f3dbe18849
BLAKE2b-256 checksum
How to use checksums
b9d5d7ca279f09536c483f77cb33b83051446c42af4c8afb64fe0e4d6653a4eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

Release files / ebx_progressbar-1.1.1-py3-none-any.whl

Download URL ebx_progressbar-1.1.1-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a34ed87fc5b3de7f79c725cd274eff0d2169d5bdbfaf0a4c80b5c9486a4e4345
BLAKE2b-256 checksum
How to use checksums
a2627999c879bc890f1891d038e290b32c06ee9490417483d012e5a14964017e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

Security for ebx-progressbar 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page