A progress-bar designed to be useful and easy to use.
Project description
dashbar
A progress-bar designed to be useful and easy to use.
Usage
Iterating
To start dashbar, execute the following code:
for i in dashbar.dash(10, dash_type="pipe", desc="example"):
time.sleep(1/10) #completion after one second
if i == 5:
dashbar.status("half-way complete")
If the progress is large, the autodash function can be used, which adjusts the step count to fit the terminal:
for i in dashbar.autodash(10):
time.sleep(1/10)
if i == 8:
dashbar.log("eighty percent complete")
Customizing dashbar
Dashbars can be customized with the following code:
dashbar.customize(element="filler", value=" ")
List of dashbars:
- classic
- arrow
- box
- circle_charger
- box_charger
- striped
- dollar
- box_shade
- pipe
- heart
- radioactive
- benzene
- custom
List of dashbar elements:
- start
- head
- trail
- filler
- finish
Building a Dashbar
Dashbars can be built via the Dashbar class:
bar = dashbar.Dashbar(10, "box_shade")
for i in range(100):
if i%10 == 0:
bar.update(1, display=True)
time.sleep(1/20) #completion after five seconds
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dashbar-2.1.tar.gz.
File metadata
- Download URL: dashbar-2.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
210b0189bd70b928ebfb84ea63791aeb96a5d2710b9b53c7b9387b4868f86717
|
|
| MD5 |
96408fe5e8a09a884dbe96bad56eea8a
|
|
| BLAKE2b-256 |
02af2f88672added663bf78b4be8ac81aea73cfcc5d2a554e586fa229b6d3b27
|
File details
Details for the file dashbar-2.1-py3-none-any.whl.
File metadata
- Download URL: dashbar-2.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba5d321c044d4fc18a6cd4765681a0324a8a653c7be7dc2d4e2e5d59e3f64a2e
|
|
| MD5 |
c225fa50ee20216bc8f7ca6265d68e1e
|
|
| BLAKE2b-256 |
f4ea42797f3a02941a957f38ae4c26f146b32d5ade154786938b3cbdc678e9cd
|