signal application services
Project description
signal-application-python-sdk
Setup
Add Signal-Application-SDK as a dependency to requirements.txt
signal-application-python-sdk==<latest>
Install dependencies
python setup.py install
Entry point for Signal Application SDK
- Creates a bi-directional communication between device shadow and application
Initialize SDK
self.app = SignalApp()
self.app.initialize(self.onConfigChange, self.onEvent)
Provide a callback method to get notified when a configuration change is requested
def onConfigChange(self, config):
- Will be triggered when a new configuration change requested from the cloud
Provide a callback method to get notified when an event is received from event bus
def onEvent(self, event):
- Will be triggered when a new event received from application's subscribed topic
Call next to forward the event to the next node (application), if next_app_id(optional) is specified, it forwards the event to the specified application
self.app.next(event: object, next_app_id)
Call next to forward the event to the next node running on node-red.
self.app.nextNode(event: object)
Call reportConfigurationChange to report when configuration change is applied
self.app.reportConfigurationChange(config: object)
Sample usage
Consider adding these two params to the application detail
config object will be reveived as below
{
message: 'some text message',
param2: 101
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for signal-application-python-sdk-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec68f77ea2c6d232720eb6ab6acc957c31420aa9ca3d800663f985f7c01ef2e |
|
MD5 | ceaaf85efab3460fccd82d006590f2e7 |
|
BLAKE2b-256 | d8aff949c2f101e34e5ecb6b607484d2f02be21f9270fdb8e0ac4f94e41290f2 |
Close
Hashes for signal_application_python_sdk-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6d1af204d19e1bf665f7682fbb11adae7fc77c7aeafb38a7c05ad2635d9d6b5 |
|
MD5 | 8c0cab8ae46e02dcdaa95fb9b1faf616 |
|
BLAKE2b-256 | 3b13f960e60c51d3d70a366ed84621308feffa637c9a4de62ba498f05523c0c4 |