Skip to content

ilopez5/spout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic badge

SPOUT

A Custom Python Progress Bar

There are many progress bar implementations out there, such as progress2 and tdqm. However, I wanted to try my hand at making one, and having it be independent of wrapping any Python iterable as the aforementioned libraries seem to do.

Usage:

pb = ProgressBar(width=30, pad=30, color=True)

pb.begin(label="Performing Operation 1", stages=10)
pb.checkpoint()
...
pb.checkpoint()
pb.end()

pb.begin(label="Performing Operation 2", stages=5)
...
pb.end()

Configurations:

  • stages- sets the number of stages to be completed for the bar (required)
  • width - sets the width (in characters) of the progress bar
  • pad - sets the width (in characters) of the label + padding (e.g."Label...")
  • color - allows for colored output vs uncolored.

Example:

asciicast

About

A Custom Python Progress Bar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages