Microsoft Azure Device Update Client Library for Python
项目描述
Azure Device Update for IoT Hub客户端库,用于Python
该库提供对设备更新服务的访问,使客户能够将他们的物联网设备更新发布到云中,然后部署这些更新到他们的设备(在IoT Hub中管理并配置的设备组中批准更新)。
免责声明
Azure SDK Python包对Python 2.7的支持已于2022年1月1日结束。有关更多信息及疑问,请参阅https://github.com/Azure/azure-sdk-for-python/issues/20691
入门
先决条件
- Microsoft Azure订阅:要调用Microsoft Azure服务,您需要创建Azure订阅
- 设备更新IoT Hub实例
- Azure IoT Hub实例
- 使用此包需要Python 3.6或更高版本。
安装包
使用pip安装针对Python的IoT Hub客户端库的设备更新程序。
pip install azure-iot-deviceupdate
关键概念
设备更新程序为IoT Hub提供了一种托管服务,允许您部署IoT设备的空中更新。客户端库包含一个名为DeviceUpdateClient的主要组件。该组件允许您访问三个主要客户端服务:
- UpdatesOperations:更新管理(导入、枚举、删除等)
- ManagementOperations:部署管理(管理设备和部署)
您可以通过访问IoT Hub设备更新了解更多关于设备更新程序的信息。
示例
您可以通过示例熟悉不同的API。
故障排除
IoT Hub设备更新客户端将引发定义在Azure Core中的异常。
下一步
从我们的示例开始。
贡献
如果您遇到任何错误或有建议,请在项目的问题部分提交问题。
发布历史
1.0.0 (2022-09-09)
新增功能
- 为DeviceManagementOperations.list_device_classes方法添加了过滤功能
- 更新了一些方法描述,使其更具体,减少歧义
破坏性更改
- 从DeviceManagementOperations.list_best_updates_for_group方法中删除了过滤功能
1.0.0b3 (2022-07-07)
新增功能
- 向Update添加了
relatedFiles
和downloadHandler
- 更新了各种引用更新的模型,不仅包括
updateId
,还包括更新的description
和friendlyName
- 删除了设备标签概念
- 在
list_devices
方法中允许按部署状态进行过滤 - 添加了更新设备类友好名的功能
- 添加了删除设备类的功能
- 将设备类子组添加到组中
- 添加了新的方法来检索设备健康信息
1.0.0b2 (2022-01-25)
新增功能
- 添加了DeviceManagementOperations
- 添加了DeviceUpdateOperations
- 添加了
send_request
操作来方便地发送自定义http请求 - 添加了
client.device_management
破坏性更改
- 删除了所有模型
- 删除了DeploymentsOperations
- 删除了UpdateOperations
- 停止支持Python2.7(https://github.com/Azure/azure-sdk-for-python#disclaimer)
- 将DeviceUpdateClient的
account_endpoint
参数重命名为endpoint
- 将
client.updates
重命名为client.device_update
- 删除了
client.devices
- 删除了
client.deployments
- 将UpdatesOperations.get_update重命名为DeviceUpdateOperations.get_update
- 将UpdatesOperations.delete_update重命名为DeviceUpdateOperations.begin_delete_update
- 将UpdatesOperations.get_providers重命名为DeviceUpdateOperations.list_providers
- 将UpdatesOperations.get_names重命名为DeviceUpdateOperations.list_names
- 将UpdatesOperations.get_versions重命名为DeviceUpdateOperations.list_versions
- 将UpdatesOperations.get_file重命名为DeviceUpdateOperations.get_file
- 将UpdatesOperations.get_files重命名为DeviceUpdateOperations.list_files
- 将UpdatesOperations.get_operation重命名为DeviceUpdateOperations.get_operation
- 将UpdatesOperations.get_operations重命名为DeviceUpdateOperations.list_operations
- 将DevicesOperations.get_all_device_classes重命名为DeviceManagementOperations.list_device_classes
- 将DevicesOperations.get_device_class重命名为DeviceManagementOperations.get_device_class
- 将DevicesOperations.get_device_class_device_ids重命名为DeviceManagementOperations.
- 将DevicesOperations.list_devices重命名为DeviceManagementOperations.list_devices
- 将DevicesOperations.list_devices重命名为DeviceManagementOperations.
- 将DevicesOperations.get_all_device_tags重命名为DeviceManagementOperations.list_device_tags
- 将DevicesOperations.get_all_groups重命名为DeviceManagementOperations.list_groups
- 将DevicesOperations.get_group重命名为DeviceManagementOperations.get_group
- 将 DevicesOperations.create_or_update_group 重命名为 DeviceManagementOperations.create_or_update_group
- 将 DevicesOperations.delete_group 重命名为 DeviceManagementOperations.delete_group
- 将 DevicesOperations.get_group_update_compliance 重命名为 DeviceManagementOperations.get_group_update_compliance
- 将 DevicesOperations.get_group_best_updates 重命名为 DeviceManagementOperations.list_best_updates_for_group
- 将 DeploymentsOperations.get_deployment_status 重命名为 DeviceManagementOperations.get_deployment_status
- 将 DeploymentsOperations.create_or_update_deployment 重命名为 DeviceManagementOperations.create_or_update_deployment
- 将 DeploymentsOperations.delete_deployment 重命名为 DeviceManagementOperations.delete_deployment
- 将 DeploymentsOperations.get_deployment_devices 重命名为 DeviceManagementOperations.list_deployment_devices
1.0.0b1 (2021-03-03)
- 这是 Azure Device Update for IoT Hub 库的初始版本。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源代码分发
azure-iot-deviceupdate-1.0.0.zip (102.7 kB 查看哈希)