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 agent and application
Initialize SDK
from signalsdk.signal_app import SignalApp
app = SignalApp()
app.initialize(onConfigUpdated, onEventReceived, onCommandReceived)
Provide a callback method to get notified when a configuration change is requested
def onConfigUpdated(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 onEventReceived(self, event):
- Will be triggered when a new event received from application's subscribed topic
Provide a callback method to get notified when an command is received from event bus
def onCommandReceived(self, command):
- Will be triggered when a new command received from device agent
Call next to forward the event to the next edgesignal application which has sdk integrated, 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-red application running on node-red.
self.app.nextNode(event: 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-3.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c4c6c9e33ca4dc83d454205ce573c963eab0a247f09e5bdc4f201160a575f9 |
|
MD5 | b04890b95f4b0870bcd220d4acb099ed |
|
BLAKE2b-256 | 6cf6a2581d7962476c7434f85c38cbaed41793c4aeaa7874f52d6592eef3bf37 |
Close
Hashes for signal_application_python_sdk-3.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c529f4b75bef5e0bb47f65885f1a7bedc87b26786cc8fe277394d2882df4014 |
|
MD5 | 564fa3f9a922cc1ec302710d2e5e2f29 |
|
BLAKE2b-256 | 40a376a5b65671fe1ff6ab22db97fdc4bfe3eeaf7e187abfa68d239e7f5f2c62 |