Library containing progress bar generator
Project description
libnamegen
Package that allows easy generation of progress bars. Originally on my NameGenerator project.
Features
- Easy to use
- Imported as module
- Always tested before release
- Supports latest three versions of Python 3
How to Install
Run the command pip install libprogress
. If you want to specify a specific Python version to use for pip, use a command such as pip3
or pip3.8
.
Documentation
API
The following is an example that utilizes a progress bar with default length.
import libprogress
for i in range(20): # example loop
do(something) # put the code to do what you are tracking the progress of
print(libprogress.genbar(curprg=i+1, maxprg=20), end="\r") # print progress
print(libprogress.genfullbar(prg=20)) # print the last bar
Final output:
[####################] 100% [20/20]...done
If you don't put end="\r"
, then each progress bar won't overwrite the last. The output will look like the following:
[#-------------------] 5% [1/20]
[##------------------] 10% [2/20]
[###-----------------] 15% [3/20]
[####----------------] 20% [4/20]
[#####---------------] 25% [5/20]
[######--------------] 30% [6/20]
[#######-------------] 35% [7/20]
[########------------] 40% [8/20]
[#########-----------] 45% [9/20]
[##########----------] 50% [10/20]
[###########---------] 55% [11/20]
[############--------] 60% [12/20]
[#############-------] 65% [13/20]
[##############------] 70% [14/20]
[###############-----] 75% [15/20]
[################----] 80% [16/20]
[#################---] 85% [17/20]
[##################--] 90% [18/20]
[###################-] 95% [19/20]
[####################] 100% [20/20]
[####################] 100% [20/20]...done
License
libprogress is licensed under the GPLv3 license. For more information, please refer to LICENSE
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file libprogress-3.0.1.post1.tar.gz
.
File metadata
- Download URL: libprogress-3.0.1.post1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ab9e105b1a1cc1bda1f18c987766807ac1eebfdc75ed46b5593c3003d4ff345 |
|
MD5 | bb8bdd8a8d40bd386da47b4ce001f80d |
|
BLAKE2b-256 | fe828f52965fe502d7c31bcdc65ca05bf58a0ee1b77b1aa14ab6be0c8a98afe1 |
File details
Details for the file libprogress-3.0.1.post1-py3-none-any.whl
.
File metadata
- Download URL: libprogress-3.0.1.post1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67d244796ec2d940a8e77de86e38e50812be85783e32cacc338054e740cc568f |
|
MD5 | e31dc7e73deb454cc14239e055dff3bb |
|
BLAKE2b-256 | d1e58b91c095c95cb6cdfac470ecac77f9bdf44e2eb410a3a6541ebeec64610f |