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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f381a36164974b85fd9d3f3c9ee6d6bf1e88635893b921728238917ecc29c934 |
|
MD5 | e19f11ccf2adcee1b605253111c6f903 |
|
BLAKE2b-256 | bafdf4220a4655773a886a04a1b2395536516385cd72ef49410fbfd71bfd46e9 |
Close
Hashes for signal_application_python_sdk-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cbbc1c128c5b8a669c49b74731fef3bd78d9527540dbad6e569018dd71d59e |
|
MD5 | ae51c1fee8cf8f57fe7d8771a4e30a0b |
|
BLAKE2b-256 | 6dc365961f578828fa943a1ce5a3562632be5b4d0822126821d9b15d835a9c5c |