Microsoft Azure namespace package for Python 2.7 that enables namespace package functionality for Azure SDK components.
npx @tessl/cli install tessl/pypi-azure-nspkg@3.0.0Microsoft Azure namespace package for Python 2.7 that provides namespace package functionality for Azure SDK components. This is an internal infrastructure package that enables other Azure SDK packages to extend the azure namespace using Python's pkgutil.extend_path mechanism.
pip install azure-nspkgimport azureThe azure-nspkg package is not intended for direct usage by end users. It serves as infrastructure for other Azure SDK packages to extend the azure namespace. When installed, it allows packages like azure-storage, azure-keyvault, etc. to be imported as submodules of the azure namespace.
# After installing azure-nspkg and other Azure packages:
# from azure.storage import BlobService # (if azure-storage is installed)
# from azure.keyvault import KeyVaultClient # (if azure-keyvault is installed)The package uses Python's namespace package mechanism:
pkgutil.extend_path(__path__, __name__) to enable namespace package functionalityazure package on Python 2.7; Python 3+ relies on PEP420 implicit namespace packagesProvides the foundational namespace package functionality that allows multiple Azure SDK packages to coexist under the azure namespace.
# azure/__init__.py content:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)The setup process includes compatibility validation to prevent conflicts with older azure packages that used incompatible namespace mechanisms.
# Compatibility check logic (from setup.py):
try:
import azure
try:
ver = azure.__version__ # Only exists in incompatible v0.x
raise Exception(
'This package is incompatible with azure=={}. '.format(ver) +
'Uninstall it with "pip uninstall azure".'
)
except AttributeError:
pass # Compatible, no __version__ attribute
except ImportError:
pass # No existing azure package, safe to installazure namespace package modulepython_requires# Package configuration:
name = 'azure-nspkg'
version = '3.0.2'
description = 'Microsoft Azure Namespace Package [Internal]'
author = 'Microsoft Corporation'
license = 'MIT License'
zip_safe = False
packages = ['azure'] # Python 2.7 only, empty list for Python 3.x