Skip to main content

Create device and application control dashboards instantly

Project description

Slapdash

https://github.com/cathaychris/slapdash/

The Slapdash library lets you create a control dashboard with ease. It takes device driver classes written in simple python and automatically generates

  • A web server exposing the class via a RESTful API, that can be accessed with HTTP requests or using the provided clients;
  • An automatically generated fronted rendered in a web page that directly connects to the web server for immediate access;
  • and modularly permits the bootstrapping of other interfaces such as RPC. Bring-Your-Own-Interface.

For example, it will turn this:

class Device:

    _current = 0.0
    _voltage = 0.0
    _power = False

    @property
    def current(self):
        # run code to get current
        return self._current

    @current.setter
    def current(self, value):
        # run code to set current
        self._current = value

    @property
    def voltage(self):
        # run code to get voltage
        return self._voltage

    @voltage.setter
    def voltage(self, value):
        # run code to set voltage
        self._voltage = value

    @property
    def power(self):
        # run code to get power state
        return self._power

    @power.setter
    def power(self, value):
        # run code to set power state
        self._power = value

    def reset(self):
        self.current = 0.0
        self.voltage = 0.0

into this:

Try running this example with

from slapdash.examples import run_example
run_example('doc_example')

Credits

Slapdash was developed in the TIQI group at ETH Zürich, primarily by Matt Grau.

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

slapdash-1.0.1.tar.gz (430.4 kB view details)

Uploaded Source

Built Distribution

slapdash-1.0.1-py3-none-any.whl (440.9 kB view details)

Uploaded Python 3

File details

Details for the file slapdash-1.0.1.tar.gz.

File metadata

  • Download URL: slapdash-1.0.1.tar.gz
  • Upload date:
  • Size: 430.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.7 Darwin/21.6.0

File hashes

Hashes for slapdash-1.0.1.tar.gz
Algorithm Hash digest
SHA256 759d71bf8775a2216544b83d184c60fbc2a239f7bf40089d0a973cf719ba97c4
MD5 f98101dc8116ba0d764bceeb76971e53
BLAKE2b-256 c0ae45163ccb4ea5ac74ab5548c0120475eb5f415e99875923ab2cd3f05b7ec9

See more details on using hashes here.

File details

Details for the file slapdash-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: slapdash-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 440.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.7 Darwin/21.6.0

File hashes

Hashes for slapdash-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f29257089a18c859ca7a20d23eecebda86e8b446b79c9d09ad70edf2db7fb7e
MD5 661f918ef3f4a31fd2d586dadd9051ab
BLAKE2b-256 7f38eeb6a1209e5fa1a87e441d215f1be05c19e59dd490472a83f7219c043b0a

See more details on using hashes here.

Supported by

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