Usage Guideline + Authentication
4 min
this section walks through sdk conventions and module by module authentication patterns each subsection covers a single sdk area with the imports it needs, the connection it expects, and the full set of operations available if you only need to get started, see getting started docid\ mbvg4xlpn9vvydjsdyovp if you need a deeper look at connection setup (multiple devices, refresh, disable), see managing connections docid\ vwtfo9sxcmrbfx9cafenw to use any of these from the shell instead of python, see sdk cli reference docid\ s7o dg4pyackxxpsoj2qf in this section air gap features docid\ dmvq8b6h macksn07230r building deployment templates without internet access on the target devicehub docid\ yxcorvuyoockwriwibfvd devices and tags devicehub drivers docid\ ehmsnvgyqkxu0iwkfgtq4 drivers, bundled templates, json schema validation digital twins docid\ rvi0 uxy2vvgeazetbnlu models, instances, attributes, transformations flows manager docid\ llyidmwf8xc7evu7mjik6 node red flow lifecycle analytics docid\ qmfb3pk7t2emjqehtyns processors, instances, ai/ml models, variables integrations docid rvwuf5wrnpi9okk3dhfb cloud connector instances, topics, subscriptions, object storage marketplace docid\ icvppoqlgzsl0oj7a5dxr container images, registries, running containers opc docid\ bj75kdfejpmrr1fhexjhf opc ua server hierarchy, security, users system docid 2uxkyv1gxegjjgns30zyj users, tokens, network, certificates, events, templates, services litmus edge manager (lem) docid\ plt0zva30mtxky0db8ile multi device deployments, applications, alerts, certificates, ai models, mpc sdk conventions a few patterns recur across every module default connection most functions accept an optional le connection (le side) or connection (lem side) keyword argument if omitted, the sdk loads a cached default connection from environment variables on first call see managing connections docid\ vwtfo9sxcmrbfx9cafenw for the env vars and connection modes pydantic models vs raw json functions that fetch data return pydantic models by default (e g device , tag , driver ) pass raw=true to skip validation and get the api json unchanged parsed = devices list devices() # list\[device] raw = devices list devices(raw=true) # list\[dict\[str, any]] raw=true is useful when the api schema drifts ahead of your installed sdk version (you don't want validation failures) you only need a few fields and don't want the model overhead you're piping json to another system coverage of raw=true varies by function check signatures in your ide or via litmus sdk cli list \<module> version gating functions that exist only on litmus edge 4 0 x raise unsupportedversionerror when called against a 3 x device the exception names the feature and the minimum required version, so you can branch on it async (lem only) some long running lem task functions accept async =true to return an asyncio task\[bool] instead of blocking