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.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

File hashes

Hashes for signal_application_python_sdk-3.2.1.tar.gz
Algorithm Hash digest
SHA256 9574ad49343219a0752c89276608325fdf96346378d88e7fcad0a6bbab01a3f6
MD5 ff373878bc02b9add3ad709b69e7df99
BLAKE2b-256 7bb22ad5d04a54c812f8a51968489fc3b626411639dac51b72f68b37d1725ab9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for signal_application_python_sdk-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f83afb28c32dfc47282f814762859750c69385093ea7cf4d3012f9883e4e0812
MD5 1cf2c92e94086edf3c3912c6d71074b9
BLAKE2b-256 6fd58ec0fc7ecb969d6d9e88820b051ace4fc14c1768198c74172d369e4d0c64

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