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.0.tar.gz (430.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slapdash-1.0.0.tar.gz
  • Upload date:
  • Size: 430.5 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.0.tar.gz
Algorithm Hash digest
SHA256 eb60049942815cfd47d3b21ba85a6bc7cd21181f546e4f93d92c6b5b841f6934
MD5 ea6a98d9e1abc70119655758ef39deeb
BLAKE2b-256 fb9c81ee0ee9fe49a3bbc70f00423f04997d96affa7bb31295606c7255a78361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slapdash-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acb14f9997d2098a0d927f685937df53a566cad1f4eb7217d1e84aa393446280
MD5 ace55b4211307aaaab706ead42049d78
BLAKE2b-256 8a8459236975e50919b12a12d947667527b1eb17aa7ad61829b1e2cdd106db79

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