Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vs/AzureIoTDeviceClientPY/v14 New function for Abandon a cloud-to-device message Jan 18, 2016
.gitignore First init Jan 18, 2016
AzureIoTDeviceClientPY.sln First init Jan 18, 2016 New api version Feb 20, 2018
LICENSE Initial commit Jan 18, 2016 Update Jan 18, 2016

Azure IoT Hub DeviceClient for Python

Basic library for Azure IoT Hub Device Messaging REST API. It doesn't implement all functions. Tested with Python 3.

import DeviceClient

# START: Azure IoT Hub settings
KEY = "xxxxx";
HUB = "xxxxx";
DEVICE_NAME = "xxxxx";
# END: Azure IoT Hub settings

device = DeviceClient.DeviceClient(HUB, DEVICE_NAME, KEY)


# Device to Cloud
print(device.send(b"{message: 'Hello from Python'}"))

# Cloud to Device
message = device.read_message()

You can’t perform that action at this time.