Microsoft Azure Resource Management Namespace Package providing namespace infrastructure for Azure SDK Python management libraries
npx @tessl/cli install tessl/pypi-azure-mgmt-nspkg@3.0.0Microsoft Azure Resource Management Namespace Package providing namespace infrastructure for Azure SDK Python management libraries. This package enables proper namespace organization for the azure.mgmt hierarchy, serving as an internal dependency that other Azure management packages extend.
pip install azure-mgmt-nspkg (automatically installed as dependency)This package provides namespace functionality that is automatically handled when installed:
# The namespace extensions happen automatically when installed
# No direct imports are typically needed by usersFor understanding the namespace structure:
import azure.mgmt
# This namespace becomes available through this packageThis package is not intended for direct use by end-users. It is automatically installed as a dependency of other Azure management packages and provides namespace infrastructure:
# Example of how other Azure management packages use this namespace:
# When you install azure-mgmt-compute, azure-mgmt-storage, etc.,
# they extend the azure.mgmt namespace enabled by this package
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.storage import StorageManagementClient
# The azure.mgmt namespace is provided by azure-mgmt-nspkgThis package implements Python namespace package functionality with version-specific behavior:
pkgutil.extend_path and installs the azure.mgmt packageThe namespace structure enables multiple Azure management libraries to coexist under the azure.mgmt hierarchy. The installation behavior differs by Python version to accommodate the different namespace mechanisms while maintaining compatibility.
Provides the foundational namespace infrastructure for the Azure management SDK ecosystem.
# azure/__init__.py
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
# azure/mgmt/__init__.py
__path__ = __import__('pkgutil').extend_path(__path__, __name__)Adapts installation behavior based on Python version to ensure compatibility across Python 2.7 and Python 3.x environments. On Python 2.7, installs the azure.mgmt package; on Python 3.x, installs an empty package to avoid conflicts with PEP 420.
# Setup configuration (from setup.py)
import sys
PACKAGES = []
if sys.version_info[0] < 3:
PACKAGES = ['azure.mgmt']Automatically detects and prevents installation conflicts with incompatible legacy Azure packages (version < 1.0) that have a __version__ attribute.
# Compatibility check logic (from setup.py)
try:
import azure
try:
ver = azure.__version__
raise Exception(
'This package is incompatible with azure=={}. '.format(ver) +
'Uninstall it with "pip uninstall azure".'
)
except AttributeError:
pass # Compatible - newer versions don't have __version__
except ImportError:
pass # No azure package installedWhen you install Azure management packages, this namespace package is automatically included:
# These commands will automatically install azure-mgmt-nspkg as a dependency:
pip install azure-mgmt-compute
pip install azure-mgmt-storage
pip install azure-mgmt-network
# Direct installation (not recommended for end users):
pip install azure-mgmt-nspkgThe package includes built-in compatibility validation that will raise an exception during installation if incompatible azure packages are detected:
Exception__version__ attribute (v0.x) is present