Module for displaying (text based) status update lines.
Project description
# statusbar
Python package for displaying status information in command line interfaces.
[![Build status](https://img.shields.io/travis/mailund/statusbar.svg)](https://travis-ci.org/mailund/statusbar)
[![Coverage Status](https://img.shields.io/coveralls/mailund/statusbar.svg)](https://coveralls.io/github/mailund/statusbar)
[![License](https://img.shields.io/badge/license-GPL%20%28%3E=%203%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-3.0.html)
This 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.
```Python
import colorama
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, " ", bg=colorama.Back.GREEN)
bar.add_progress(5, " ", bg=colorama.Back.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()))
```
Python package for displaying status information in command line interfaces.
[![Build status](https://img.shields.io/travis/mailund/statusbar.svg)](https://travis-ci.org/mailund/statusbar)
[![Coverage Status](https://img.shields.io/coveralls/mailund/statusbar.svg)](https://coveralls.io/github/mailund/statusbar)
[![License](https://img.shields.io/badge/license-GPL%20%28%3E=%203%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-3.0.html)
This 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.
```Python
import colorama
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, " ", bg=colorama.Back.GREEN)
bar.add_progress(5, " ", bg=colorama.Back.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()))
```
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
statusbar-0.1.0.tar.gz
(5.9 kB
view hashes)