{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Quick Start Guide:","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"quick-start-guide","__idx":0},"children":["Quick Start Guide:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Python SDK provides modules for developing an IIoT Edge App using Python 3.8 or higher.  All examples assume this has been installed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should also update 'pip':"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"> pip install -U pip\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-an-edge-app","__idx":1},"children":["Create an Edge App"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The IIoT Edge App Python SDK provides the following modules combined within one Python package called ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://pypi.org/project/agoraiot/"},"children":["agoraiot"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["agora_logging"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["agora_busclient"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["agora_config"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["agora_utils"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To install the package use:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cmd","header":{"controls":{"copy":{}}},"source":"> pip install agoraiot\n","lang":"cmd"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Alternatively, create a requirements.txt file and place all dependencies there."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"hello-world","__idx":2},"children":["\"Hello World!\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["helloWorld.py"]}," file:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from agoraiot import logger\n\nlogger.info(\"Hello World!\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Execute using Python:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cmd","header":{"controls":{"copy":{}}},"source":"> python helloWorld.py\n","lang":"cmd"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-an-edge-application-container-image","__idx":3},"children":["Creating an Edge Application Container Image"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create the following files:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"helloworld.py [from above]\nDockerfile\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dockerfile:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"Dockerfile","header":{"controls":{"copy":{}}},"source":"FROM python:3.12-alpine3.21\nADD ./src app\nRUN pip install agoraiot\nADD requirements.txt /\nRUN pip3 install -r requirements.txt\nWORKDIR /app\nCMD python3 app/helloWorld.py\n\n","lang":"Dockerfile"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the following command to build the image:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"cmd","header":{"controls":{"copy":{}}},"source":"> docker build .\n","lang":"cmd"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK is available for CSharp application. Details to setup application using CSharp SDK is ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/agora/gettingstarteddotnet"},"children":["Quick Guide for CSharp"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuring-and-using-the-sdk-in-your-application","__idx":4},"children":["Configuring and using the SDK in your application"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-configuration-at-startup","__idx":5},"children":["1. Configuration at startup"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Applications can be configured at startup in the following ways:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Defaults"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Default configuration files (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AEA.json"]},")"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Supports prioritized configuration overlays."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-configuration-at-runtime","__idx":6},"children":["2. Configuration at runtime"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configure applications dynamically at runtime using:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["External configuration files (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AEA.json"]},") published in Redis via Twin Property"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Additional details found in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/agora/tutorial/configurationtutorial"},"children":["Configuration Tutorial"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-messaging-framework","__idx":7},"children":["3. Messaging Framework"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Advanced messaging via ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NATS"]}," for efficient communication between edge and cloud systems."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Among supported topics:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.DataIn"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.DataOut"]},": Data messages"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.RequestIn"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.RequestOut"]},": Application services requests"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.EventIn"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slbapps.<app-name>.EventOut"]},": Alerts and events"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Additional details found in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/agora/tutorial/busclienttutorial"},"children":["BusClient Tutorial"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-digital-twins","__idx":8},"children":["4. Digital Twins"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Synchronize ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["desired"]}," (cloud) and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["reported"]}," (edge) properties to maintain an accurate representation of physical devices."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Properties are grouped into ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Twin Property Groups"]}," for easy management."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configuration ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AEA.json"]}," can also be submitted using Twin Property under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config"]}," group"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Additional details found in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/agora/tutorial/twinproperty"},"children":["Twin Property Tutorial"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deployment","__idx":9},"children":["Deployment"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Applications are deployed in containers to ensure isolation and security."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Containers are distributed via a private container registry and scanned for security compliance."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"iris","__idx":10},"children":["IRIS"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IRIS environment comes with Redis and NATS"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"local-development","__idx":11},"children":["Local Development"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For local development, you can run both NATS and Redis locally either installed on the host or as docker containers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://redis.io/downloads/"},"children":["Redis"]}," or run as a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://hub.docker.com/_/redis/"},"children":["docker"]}," container, e.g.:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ docker run --name alpine-redis -d redis:latest"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.nats.io/running-a-nats-service/introduction/installation"},"children":["NATS"]}," or run as a docker container, e.g:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$ docker run --name nats-server -p 4222:4222 nats:latest"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample AEA.json with local Redis and NATS"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"Name\": \"MyApp\",\n    \"AEA2\": {\n        \"RedisClient\": {\n            \"Server\": \"localhost\",\n            \"Port\": \"6379\"\n        },\n        \"BusClient\": {\n            \"Server\": \"nats://localhost:4222\"\n        }\n      }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Alternatively, you may point your application config file to a deployed IRIS environment if the external IP of the gateway is known."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample AEA.json with IRIS-deployed gateway"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"Name\": \"MyApp\",\n    \"AEA2\": {\n        \"RedisClient\": {\n            \"Server\": \"163.188.xxx.xxx\",\n            \"Port\": \"6379\"\n        },\n        \"BusClient\": {\n            \"Server\": \"nats://163.188.xxx.xxx:4222\"\n        }\n      }\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Quick Start Guide:","id":"quick-start-guide","depth":1},{"value":"Create an Edge App","id":"create-an-edge-app","depth":3},{"value":"\"Hello World!\"","id":"hello-world","depth":5},{"value":"Creating an Edge Application Container Image","id":"creating-an-edge-application-container-image","depth":3},{"value":"Configuring and using the SDK in your application","id":"configuring-and-using-the-sdk-in-your-application","depth":2},{"value":"1. Configuration at startup","id":"1-configuration-at-startup","depth":3},{"value":"2. Configuration at runtime","id":"2-configuration-at-runtime","depth":3},{"value":"3. Messaging Framework","id":"3-messaging-framework","depth":3},{"value":"4. Digital Twins","id":"4-digital-twins","depth":3},{"value":"Deployment","id":"deployment","depth":2},{"value":"IRIS","id":"iris","depth":3},{"value":"Local Development","id":"local-development","depth":3}],"frontmatter":{"seo":{"title":"Quick Start Guide:"}},"lastModified":"2026-01-14T00:18:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/agora/quickstartguide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}