pyIOT
A python module to simplify writing device drivers for the Amazon AWS IOT service
pyIOT abstracts the AWS IOT-Core service handling all of the communications between it and our device. To implement a pyIOT application, you only need to specify how to convert from the protocol of your device into the properties that you want to expose to IOT-Core and vice-versa. This enables IOT-Core applications to be written in a handful of lines of code.
Here's an example pyIOT application for a simple relay...
import serial
import pyIOT
class Relay(Component):
@Component.componentToProperty('relayState', '^RELAY(ON|OFF)$')
def toRelayState(self, property, value):
val = { 'ON': True, 'OFF': False }.get(value)
if val: return val
raise ValueError('{0} is not a valid value for property {1}'.format(value, property))
@Component.propertyToComponent('relayState', 'RELAY{0}')
def fromRelayState(self, value):
val = { True: 'ON', False: 'OFF' }.get(value)
if val: return val
raise ValueError('{0} is not a valid relayState'.format(value))
def queryStatus(self):
return 'RELAY?\n'
try:
ser = serial.Serial('/dev/ttyUSB0',9600, timeout=0.5)
relayComponent = Relay(name = 'RelayComponent1', stream = ser, synchronous=True)
relayThing = Thing(endpoint='<your endpoint>', thingName='relayOne', rootCAPath='root-CA.crt', certificatePath='relayOne.crt',
privateKeyPath='relayOne.private.key', region='us-east-1', components=relayComponent)
relayThing.start()
except KeyboardInterrupt:
relayComponent.exit()
Features
- Handles all communications between AWS IOT-Core and your device
- Optionally allows several components to be combined into a single IOT device
- Supports synchronous and asynchronous components
- Easily interfaces with serial and network driven components
- Allows custom communication methods including GPIO driven applications
Documentation
For more details on pyIOT and its usage, please consult the documenation at https://pyiot.readthedocs.io
Metadata
Release files for pyIOT 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyIOT-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pyIOT-0.1.1-py3-none-any.whl |
Release files / pyIOT-0.1.1-py3-none-any.whl
| Download URL | pyIOT-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b29ce343dfcd14945fb8d410128a222df41143400a6ea4ee06fdf1300915151e
|
|
BLAKE2b-256 checksum How to use checksums |
3808fde36803f3e77cddae02c16aa941a09d55024dff62660b5faec255e7fac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0
|
Security for pyIOT 0.1.1
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.