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

Uploaded Source

Built Distribution

slapdash-1.0.2-py3-none-any.whl (441.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slapdash-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f1d5873affcbe555efb89494eb91173c20c7c2079385017f1914dcea8e6939f8
MD5 e626a2ab8b13dd9972ce4e3a79e1448a
BLAKE2b-256 cb471b8c6b3ace8666ab97d5c06e280f3f76868b3f3477c306093be0e08ed968

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slapdash-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1951d4a2eac6008b846bfcbe90d1bbaff4ae453be24ff64a41e5af36ba3113da
MD5 3c1d4ca8f9e1ca57d21c4d32ffebcc44
BLAKE2b-256 bed36e813e15e59e2bf05d6c2249e676ca832277493a34e360ec1f8d325bae8a

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