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
self.app.next(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-0.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b07a5f1292016ca261c04c1921877cb319a7e886bc46b47db893c7d73d84a981 |
|
MD5 | 61d1ed5590038a3ac09bc0a55bce1dd4 |
|
BLAKE2b-256 | dcfa1084877c8f9689181ea1a10eac1361b6f411f4d6da57424a4b94e442fd4a |
Close
Hashes for signal_application_python_sdk-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4756c9c5f509084e61fdcf84598583c375a5f68942b253a39795deb358b7c53c |
|
MD5 | a31622d03e86347149a75b007ea970f5 |
|
BLAKE2b-256 | d007b3cfb3d5be18b9871a0f9faeed573037b3ae859108c4310ff51789e39671 |