Skip to main content

A progress-bar designed to be useful and easy to use.

Project description

dashbar

PyPI - Version Pepy Total Downloads GitHub repo size

A progress-bar designed to be useful and easy to use.

dashbar-demo-preview

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
  • 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

dashbar-2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dashbar-2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file dashbar-2.0.tar.gz.

File metadata

  • Download URL: dashbar-2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for dashbar-2.0.tar.gz
Algorithm Hash digest
SHA256 60f0bc10cc3c4b5fa1158fbd888cb56b67d41454ce870b05d8a6ee20bbf77dc1
MD5 898afa49eb18a4850c14b242b42b034e
BLAKE2b-256 bbf178d570fc7b18a1b3d310d125576c5e413ae1a26fe13c601274c0eacd458e

See more details on using hashes here.

File details

Details for the file dashbar-2.0-py3-none-any.whl.

File metadata

  • Download URL: dashbar-2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for dashbar-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbc87c1c3fda5f75da2536abb78b777314a0c7295137c2cd0d3de15c18eea15e
MD5 497ab2959729dfbfba2c175caae82f0e
BLAKE2b-256 6030dd5ccd4ee8a5ba81b6fc51ea67cffd2ed092d12ba8d8125ada0e6998b011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page