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

Uploaded Source

Built Distribution

slapdash-1.0.3-py3-none-any.whl (441.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slapdash-1.0.3.tar.gz
  • Upload date:
  • Size: 430.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.17 Darwin/22.4.0

File hashes

Hashes for slapdash-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6e765823140f156438575e8757c06282446dca56dde1dcfcfe7f986e52dc8ece
MD5 884b952d60e421be900a0060d96127e1
BLAKE2b-256 07941ed89faa679226a6324f3cd8685897c696d064d65a0065e05e765d5eca68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slapdash-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 441.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.17 Darwin/22.4.0

File hashes

Hashes for slapdash-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 76893a5ba3906515025da81c6f6812e5416f4d38d12ecc49f7d461ef0d28c9e0
MD5 d9695cc5032b8f2b034ded53c30be02b
BLAKE2b-256 80ce8e407f238b498e156869dbb1cb85bf6ee534e25a351f100469c8a4d1608b

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