2f65730070 | ||
---|---|---|
.devcontainer | ||
.github | ||
azure-iot-device/azure/iot/device | ||
dev_utils | ||
doc | ||
pip_alias | ||
samples | ||
scripts | ||
sdklab | ||
tests | ||
vsts | ||
.bumpversion.cfg | ||
.flake8 | ||
.gitattributes | ||
.gitignore | ||
.pre-commit-config.yaml | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
SECURITY.md | ||
credscan_suppression.json | ||
devbox_setup.md | ||
migration_guide_iothub.md | ||
migration_guide_provisioning.md | ||
mypy.ini | ||
newtsaupload.gdntsa | ||
pyproject.toml | ||
pytest.ini | ||
requirements_dev.txt | ||
requirements_test.txt | ||
setup.py | ||
thirdpartynotice.txt | ||
tls_protocol_version_and_ciphers.md |
README.md
azure-iot-device
The Azure IoT Device SDK for Python enables Python developers to easily create IoT device solutions that seamlessly connect to the Azure IoT Hub ecosystem.
-
If you're migrating v2.x.x code to use v3.x.x check the IoT Hub Migration Guide and/or the Provisioning Migration Guide
-
If you're looking for the v2.x.x client library, it is now preserved in the v2 branch
-
If you're looking for the v1.x.x client library, it is now preserved in the v1-deprecated branch.
-
If you're looking for the azure-iot-hub library, it is now located in the azure-iot-hub-python repository
NOTE: 3.x.x is still in beta and APIs are subject to change until the release of 3.0.0
Installing the library
The Azure IoT Device library is available on PyPI:
pip install azure-iot-device==3.0.0b2
Python 3.7 or higher is required in order to use the library
Using the library
You can view the samples repository to see examples of SDK usage.
Full API documentation for this package is available via Microsoft Docs. Note that this documentation may currently be out of date as v3.x.x is still in preview at the time of this writing.
Features
✔️ feature available ✖️ feature planned but not yet supported ➖ no support planned*
*Features that are not planned may be prioritized in a future release, but are not currently planned
This library primarily uses the MQTT protocol.
IoTHubSession
Features | Status | Description |
---|---|---|
Authentication | ✔️ | Connect your device to IoT Hub securely with supported authentication, including symmetric key, X-509 Self Signed, Certificate Authority (CA) Signed, and SASToken |
Send device-to-cloud message | ✔️ | Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties. |
Receive cloud-to-device messages | ✔️ | Receive cloud-to-device messages and read associated custom and system properties from IoT Hub. |
Device Twins | ✔️ | IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties. |
Direct Methods | ✔️ | IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific and generic operation. |
Connection Status and Error reporting | ✔️ | Error reporting for IoT Hub supported error code. |
Connection Retry | ✔️ | Dropped connections will be retried with a fixed 10 second interval by default. This functionality can be disabled if desired, and the interval can be configured |
Upload file to Blob | ✖️ | A device can initiate a file upload and notifies IoT Hub when the upload is complete. |
Direct Invocation of Method on Modules | ✖️ | Invoke method calls to another module using using the Edge Gateway. |
ProvisioningSession
Features | Status | Description |
---|---|---|
TPM Individual Enrollment | ✖️ | Provisioning via Trusted Platform Module. |
X.509 Individual Enrollment | ✔️ | Provisioning via X.509 root certificate. Please review the samples folder and this quickstart on how to create a device client. |
X.509 Enrollment Group | ✔️ | Provisioning via X.509 leaf certificate). Please review the samples folder on how to create a device client. |
Symmetric Key Enrollment | ✔️ | Provisioning via Symmetric key attestation). Please review the samples folder on how to create a device client. |
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.