Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bbaovanc/libprogress
Python library for easy generation of progress bars.
https://github.com/bbaovanc/libprogress
pip pip3 progress progress-bar progressbar pypi pypi-package pypi-source python python-3 python-3-6 python-3-7 python-3-8 python-library python3 python36 python37 python38
Last synced: 3 days ago
JSON representation
Python library for easy generation of progress bars.
- Host: GitHub
- URL: https://github.com/bbaovanc/libprogress
- Owner: BBaoVanC
- License: gpl-3.0
- Created: 2020-03-16T00:55:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-13T16:42:46.000Z (about 3 years ago)
- Last Synced: 2025-01-19T07:42:12.803Z (8 days ago)
- Topics: pip, pip3, progress, progress-bar, progressbar, pypi, pypi-package, pypi-source, python, python-3, python-3-6, python-3-7, python-3-8, python-library, python3, python36, python37, python38
- Language: Python
- Homepage: https://pypi.org/project/libprogress/
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libprogress
[![Build Status](https://drone.bbaovanc.com/api/badges/bbaovanc/libprogress/status.svg)](https://drone.bbaovanc.com/bbaovanc/libprogress)
![PyPI](https://img.shields.io/pypi/v/libprogress)
![PyPI - License](https://img.shields.io/pypi/l/libprogress)Package that allows easy generation of progress bars. Originally on my [NameGenerator](https://github.com/BBaoVanC/NameGenerator) project.
## Features
* Easy to use
* Imported as module
* Always tested before release
* Officially supports latest two 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.
``` python
import libprogressfor 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:
``` plaintext
[####################] 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:
``` plaintext
[#-------------------] 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`](https://git.bbaovanc.com/bbaovanc/libprogress/src/branch/master/LICENSE).