зеркало из
1
0
Форкнуть 0
azure-iot-sdk-python/azure-iot-device
Carter Tinney 43c5fb66f6
fix(azure-iot-device): ReconnectStage State Machine Overhaul (#844)
* Auto-reconnect and SAS renewals should no longer cause problems if one or the other is turned off
* Operations now fail if they require a connection, and one cannot be automatically established
* All user-initiated actions should now return errors in case of failure rather than any kind of indefinite retry
* Created completely separate flows for automatic reconnection vs other connections
* Added more explicitness in conditional logic and improved documentation for clarity
2021-09-24 11:49:31 -07:00
..
azure fix(azure-iot-device): ReconnectStage State Machine Overhaul (#844) 2021-09-24 11:49:31 -07:00
doc Added documentation button to pnp sample readme (#834) 2021-08-17 15:32:56 -07:00
samples add codespaces to readme (#854) 2021-09-20 13:44:09 -07:00
tests fix(azure-iot-device): ReconnectStage State Machine Overhaul (#844) 2021-09-24 11:49:31 -07:00
.bumpverion.cfg Bump package versions for release on 2021-06-18 (#791) 2021-06-18 17:29:09 -07:00
MANIFEST.in Packaging + Distribution (#83) 2019-04-22 15:15:39 -07:00
README.md chore: Updated READMEs with missing information (#779) 2021-06-01 17:29:42 -07:00
setup.cfg Namespace adjustments (#77) 2019-04-16 13:12:21 -07:00
setup.py fix(azure-iot-device): Updated version requirement for urllib (#780) 2021-06-03 13:54:08 -07:00

README.md

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.

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 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

Getting help and finding API docs

API documentation for this package is available via Microsoft Docs

Additionally, the SDK makes use of docstrings which means you can find API documentation directly through Python with use of the help command:

e.g.

>>> from azure.iot.device import IoTHubDeviceClient
>>> help(IoTHubDeviceClient)