Skip to main content

This document is reformatted to better viewing as a standalone document. We recommend visiting this GitHub v1.3.0 link for best experience.

Introduction

This project is the /IOTCONNECT Python Lite Client (SDK) that aims for a modern, intuitive and robust interface to connect your Linux, Windows or MacOS devices to the Avnet IoTConnect platform.

The project supports /IOTCONNECT Device Protocol 2.1 devices. The project requires Python 3.9 or newer and provides a set of features for most common /IOTCONNECT use cases.

If you need support for older Pyton, both Protocol 1.0 and 2.1, Properties (Shadow/Twin) Offline or HTTP Client along with other features like Gateway/Child support you should check out the standard iotconnect-python-sdk repository.

See the iotc-python-lite-sdk-demos repository for implementation examples.

Licensing

This python package is distributed under the MIT License.

Installing

The quickest way to get started with the project is to follow the QUICKSTART.md document.

Using the Client

Using this client to communicate to /IOTCONNECT involves the following steps:

  • Get familiar with the client API by examining documentation at client.py
  • Initialize the client with either:
    • iotcDeviceConfig.json (downloaded from the device Info panel) - see the basic-example
    • Explicit parameters to the constructor - see the minimal example.
  • Optionally, configure your own Client settings (log verbosity, timeouts etc.) and pass those to the constructor.
  • Optionally, pass callbacks for C2D message and OTA (see the basic-example) or even your own custom message handler to the constructor
    • While actual download and application replacement mechanism would depend on how your application runs (via a system service, cron or other method) a simple OTA download and install method is shown in the ota-handling example.
  • Optionally, pass a callback for the MQTT disconnect event and handle it according to your application requirements.
  • Call Client.connect(). The call should block until connected based on timeout retry settings.
  • Call Client.send_telemetry() at regular intervals. Verify that the client is connected with Client.is_connected()

Development and Testing

Please ensure to review the CONTRIBUTING.md document for detailed guidelines before making changes to the project.

To set up for development:

  • Ensure to use a modern IDE like PYCharm Community Edition or VSCode so that typing hints will be properly recognized. This will ensure that problems are caught early or typing issues are not causing a burden for future development.
  • Clone this repository locally.
  • Create a new development branch.
  • Install the local repo as editable package with development dependencies:
pip3 install -e .[dev]
  • If needing to make changes to the iotc-python-sdk-lib, clone that repository as well and install it as editable package:
pip3 install -e path/to/iotc-python-sdk-lib
  • When done with changes, submit a pull request for this and/or the iotc-python-sdk-lib repository as needed.

Metadata

Release files for iotconnect-sdk-lite 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iotconnect-sdk-lite 1.3.0
File Size Uploaded
iotconnect_sdk_lite-1.3.0.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iotconnect-sdk-lite 1.3.0
File Interpreter ABI Platform
iotconnect_sdk_lite-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.7 kB

Release files / iotconnect_sdk_lite-1.3.0.tar.gz

Download URL iotconnect_sdk_lite-1.3.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
136fab48af64c88246da4cb659c01a544fbd62a4187cf0287ae8d1deaecaccc5
BLAKE2b-256 checksum
How to use checksums
a41bdf64174a317bb71b301c4aa51f822ed51f789a3b2239b7392df8a623a23e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / iotconnect_sdk_lite-1.3.0-py3-none-any.whl

Download URL iotconnect_sdk_lite-1.3.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2fc4914bd210fa48d6eef82bc4c39a640c135f841ac640c3825bbdf90bfaab5
BLAKE2b-256 checksum
How to use checksums
d060d17b802045784e1e931b0726f0bcc9f65c75a26398cc0909c60305d49a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page