Skip to main content

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 Settings Settings

config object will be reveived as below

{
    message: 'some text message',
    param2: 101
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

signal_application_python_sdk-3.2.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

signal_application_python_sdk-3.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file signal_application_python_sdk-3.2.0.tar.gz.

File metadata

File hashes

Hashes for signal_application_python_sdk-3.2.0.tar.gz
Algorithm Hash digest
SHA256 a46c74c02fda741992c7883518f9f516e7a404fe3ade00cd81d7da8388c25118
MD5 115afb4c004d0fd050bc95541d48cf5e
BLAKE2b-256 fb3bcbe13f91f5c82b335ac8b8747506219a6ae78a1ea27d5aa27625d375e27f

See more details on using hashes here.

File details

Details for the file signal_application_python_sdk-3.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for signal_application_python_sdk-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac4904a3edce95648f7dce13787b3efd80444b633b3bb5667844708ab6b448ac
MD5 779ab74a619abdf12f7eac1db7e71724
BLAKE2b-256 dce2b842b7f4f91a782ffeeb7423e9d3f1c0bea3ed308759c82a80f5546a1f9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page