Getting Started

11min
the litmus software development kit (sdk) is a python module that allows users to easily interface with the litmus product apis supported versions the sdk only supports the lts versions of litmus edge it is not guaranteed to work with newer versions that are not explicitly documented below litmus edge 3 16 x installation build from source to install locally from source run the following pip install e {path/to/sdk/directory} to build whl do the following ensure you have python build installed run python build you will now find the whl file under dist/ install from whl using a package manager of your choice (eg pip), install from whl using the documentation provided by your package manager for pip that would be pip install {filename} whl the released wheels can be found under the releases page here https //github com/litmusautomation/litmus sdk/releases configuration authorization running the sdk, and accessing the litmus edge apis requires the user to configure the module with a valid authentication to read more about configuration and authorization see here environment variables are used to configure your litmus edge instance, to set variables below either use a env file in the root of your sdk project, or set environment variables (eg export edge url=127 0 0 1 on linux machines) connecting directly to litmus edge using oauth2 the sdk allows for connection directly the following environment variables must be set edge url url of your litmus edge instance (eg 127 0 0 1 or https //127 0 0 1 ) edge api client id oauth2 token id edge api client secret oauth2 token secret to generate your oauth2 token please review the following documentation https //docs litmus io/litmusedge/how to create and use oauth 20 tokens in litmus edge connecting to litmus edge using litmus edge manager the sdk allows the use of the lem bridge to connect to your litmus edge instances to enable the lem bridge set the following environment variable use lem bridge=true set the following variables to configure your lem connection edge manager url url of your lem instance edge manager project id project id of the le instance you want to connect to edge manager device id device id of the le instance you want to connect to edge api token your lem api token for the project for more details see our documentation coverage planned languages currently only python3 is developed and supported, in future intending on expanding support to more programming languages support state support 🟢 complete this feature is released and actively supported by the team 🟔 under development this feature is undergoing active development but is not yet supported šŸ”“ planned this feature is planned feature description python analytics access and create processors and instances for data analysis at the edge 🟢 devicehub support for device and tag creation, reading, and deletion alongside tag browsing 🟢 digital twins support for the digital twins service covering models, instances, attributes, transformations, and hierarchies to create virtual representations of industrial assets 🟢 flows manager create, start/stop, and delete flows in the flows service 🟢 integrations manipulate and access cloud connector integrations to communicate with third party cloud services 🟢 marketplace create, start/stop, and delete flows 🟢 opc the opc ua (open platform communications unified architecture) protocol provides a publish subscribe client server technology for reliable data transmission 🟢 system system wide configuration of litmus edge accessing information such as internal databases, cpu usage, language settings etc 🟢 module documentation the below documentation is not exhaustive , and seeks only to serve as an introduction to common use cases and best practices with the various litmus edge services for complete documentation please refer to the docstrings of the methods or our api documentation https //api litmus io šŸ”“ devices and tags drivers šŸ”“ models instances dynamic/static attributes hierarchies transformations šŸ”“ šŸ”“ šŸ”“ šŸ”“ šŸ”“ šŸ”“ šŸ”“