Skip to main content

A simple progress bar for loop progress measurement and time estimation.

Project description

EZ Bar

A simple progress bar for loop progress measurement and time estimation.

The original idea and base script for this repository was created by @carlospuenteg. I just decided to refactor the code and add some nice features such as remaining and elapsed time counting.

Features

  • Simple and easy to use (create a progress bar and update it)
  • Colorful output so that you always see how your loop is progressing
  • Estimated time of completion prediction. No need to stare at the screen for minutes!
  • Elapsed time display. Know the efficiency of your loops!

Installation

macOS / UNIX

python3 -m pip install ezbar

Windows

py -m pip install ezbar

Usage

Just import the ProgressBar class and it will be ready to go!

from ezbar.progress_bar import ProgressBar

Example

from time import sleep
from ezbar.progress_bar import ProgressBar

ITERATIONS = 100

# Use default settings:

pb = ProgressBar(ITERATIONS)

for i in range(ITERATIONS):
    sleep(0.05)
    pb.update(i)

# Or customize them all you want!

pb = ProgressBar(ITERATIONS, text="Loading...", width=30)

for i in range(ITERATIONS):
    sleep(0.05)
    pb.update(i)

Disclaimer

This progress bar does not serve a performance counting purpose. It is only meant to be used for orientative loop progress measurement and time estimation. Do not use it for strict performance measurements.

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

ezbar-1.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

ezbar-1.5-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file ezbar-1.5.tar.gz.

File metadata

  • Download URL: ezbar-1.5.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ezbar-1.5.tar.gz
Algorithm Hash digest
SHA256 72d4616e5eb6da7237bfafb599f34a7474a2ca22cfa8bf6396509c452d05720c
MD5 79d3a1cac21a9f211ffcfb25cf147964
BLAKE2b-256 3c5d2dce631245d37d3f28704c6f535e7e47a95b096320dcd3fda1ea5d5caf3f

See more details on using hashes here.

File details

Details for the file ezbar-1.5-py3-none-any.whl.

File metadata

  • Download URL: ezbar-1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ezbar-1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 153180b9257fc8e3f8f3ddfdc01d1bb0537142ff66e9d4c87297b44d59a1e95b
MD5 61f749606de4ff7e87ef7363747e5ce6
BLAKE2b-256 a3a3d54d7f86b7b883fa2afbaf562dfe6fe8e5e95e0aa8a18b9866a5949f854a

See more details on using hashes here.

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