Source: Azure SDKs in Python and C#
SDK Categories
| Category | Purpose |
|---|
| Device SDK | Build device clients that communicate with IoT Hub |
| Service SDK | Build back-end apps that communicate with IoT Hub and devices |
| Management SDK | Manage the IoT Hub itself |
Python Packages (pip)
pip install azure-iot-device # Device SDK
pip install azure-iot-hub # Service SDK
pip install azure-mgmt-iothub # Management SDK
GitHub: azure/azure-iot-sdk-python
.NET (C#) Packages (NuGet)
| Purpose | Package |
|---|
| Device | Microsoft.Azure.Devices.Client |
| Service | Microsoft.Azure.Devices |
| Management | Azure.ResourceManager.IotHub |
GitHub: azure/azure-iot-sdk-csharp
Key Python Classes
IoTHubDeviceClient — device-side client (from azure.iot.device)
.send_message(msg) — D2C
.get_twin() — read device twin
.patch_twin_reported_properties(patch) — update reported properties
.on_twin_desired_properties_patch_received — callback for desired property changes
See Also