Git Product home page Git Product logo

ezbar's Introduction

EZ Bar

PyPI release

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

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

ezbar-banner

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!
ezbar-demo.mp4

Installation

The installation of this module is performed via the Python Package Index (PyPI).

macOS / UNIX

python3 -m pip install ezbar

Windows

This operating system is not supported yet.

Usage

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

from ezbar import ProgressBar

Example

from time import sleep
from ezbar 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.

ezbar's People

Contributors

erlete avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.