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, if next_app_id(optional) is specified, it forwards the event to the specified application
self.app.next(event: object, next_app_id)
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-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c770b000a962a536eb87409d90e679a3137e990e49c38c1097063bd74e68a98 |
|
MD5 | 7d7981fa0f46ea7121a86c7343c41e22 |
|
BLAKE2b-256 | d34004b2efb4ae7c672c0a9dcd7e9f79c20395b322089363b7183864f69c5a57 |
Close
Hashes for signal_application_python_sdk-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a92f594cfd574910d60607a5e0ad7a378faeed803e73c39186d622c24e108ad4 |
|
MD5 | a861343b58dad40f7349ab7efcc1f241 |
|
BLAKE2b-256 | 7ab392c8585abd2d9ee53bda6604d0d3a754046668f06122de411abb79c0edd6 |