Microsoft Azure IoT Device Library
Project description
Azure IoT Device SDK
The Azure IoT Device SDK for Python provides functionality for communicating with the Azure IoT Hub for both Devices and Modules.
Note that this SDK is currently in preview, and is subject to change.
Azure IoT Device Features
The SDK provides the following clients:
-
Provisioning Device Client
- Creates a device identity on the Azure IoT Hub
-
IoT Hub Device Client
- Send telemetry messages to Azure IoT Hub
- Receive Cloud-to-Device (C2D) messages from the Azure IoT Hub
- Receive and respond to direct method invocations from the Azure IoT Hub
-
IoT Hub Module Client
- Supports Azure IoT Edge Hub and Azure IoT Hub
- Send telemetry messages to a Hub or to another Module
- Receive Input messages from a Hub or other Modules
- Receive and respond to direct method invocations from a Hub or other Modules
These clients are available with an asynchronous API, as well as a blocking synchronous API for compatibility scenarios. We recommend you use Python 3.7+ and the asynchronous API.
Python Version | Asynchronous API | Synchronous API |
---|---|---|
Python 3.5.3+ | YES | YES |
Python 3.4 | NO | YES |
Python 2.7 | NO | YES |
Installation
pip install azure-iot-device
Device Samples
Check out the samples repository for example code showing how the SDK can be used in a variety of scenarios, including:
- Sending multiple telemetry messages at once.
- Receiving Cloud-to-Device messages.
- Using Edge Modules with the Azure IoT Edge Hub.
- Send and receive updates to device twin
- Receive invocations to direct methods
- Register a device with the Device Provisioning Service
- Legacy scenarios for Python 2.7 and 3.4
Getting help and finding API docs
Our SDK makes use of docstrings which means you cand find API documentation directly through Python with use of the help command:
>>> from azure.iot.device import IoTHubDeviceClient
>>> help(IoTHubDeviceClient)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for azure-iot-device-2.0.0rc13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28bc2a4551ef7307ea950a93c3523605f84158a6bc1b2e8d57204def27492343 |
|
MD5 | d3f7c43efc84a221d71c59d9e7deda3d |
|
BLAKE2b-256 | 06492e404ae18269726166c9e033fa7fbbc55e1e154a62527d6129373479521d |
Hashes for azure_iot_device-2.0.0rc13-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af97f838c75c5fe917a45d48ad9e016ddde3dd141ae93fab57c4298d444fc5c6 |
|
MD5 | 8a32fc70f2c84eb30afc3789f0ba9209 |
|
BLAKE2b-256 | 521873a3b3c906230e0cc6e9028347ee57b30b1f417dda0359706c19b136db8a |