iotconnect-sdk-lite 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. iotconnect_sdk_lite-1.0.0/LICENSE.md +20 -0
  2. iotconnect_sdk_lite-1.0.0/PKG-INFO +63 -0
  3. iotconnect_sdk_lite-1.0.0/README.md +36 -0
  4. iotconnect_sdk_lite-1.0.0/pyproject.toml +51 -0
  5. iotconnect_sdk_lite-1.0.0/setup.cfg +4 -0
  6. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/lite/__init__.py +8 -0
  7. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/lite/client.py +496 -0
  8. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/lite/config.py +138 -0
  9. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/lite/dra.py +33 -0
  10. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/lite/error.py +13 -0
  11. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/__init__.py +0 -0
  12. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/dra.py +131 -0
  13. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/mqtt.py +159 -0
  14. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/__init__.py +0 -0
  15. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/c2d.py +40 -0
  16. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/d2c.py +37 -0
  17. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/discovery.py +25 -0
  18. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/files.py +21 -0
  19. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/protocol/identity.py +79 -0
  20. iotconnect_sdk_lite-1.0.0/src/avnet/iotconnect/sdk/sdklib/util.py +138 -0
  21. iotconnect_sdk_lite-1.0.0/src/iotconnect_sdk_lite.egg-info/PKG-INFO +63 -0
  22. iotconnect_sdk_lite-1.0.0/src/iotconnect_sdk_lite.egg-info/SOURCES.txt +23 -0
  23. iotconnect_sdk_lite-1.0.0/src/iotconnect_sdk_lite.egg-info/dependency_links.txt +1 -0
  24. iotconnect_sdk_lite-1.0.0/src/iotconnect_sdk_lite.egg-info/requires.txt +1 -0
  25. iotconnect_sdk_lite-1.0.0/src/iotconnect_sdk_lite.egg-info/top_level.txt +1 -0
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2020-2024 Avnet
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,63 @@
1
+ Metadata-Version: 2.2
2
+ Name: iotconnect-sdk-lite
3
+ Version: 1.0.0
4
+ Summary: Avnet IoTConnect Lite SDK
5
+ Author-email: Nik Markovic <nikola.markovic@avnet.com>
6
+ Project-URL: Homepage, https://github.com/avnet-iotconnect/iotc-python-lite-sdk
7
+ Keywords: IoTconnect,AWS,IoTCore,Azure,IoTHub
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Communications
22
+ Classifier: Topic :: Internet
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE.md
26
+ Requires-Dist: paho-mqtt>=2.1.0
27
+
28
+ # Introduction
29
+ This project is the IoTConnect Python Lite Client (SDK)
30
+ that aims for a modern, intuitive and robust interface to connect your
31
+ Linux, Windows or MacOS devices to the Avnet IoTConnect platform.
32
+
33
+ The project supports IoTConnect Device Protocol 2.1 devices.
34
+ The project requires Python 3.9 or newer and provides
35
+ a set of features for most common IoTConnect use cases.
36
+
37
+ If you need support for older Pyton, Protocol 1.0, Properties (Shadow/Twin)
38
+ Offline or HTTP Client along with other features like Gateway/Child support
39
+ you should check out the standard
40
+ [Iotconnect Python SDK](https://github.com/avnet-iotconnect/iotc-python-sdk) repository.
41
+
42
+ # Licensing
43
+
44
+ This python package is distributed under the [MIT License](LICENSE.md).
45
+
46
+ # Installing
47
+
48
+ The quickest way to get started with the project is to follow the [QUICKSTART.md](QUICKSTART.md) document.
49
+
50
+ # Using the Client
51
+
52
+ Using this client to communicate to IoTConnect involves the following steps:
53
+ - Get familiar with the client API by examining documentation at [client.py](src/avnet/iotconnect/sdk/lite/client.py)
54
+ - Initialize the client with either:
55
+ - iotcDeviceConfig.json (downloaded from the device *Info* panel) - see the [basic-example](examples/basic-example.py)
56
+ - Explicit parameters to the constructor - see the [minimal example](examples/minimal.py).
57
+ - Optionally, configure your own Client settings (log verbosity, timeouts etc.) and pass those to the constructor.
58
+ - Optionally, pass callbacks for C2D message and OTA (see the [basic-example](examples/basic-example.py)) or even your own [custom message handler](examples/c2d-special-event-handling.py) to the constructor
59
+ - While actual download and application replacement mechanism would depend on how your application runs
60
+ (via a system service, cron or other method) a simple OTA download and install method is shown in the [ota-handling](examples/ota-handling.py) example.
61
+ - Optionally, pass a callback for the MQTT disconnect event and handle it according to your application requirements.
62
+ - Call Client.connect(). The call should block until connected based on timeout retry settings.
63
+ - Call Client.send_telemetry() at regular intervals. Verify that the client is connected with Client.is_connected()
@@ -0,0 +1,36 @@
1
+ # Introduction
2
+ This project is the IoTConnect Python Lite Client (SDK)
3
+ that aims for a modern, intuitive and robust interface to connect your
4
+ Linux, Windows or MacOS devices to the Avnet IoTConnect platform.
5
+
6
+ The project supports IoTConnect Device Protocol 2.1 devices.
7
+ The project requires Python 3.9 or newer and provides
8
+ a set of features for most common IoTConnect use cases.
9
+
10
+ If you need support for older Pyton, Protocol 1.0, Properties (Shadow/Twin)
11
+ Offline or HTTP Client along with other features like Gateway/Child support
12
+ you should check out the standard
13
+ [Iotconnect Python SDK](https://github.com/avnet-iotconnect/iotc-python-sdk) repository.
14
+
15
+ # Licensing
16
+
17
+ This python package is distributed under the [MIT License](LICENSE.md).
18
+
19
+ # Installing
20
+
21
+ The quickest way to get started with the project is to follow the [QUICKSTART.md](QUICKSTART.md) document.
22
+
23
+ # Using the Client
24
+
25
+ Using this client to communicate to IoTConnect involves the following steps:
26
+ - Get familiar with the client API by examining documentation at [client.py](src/avnet/iotconnect/sdk/lite/client.py)
27
+ - Initialize the client with either:
28
+ - iotcDeviceConfig.json (downloaded from the device *Info* panel) - see the [basic-example](examples/basic-example.py)
29
+ - Explicit parameters to the constructor - see the [minimal example](examples/minimal.py).
30
+ - Optionally, configure your own Client settings (log verbosity, timeouts etc.) and pass those to the constructor.
31
+ - Optionally, pass callbacks for C2D message and OTA (see the [basic-example](examples/basic-example.py)) or even your own [custom message handler](examples/c2d-special-event-handling.py) to the constructor
32
+ - While actual download and application replacement mechanism would depend on how your application runs
33
+ (via a system service, cron or other method) a simple OTA download and install method is shown in the [ota-handling](examples/ota-handling.py) example.
34
+ - Optionally, pass a callback for the MQTT disconnect event and handle it according to your application requirements.
35
+ - Call Client.connect(). The call should block until connected based on timeout retry settings.
36
+ - Call Client.send_telemetry() at regular intervals. Verify that the client is connected with Client.is_connected()
@@ -0,0 +1,51 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "iotconnect-sdk-lite"
7
+ dynamic = ["version"]
8
+ description = "Avnet IoTConnect Lite SDK"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ authors = [
12
+ { name = "Nik Markovic", email = "nikola.markovic@avnet.com" },
13
+ ]
14
+
15
+ keywords = [
16
+ "IoTconnect",
17
+ "AWS",
18
+ "IoTCore",
19
+ "Azure",
20
+ "IoTHub",
21
+ ]
22
+ classifiers = [
23
+ "Development Status :: 3 - Alpha",
24
+ "Intended Audience :: Developers",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Natural Language :: English",
27
+ "Operating System :: MacOS :: MacOS X",
28
+ "Operating System :: Microsoft :: Windows",
29
+ "Operating System :: POSIX",
30
+ "Programming Language :: Python",
31
+ "Programming Language :: Python :: 3",
32
+ "Programming Language :: Python :: 3.9",
33
+ "Programming Language :: Python :: 3.10",
34
+ "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
36
+ "Topic :: Communications",
37
+ "Topic :: Internet",
38
+ ]
39
+ dependencies = [
40
+ "paho-mqtt>=2.1.0",
41
+ ]
42
+
43
+ [project.urls]
44
+ Homepage = "https://github.com/avnet-iotconnect/iotc-python-lite-sdk"
45
+
46
+ [tool.setuptools.packages.find]
47
+ where = ["src"]
48
+
49
+ [tool.setuptools.dynamic]
50
+ version = {attr = "avnet.iotconnect.sdk.lite.__version__"}
51
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,8 @@
1
+ __version__ = '1.0.0'
2
+
3
+ from .error import DeviceConfigError
4
+ from .config import DeviceConfig
5
+ from .client import Client, ClientSettings, Callbacks
6
+
7
+ # redirect these imports so that the user code is not affected by any changes in file organization
8
+ from avnet.iotconnect.sdk.sdklib.mqtt import C2dCommand, C2dOta, C2dAck, C2dMessage, TelemetryRecord