Source: Azure SDKs in Python and C#

SDK Categories

CategoryPurpose
Device SDKBuild device clients that communicate with IoT Hub
Service SDKBuild back-end apps that communicate with IoT Hub and devices
Management SDKManage 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
PurposePackagePyPI
Deviceazure-iot-devicepypi.org
Serviceazure-iot-hubpypi.org
Managementazure-mgmt-iothubpypi.org

GitHub: azure/azure-iot-sdk-python

.NET (C#) Packages (NuGet)

PurposePackage
DeviceMicrosoft.Azure.Devices.Client
ServiceMicrosoft.Azure.Devices
ManagementAzure.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