Devicehive python web configurator
This is proxy package for devicehive-python that provides simple web interface to configure connection.
Installation
pip install devicehive-webconfig
Usage
Basics
import time
import json
from devicehive_webconfig import Server, Handler
class ExampleHandler(Handler):
_device = None
def handle_connect(self):
self._device = self.api.put_device(self._device_id)
super(ExampleHandler, self).handle_connect()
def send(self, data):
self._device.send_notification(data)
if __name__ == '__main__':
server = Server(ExampleHandler, is_blocking=False)
server.start()
print('Go to http://127.0.0.1:8000/ and configure your connection.')
while not server.dh_status.connected:
# Wait till DH connection is ready
time.sleep(.001)
for i in range(10):
server.deviceHive.handler.send('notification #{}'.format(i))
Additional Handler arguments can be passed as args and kwargs
Advanced
This library was designed to be easily extended. Additional routes, controllers, templates and static files can be added. There is an example that shows how this can be done.
Metadata
Release files for devicehive-webconfig 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| devicehive_webconfig-1.0.2.tar.gz | 66.8 kB | Without provenance | Details for devicehive_webconfig-1.0.2.tar.gz |
Release files / devicehive_webconfig-1.0.2.tar.gz
| Download URL | devicehive_webconfig-1.0.2.tar.gz |
|---|---|
| Size | 66.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e1c7e852f37de94325f6423cffb98614374356650af8fe5fdddeace999057b8
|
|
BLAKE2b-256 checksum How to use checksums |
1cd726108c01f8ce4b814a4da83af3508968cb5d8f75ce0e8a8b0abe916de907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for devicehive-webconfig 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.