https://github.com/mailund/statusbar
Python package for displaying status information in command line interfaces.
https://github.com/mailund/statusbar
Last synced: 2 months ago
JSON representation
Python package for displaying status information in command line interfaces.
- Host: GitHub
- URL: https://github.com/mailund/statusbar
- Owner: mailund
- License: gpl-3.0
- Created: 2016-09-21T12:54:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T13:26:48.000Z (about 8 years ago)
- Last Synced: 2025-03-10T14:52:49.297Z (3 months ago)
- Language: Python
- Size: 57.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=========
Statusbar
=========Python package for displaying status information in command line interfaces.
|ci-status| |coveralls| |codacy| |license| |versions| |status| |pyversions| |downloads|
.. |ci-status| image:: https://img.shields.io/travis/mailund/statusbar.svg
:target: https://travis-ci.org/mailund/statusbar
:alt: Build status
.. |coveralls| image:: https://img.shields.io/coveralls/mailund/statusbar.svg
:target: https://coveralls.io/github/mailund/statusbar
:alt: Coverage
.. |codacy| image:: https://img.shields.io/codacy/grade/b54b5ad32f964b8b9e5390b72c04964c/master.svg
:target: https://www.codacy.com/app/mailund/statusbar?utm_source=github.com&utm_medium=referral&utm_content=mailund/statusbar&utm_campaign=Badge_Grade
:alt: Codacy code review
.. |license| image:: https://img.shields.io/pypi/l/statusbar.svg
:target: https://pypi.python.org/pypi/statusbar
:alt: License.. |versions| image:: https://img.shields.io/pypi/v/statusbar.svg
:target: https://pypi.python.org/pypi/statusbar
:alt: Packgage version
.. |status| image:: https://img.shields.io/pypi/status/statusbar.svg
:target: https://pypi.python.org/pypi/statusbar
:alt: Package stability
.. |pyversions| image:: https://img.shields.io/pypi/pyversions/statusbar.svg
:target: https://pypi.python.org/pypi/statusbar
:alt: Python versions supported
.. |downloads| image:: https://img.shields.io/pypi/dm/statusbar.svg
:target: https://pypi.python.org/pypi/statusbar
:alt: Monthly PyPI downloadsThis package can be used to show status information through one or more lines of formatted status bars where each status bar consist of three components: a label, a progress bar, and a statistics/summary field.
.. code-block:: python
import statusbar
bar = statusbar.StatusBar("Test status")
bar.add_progress(10, "#")
bar.add_progress(5, ".")
print(bar.format_status())bar = statusbar.StatusBar("Test status")
bar.set_progress_brackets('','')
bar.add_progress(10, " ", color="green")
bar.add_progress(5, " ", color="red")
print(bar.format_status())st = statusbar.StatusTable()
sb = st.add_status_line("Test")
sb.add_progress(1, "#")
sb.add_progress(1, " ")
sb = st.add_status_line("Testing progress")
sb.add_progress(10, "#")
sb.add_progress(5, ".")
sb.add_progress(10, " ")
print("\n".join(st.format_table()))