A pretty progressbar library
Project description
PRETTY PROGRESSBAR LIBRARY
The progress bar library that started with the idea of looking pretty
Installation
Only works with python3.
pip3 install ppl
How to use
Simple usage
import time
from ppl import pb
for i in pb(range(100)):
time.sleep(0.1)
Show task name along with the progress bar
import time
import random
from ppl import pb
total = 120
tasks = [
'Make paintball', 'Find dragons', 'Code in python', 'Take out the trash',
'Fill up water bottles for trip'
]
for task in tasks:
i = 0
for i in pb(range(total), task=task):
sleep_time = [.05, .04, .03, .02, .01][random.randint(0, 4)]
time.sleep(sleep_time) # emulating long-playing task
Custom bar length
By default the bar length is the full width of the terminal window
import time
from ppl import pb
for i in pb(range(100), bar_len=20):
time.sleep(0.1)
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
ppl-0.4.5.tar.gz
(3.3 kB
view details)
File details
Details for the file ppl-0.4.5.tar.gz
.
File metadata
- Download URL: ppl-0.4.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993f141d51e0d3b213c49685842f5ffbf7bbec2740721438a739d77aa4a499c6 |
|
MD5 | 56b3c108ed0cff9e5819e37d68cadb03 |
|
BLAKE2b-256 | 99cd6f566ce4f650996e17fe66f5fb42cfd7fa3964bf011198deea9c2977638a |