azure-mgmt-iothub
Microsoft Azure IoT Hub Management Client Library for Python
What it is and what it does
azure-mgmt-iothub is the official Microsoft Azure SDK for managing IoT Hub resources in Python. It provides a client library to programmatically create, configure, and manage Azure IoT Hubs through the Azure Resource Manager API. The package wraps REST operations into Python objects and methods, handling authentication via Azure Active Directory and supporting credential flows through its runtime dependencies (isodate, typing-extensions, azure-common, azure-mgmt-core).
Typical use involves instantiating an IotHubClient with credentials and a subscription ID, then calling methods to create hubs, manage endpoints, configure routing, handle device imports/exports, and monitor hub health. Version 4.0.0 removed unused API version subfolders for smaller package size; applications requiring specific older API versions should pin to an earlier release. The library requires Python 3.8+ and is actively maintained.
Use it for:
- Automate IoT Hub provisioning and teardown in infrastructure-as-code pipelines.
- Configure routing rules, endpoints, and message enrichment for device telemetry at scale.
- Manage device import/export operations and bulk device lifecycle tasks.
- Monitor IoT Hub health, endpoint status, and quota usage from Python applications.
- Integrate IoT Hub management into DevOps workflows and CI/CD systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Manages Azure IoT Hub resources—creation, configuration, and lifecycle operations—through Python code using Azure Resource Manager APIs.
Yes. This is the official, actively maintained Azure SDK for IoT Hub management in Python. Low install friction, no security vulnerabilities, permissive MIT license, and broad Python version support (3.8, 3.9, 3.10, 3.11, 3.12) make it the standard choice for anyone managing Azure IoT Hubs programmatically. Install if you need to automate IoT Hub operations; skip only if you manage hubs exclusively through the Azure Portal or CLI.
Install
azure-mgmt-iothub on PyPI
pip
pip install azure-mgmt-iothubuv
uv add azure-mgmt-iothubpoetry
poetry add azure-mgmt-iothubInstalling azure-mgmt-iothub
Before you install
Low friction: pure Python wheel with four lightweight runtime dependencies (isodate, typing-extensions, azure-common, azure-mgmt-core). Actively maintained—last commit 2026-08-14, no security vulnerabilities reported.
License in practice
MIT License (permissive). No restrictions on commercial use, modification, or distribution; attribution required.
Quickstart
pip install azure-mgmt-iothub
from azure.mgmt.iothub import IotHubClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = IotHubClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Requires Python 3.8+, Azure subscription, and environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID) for authentication.
Verify before relying
- Specific operations and models available in version 4.0.0 after removal of unused API versions.
- Whether async support (aio namespace) is available in this version.
- Compatibility with specific Azure IoT Hub API versions after the 4.0.0 breaking change.
- Details on credential handling and whether DefaultAzureCredential is provided by a runtime dependency.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — isodate, typing-extensions, azure-common, azure-mgmt-core |
| Maintenance | actively maintained — 492 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,151,186/month — #1,780 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_mgmt_iothub-4.0.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
azure-iot-hubProvides CRUD operations and service management…
permissive · top 15,000 on PyPI
azure-mgmt-iothubprovisioningservicesManages Azure IoT Hub Provisioning Services…
permissive · top 5,000 on PyPI
azure-mgmt-iotcentralManages Azure IoT Central applications and…
unclear · top 5,000 on PyPI
azure-mgmt-managementpartnerProvides a Python client library for managing…
unclear · top 5,000 on PyPI
azure-iot-deviceConnects Python applications to Azure IoT Hub…
permissive · top 15,000 on PyPI
azure-mgmt-notificationhubsManages Azure Notification Hubs…
permissive · top 5,000 on PyPI
azure-mgmt-signalrManages Azure SignalR resources—creation,…
permissive · top 5,000 on PyPI
azure-mgmt-devspacesProvides Python client library bindings for…
permissive · top 5,000 on PyPI
LucoPyLucoPy is a Python SDK for interacting with the…
permissive · top 15,000 on PyPI
azure-mgmt-trafficmanagerProvides a Python client library to manage…
permissive · top 5,000 on PyPI