Registry /
azure / azure-mgmt-iothubprovisioningservices
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 46MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.1s · import 0.000s · 46MB
45MB installed
● package 45MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
IotDpsClient
✓ from azure.mgmt.iothubprovisioningservices import IotDpsClient
✗ from azure.mgmt.iothubprovisioningservices.iot_hub_provisioning_services_client import IotHubProvisioningServicesClient
The primary client class is IotDpsClient, directly under the top-level package. Older patterns might use different class names or sub-module imports which are no longer standard or might be specific to previous beta versions.
DefaultAzureCredential
✓ from azure.identity import DefaultAzureCredential
Standard authentication class for Azure SDKs.
This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and list all IoT Hub Provisioning Services within a specified resource group. Ensure you have `AZURE_SUBSCRIPTION_ID` and `AZURE_RESOURCE_GROUP_NAME` set as environment variables. `DefaultAzureCredential` will automatically try to pick up credentials from your environment (e.g., Azure CLI, environment variables, Managed Identity).
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.iothubprovisioningservices import IotDpsClient
# Set your Azure Subscription ID and Resource Group name as environment variables
# export AZURE_SUBSCRIPTION_ID="<your-subscription-id>"
# export AZURE_RESOURCE_GROUP_NAME="<your-resource-group-name>"
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "").strip()
resource_group_name = os.environ.get("AZURE_RESOURCE_GROUP_NAME", "").strip()
if not subscription_id or not resource_group_name:
raise ValueError("Please set AZURE_SUBSCRIPTION_ID and AZURE_RESOURCE_GROUP_NAME environment variables.")
# Authenticate with Azure. DefaultAzureCredential attempts several credential types.
credential = DefaultAzureCredential()
# Create an IoT Hub Provisioning Services client
client = IotDpsClient(credential, subscription_id)
print(f"Listing all IoT Hub Provisioning Services in resource group '{resource_group_name}'...")
# List provisioning services in a specific resource group
for dps in client.iot_dps_resource.list_by_resource_group(resource_group_name):
print(f" - {dps.name} (Location: {dps.location}, Sku: {dps.sku.name})")
print("Done.")
Debug
Known issues
breakingThe credential system was completely revamped in beta versions leading up to 1.0.0. `azure.common.credentials` or `msrestazure.azure_active_directory` instances are no longer supported. The `credentials` parameter was renamed to `credential`.fixMigrate to `azure-identity` classes (e.g., `DefaultAzureCredential`) for authentication and pass the credential object via the `credential` parameter.
affects: <= 0.x (pre-1.0.0b1) and early 1.0.0b1
breakingThe `config` attribute no longer exists directly on the client object for passing configuration. Client configuration should now be passed as keyword arguments during client instantiation.fixPass configuration options like `polling_interval` or `retry_total` directly as keyword arguments to the client constructor (e.g., `IotDpsClient(credential, subscription_id, enable_logging=True)`).
affects: <= 0.x (pre-1.0.0b1) and early 1.0.0b1
breakingLong-running operations (LROs) that previously returned `msrest.polling.LROPoller` now return `azure.core.polling.LROPoller` and are prefixed with `begin_`.fixAdjust code to call methods like `begin_create_or_update` instead of `create_or_update` for LROs, and use the `azure.core.polling.LROPoller` object returned.
affects: <= 0.x (pre-1.0.0b1) and early 1.0.0b1
gotchaIncorrect or missing environment variables are a common cause of authentication failures when using `DefaultAzureCredential`. This credential type relies on specific environment variables (e.g., `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID`) to locate credentials.fixEnsure all necessary Azure authentication environment variables are correctly set for your chosen authentication method, or explicitly provide credential details.
affects: All versions using `azure-identity`
deprecatedPython 2.7 support for Azure SDK Python packages ended on January 1, 2022. While older versions might have been compatible, newer versions are designed for Python 3.6+.fixEnsure your development and deployment environment uses Python 3.6 or later (Python 3.8+ is recommended for the broader Azure SDK).
affects: All versions after 0.x
breakingThe library encounters a `ModuleNotFoundError` for the `six` compatibility module, which is a required dependency for some versions of the library, particularly older ones or those with complex dependency trees. This prevents the library from being imported successfully.fixExplicitly install the `six` package using `pip install six` in your environment before installing or using `azure-mgmt-iothubprovisioningservices`. Ensure your `pip` version is up-to-date to improve dependency resolution and install all required packages.
affects: Older versions of `azure-mgmt-iothubprovisioningservices` or any version that still relies on `six` directly or transitively.
breakingThe 'six' library, a common utility for Python 2/3 compatibility and often a transitive dependency for Azure SDK packages, was not found during runtime. This prevents the Azure SDK package from being imported.fixEnsure that all required package dependencies are correctly installed. If 'six' is missing, it may need to be explicitly installed (`pip install six`) or the environment setup for package resolution might be incomplete. Verify that `pip install azure-mgmt-iothubprovisioningservices` successfully pulls in all required transitive dependencies.
affects: All versions where 'six' is an explicit or transitive dependency.
Upgrade
Version history
1.1.0latest on PyPI · released Feb 7, 2022
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication with DefaultAzureCredential.
msrestazureoptionalHistorically used for Azure-specific credentials; largely replaced by azure-identity in newer SDK versions.