• Stars
    star
    433
  • Rank 100,464 (Top 2 %)
  • Language
    Python
  • Created over 7 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terminal dashboards for Python

badge badge Latest Version License

Dashing is a library to quickly create terminal-based dashboards in Python.

Example

Similar libraries for other languages: termui blessed blessed-contrib

Dependencies

The blessed library.

Installation

Use packages from your Linux distribution, or:

pip install dashing

Usage

Usage
from time import sleep, time
import math

from dashing import *

if __name__ == '__main__':

    ui = HSplit(
            VSplit(
                HGauge(val=50, title="only title", border_color=5),
                HGauge(label="only label", val=20, border_color=5),
                HGauge(label="only label", val=30, border_color=5),
                HGauge(label="only label", val=50, border_color=5),
                HGauge(label="only label", val=80, border_color=5),
                HGauge(val=20),
                HGauge(label="label, no border", val=55),
                HSplit(
                    VGauge(val=0, border_color=2),
                    VGauge(val=5, border_color=2),
                    VGauge(val=30, border_color=2),
                    VGauge(val=50, border_color=2),
                    VGauge(val=80, border_color=2, color=4),
                    VGauge(val=95, border_color=2, color=3),
                    ColorRangeVGauge(
                        val=100,
                        border_color=2,
                        colormap=(
                            (33, 2),
                            (66, 3),
                            (100, 1),
                        )
                    ),
                )
            ),
            VSplit(
                Text('Hello World,\nthis is dashing.', border_color=2),
                Log(title='logs', border_color=5),
                VChart(border_color=2, color=2),
                HChart(border_color=2, color=2),
                HBrailleChart(border_color=2, color=2),
                # HBrailleFilledChart(border_color=2, color=2),
            ),
            title='Dashing',
        )
    log = ui.items[1].items[1]
    vchart = ui.items[1].items[2]
    hchart = ui.items[1].items[3]
    bchart = ui.items[1].items[4]
    # bfchart = ui.items[1].items[5]
    log.append("0 -----")
    log.append("1 Hello")
    log.append("2 -----")
    prev_time = time()
    for cycle in range(0, 200):
        ui.items[0].items[0].value = int(50 + 49.9 * math.sin(cycle / 80.0))
        ui.items[0].items[1].value = int(50 + 45 * math.sin(cycle / 20.0))
        ui.items[0].items[2].value = int(50 + 45 * math.sin(cycle / 30.0 + 3))

        vgauges = ui.items[0].items[-1].items
        for gaugenum, vg in enumerate(vgauges):
            vg.value = 50 + 49.9 * math.sin(cycle / 12.0 + gaugenum)

        t = int(time())
        if t != prev_time:
            log.append("%s" % t)
            prev_time = t
        vchart.append(50 + 50 * math.sin(cycle / 16.0))
        hchart.append(99.9 * abs(math.sin(cycle / 26.0)))
        bchart.append(50 + 50 * math.sin(cycle / 6.0))
        # bfchart.append(50 + 50 * math.sin(cycle / 16.0))
        ui.display()

        sleep(1.0/25)

More Repositories

1

bottle-cork

Authentication module for the Bottle and Flask web frameworks
Python
172
star
2

nim-dashing

Terminal dashboards for Nim
Nim
111
star
3

nim-httpauth

HTTP Authentication library for Nim
Nim
86
star
4

nimfmt

Nim code formatter / linter / style checker
Nim
85
star
5

nim-morelogging

Logging library for Nim
Nim
52
star
6

nim-package-directory

Nim package directory - documentation builder
Nim
51
star
7

nim-libsodium

Nim wrapper for the libsodium library
Nim
47
star
8

nim-lmdb

Nim LMDB wrapper
Nim
39
star
9

shoebill

Web-based editor for Pelican and Nikola
Python
33
star
10

nim-socks5

Nim Socks5 library
Nim
30
star
11

dnscapy

Automatically exported from code.google.com/p/dnscapy
Python
28
star
12

nim-tor

Nim Tor helper library
Nim
24
star
13

nim-syslog

Nim syslog module
Nim
21
star
14

wave_function_collapse

Wave function collapse library for Nim
Nim
15
star
15

nimi3status

A lightweight status bar for i3 written in Nim
Nim
14
star
16

nim-seccomp

Seccomp (libseccomp2) adapter for the Nim language
Nim
12
star
17

distrobadges

Badges for Linux/FLOSS distributions (mirror: https://salsa.debian.org/debian/distrobadges)
Nim
12
star
18

nim-pop3

Nim POP3 module
Nim
9
star
19

nim_project_maker

Initialize a Nim project directory
Nim
8
star
20

nim-fswatch

Nim wrapper for the fswatch library
Nim
8
star
21

nim-mmgeoip

MaxMind GeoIP database client for Nim
Nim
7
star
22

nim-libnotify

A minimalistic libnotify wrapper
Nim
7
star
23

nim-testrunner

Nim test runner
Nim
7
star
24

nim-statsd-client

A simple StatsD client for Nim
Nim
7
star
25

nim-gnutls

Nim wrapper for GnuTLS
Nim
6
star
26

ssl-comparison

Compare SSL implementations against badssl.com
Python
6
star
27

nim-sdnotify

systemd service notification client for Nim
Nim
5
star
28

desktop-security-assistant

Help desktop users improve their security
Python
5
star
29

nim-bencode

Bencode library for Nim
Nim
5
star
30

tsundoku

Simple and lightweight OPDS ebook server
Nim
4
star
31

nim-planet

Nim RSS feed planet at https://planet.nim-lang.org
XSLT
4
star
32

nim-libu2f

FIDO U2F server-side and client-side library for Nim
Nim
4
star
33

debian-code-search-cli

Debian Code Search CLI tool moved to https://salsa.debian.org/debian/codesearch-cli
Python
4
star
34

nim-i3ipc

i3 IPC client library for Nim
Nim
4
star
35

tox-pytest-summary

Print a simple summary of failing tests from Tox + py.test
Python
4
star
36

conbuilder

Container-based Debian package builder - moved to:
Python
4
star
37

nim-libgcrypt

libgcrypt wrapper for Nim
Nim
4
star
38

dns-firewall

A proxy to inspect and mangle locally generated DNS queries with a Gtk interface.
Python
3
star
39

nim-netdata-plugin

Helper to create native Netdata plugins using Nim
Nim
3
star
40

nimachine

A simple 2D racing game inspired by MicroMachines
Nim
3
star
41

minivault

Local credentials vault with a permission model
Nim
2
star
42

nim-ci

Continuous Integration for the Nim compiler and repositories
Python
2
star
43

nim-etcd-client

etcd client
Nim
2
star
44

geoip-lastlog

Geolocation of SSH last login
Python
2
star
45

qrserver

A simple tool to serve a file to a smartphone by publishing a QR code
Python
2
star
46

nim-circleci

Nim CircleCI client
Nim
1
star
47

syslogjd

Syslog to journald collector
Nim
1
star
48

supcut

Simple unobtrusive Python continuous unit testing
Python
1
star
49

github-traffic-charts

Generate traffic charts from GitHub
Nim
1
star
50

debian-slimmer

Estimate the disk space used by installed packages, including dependencies
Python
1
star
51

pelican-events

Pelican events plugin: scans blog posts for an events and generates an .ical calendar file.
Python
1
star
52

nim-nimlog

See
Nim
1
star