Skip to main content

Python package to easily create a statusbar that can be modified and expanded with pythons formatted strings

Project description

statusbar

Python package that enables the easy creation of a statusbar. The creation of a statusbar utilizes pythons formatted strings to easily create custom bars that can be updated in an asyncronous manner. This project is designed to be lightweight and thus requires no additional packages.

Installation

python3 -m pip install pystatusbar

From source

git clone https://github.com/lukaswd/statusbar.git
cd statusbar
python3 -m pip install .

Example Usage

import time

from pystatusbar import StatusBar

if __name__ == '__main__':
    format_start = " This is a test {WORD} bar with lines: {i}"
    format_end = " {time} "

    bar = StatusBar(format_start=format_start, format_end=format_end, i=0, WORD="")
    bar.start()
    for i in range(50):
        print(f"Test Line {i}")
        if i % 10 == 0:
            bar.update(i=i)

        if i == 25:
            bar.update(WORD="status")

        time.sleep(0.1)
    bar.stop()

The bar also works with sys.stdout.write and the python logging library

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

pystatusbar-0.0.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

pystatusbar-0.0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pystatusbar-0.0.4.tar.gz.

File metadata

  • Download URL: pystatusbar-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for pystatusbar-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e0deb71608b8599b5ca3384cc649e4b73e0fc76691d2b3eeb98fae92fa5d356a
MD5 c90c3cd3f9ef640354500d58600e05e2
BLAKE2b-256 7b8d1e6b87275921c89c436596cf4680ca95362e03313cd8920d358135406c0c

See more details on using hashes here.

File details

Details for the file pystatusbar-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pystatusbar-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for pystatusbar-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25b892aaf94ba2a0957494fe522d6c3134accd161b4084eb6b10697b32f6a846
MD5 e273de45cdd20fbcce8b5633d012b5f5
BLAKE2b-256 e81d1f4cc3a7dfc6f60a632a4581c5d54df69ea6c642ee1bbe7f41599ca3f16e

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