https://github.com/claytonpassmore/progress
A simple progress bar library for Python 3
https://github.com/claytonpassmore/progress
commandline-interface progress-bar python3
Last synced: 2 months ago
JSON representation
A simple progress bar library for Python 3
- Host: GitHub
- URL: https://github.com/claytonpassmore/progress
- Owner: ClaytonPassmore
- Created: 2018-06-26T00:30:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T02:32:08.000Z (about 7 years ago)
- Last Synced: 2025-07-09T17:08:36.555Z (6 months ago)
- Topics: commandline-interface, progress-bar, python3
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Progress
A simple command line progress bar library for Python 3.
## Installation
Just use pip!
```bash
git clone git@github.com:ClaytonPassmore/progress.git
pip install ./progress
```
## Usage
Track progress while looping over a range.
```python
from progress import progress_range
for i in progress_range(10, -2, -2):
process(i)
```
```
83.3% [################################## ]
```
Track progress while looping over an iterable object.
```python
from glob import glob
from progress import progress_bar
filenames = glob('*')
for filename in progress_bar(filenames):
process(filename)
```
```
66.7% [########################### ]
```
Track progress while looping over a stream of undefined length.
```python
from progress import progress_counter
file_descriptor = open('file.txt', 'r')
for line in progress_counter(file_descriptor):
process(line)
```
```
Processed: 66/Unknown [ ###### ]
```
Manually track progress without an iterable object.
```python
from progress import manual_progress_counter
progress = manual_progress_counter()
while(True):
process()
progress.tick()
```
```
Processed: 6 [ ######### ]
```