Install & Compatibility
Where this runs
tested against v3.0.2 · 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 · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Namespace Placeholder
✓ This package does not export any direct symbols. Its purpose is to define the 'azure.mgmt' namespace, allowing imports from specific management clients like `from azure.mgmt.compute import ComputeManagementClient` once `azure-mgmt-compute` is installed.
Users should install specific `azure-mgmt-*` client libraries (e.g., `azure-mgmt-resource`) to access management functionality. This package itself provides no callable code.
The `azure-mgmt-nspkg` package itself does not provide any direct functionality or classes to instantiate. This quickstart demonstrates how to use a typical Azure management client (e.g., `ResourceManagementClient` from `azure-mgmt-resource`), which relies on the `azure.mgmt` namespace. Ensure you have `azure-identity` and the specific `azure-mgmt-*` package installed, and your Azure credentials configured.
# The azure-mgmt-nspkg package does not offer direct runnable code.
# It's a namespace provider. To interact with Azure resources,
# you need to install and import a specific management client.
# Example for Azure Resource Management:
# pip install azure-mgmt-resource
from azure.identity import DefaultAzureCredential
from azure.mgmt.resource import ResourceManagementClient
import os
# Ensure AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID are set
# or use other credential types from azure.identity
subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', 'YOUR_SUBSCRIPTION_ID')
if subscription_id == 'YOUR_SUBSCRIPTION_ID':
print("Warning: AZURE_SUBSCRIPTION_ID environment variable not set. Please set it for a real quickstart.")
else:
try:
credential = DefaultAzureCredential()
resource_client = ResourceManagementClient(credential, subscription_id)
# Example: List resource groups
print(f"Listing resource groups in subscription {subscription_id}:")
for group in resource_client.resource_groups.list():
print(f"- {group.name} in {group.location}")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure your Azure credentials and subscription ID are correctly configured.")
Debug
Known issues
gotchaThis package is a namespace package only. It does not contain any functional code, classes, or methods. Installing `azure-mgmt-nspkg` alone will not provide any Azure management capabilities; you must install specific client libraries like `azure-mgmt-compute`, `azure-mgmt-resource`, etc.fixInstall the specific `azure-mgmt-SERVICE` package for the Azure service you wish to manage (e.g., `pip install azure-mgmt-storage`).
affects: All versions (1.0.0+)
gotchaInstalling `azure-mgmt-nspkg` does NOT automatically install all Azure management client libraries. It serves only to consolidate the `azure.mgmt` namespace for packages that rely on it.fixIdentify the specific Azure service you need to interact with and install its corresponding client library (e.g., `pip install azure-mgmt-web`).
affects: All versions (1.0.0+)
deprecatedFor modern Python environments (Python 3.3+) and recent Azure SDKs, explicit installation of `azure-mgmt-nspkg` is often no longer strictly necessary due to PEP 420 (Implicit Namespace Packages). The individual `azure-mgmt-SERVICE` packages typically contribute to the `azure.mgmt` namespace automatically.fixFor new projects or modern Python environments, simply install the specific `azure-mgmt-SERVICE` packages you need. If you encounter `ModuleNotFoundError` for `azure.mgmt` with specific management clients, then installing `azure-mgmt-nspkg` might resolve it, though it's less common now.
affects: Mainly relevant for older Python 2.x projects or specific legacy setups that predate widespread PEP 420 adoption in the Azure SDK. Less critical for new projects.
breakingThe `ModuleNotFoundError: No module named 'azure'` indicates that the base `azure` namespace package is not installed. This error occurs when attempting to import a module from `azure` (e.g., `azure.identity`, `azure.core`, etc.) without having installed any Azure client library that provides the top-level `azure` namespace. The warnings currently focus on `azure-mgmt-nspkg`, which is for the `azure.mgmt` sub-namespace.fixInstall the specific Azure client library you need. For example, to use `azure.identity`, you must install `pip install azure-identity`. This (or installing `azure-core` or any other `azure-*` client library) will provide the necessary `azure` namespace package.
affects: All versions
gotchaThe `azure-mgmt-nspkg` package is specifically designed to manage the `azure.mgmt` namespace for management plane clients. It does not provide the `azure` namespace for, nor does it install, data-plane packages like `azure-identity`, `azure-storage-blob`, or `azure-keyvault`. To use modules like `azure.identity`, you must explicitly install the corresponding package (e.g., `pip install azure-identity`).fixIdentify the specific Azure service or functionality you need (e.g., identity, storage, key vault) and install its corresponding client library (e.g., `pip install azure-identity` for `DefaultAzureCredential`).
affects: All versions (1.0.0+)
Upgrade
Version history
3.0.2latest on PyPI · released Oct 2, 2018
Audit
Dependencies
No dependency data recorded yet.