Registry / azure / azure-storage-nspkg

azure-storage-nspkg

JSON →
library3.1.0pypypi✓ verified 21d ago

The `azure-storage-nspkg` package is an internal Microsoft Azure Storage namespace package, primarily associated with the V2 Python SDK for Azure Storage. This package served to define the `azure.storage` namespace, allowing older client libraries like `azure-storage-blob` (versions < 3), `azure-storage-file`, and `azure-storage-queue` to be imported under this common prefix. The V2 SDK is deprecated; users should migrate to the V12 SDK, which uses separate, hyphenated packages (e.g., `azure-storage-blob` version 12.x.x) and does not require or use `azure-storage-nspkg`.

pip install azure-storage-nspkg
INSTALL
IMPORT
SIG · AZURE-STORAGE-NSPK
A
azure-storage-nspkg
azurepythonv3.1.0
Install
2.7s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.7s · import 0.000s · 18MB
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BlockBlobService
from azure.storage.blob import BlockBlobService
from azure.storage.blob import BlockBlobService

This quickstart demonstrates how to connect to Azure Blob Storage using the *V12 SDK* (`azure-storage-blob` version 12.x.x), which is the currently recommended approach. This package (`azure-storage-nspkg`) is not required for the V12 SDK. Replace `youraccount` and `yourkey` with your actual Azure Storage account details or set the `AZURE_STORAGE_CONNECTION_STRING` environment variable.

import os from azure.storage.blob import BlobServiceClient connection_string = os.environ.get('AZURE_STORAGE_CONNECTION_STRING', 'DefaultEndpointsProtocol=https;AccountName=youraccount;AccountKey=yourkey;EndpointSuffix=core.windows.net') try: # Create the BlobServiceClient object which will be used to create a container client blob_service_client = BlobServiceClient.from_connection_string(connection_string) # Create a unique name for the container container_name = 'quickstart-container-12345' # Create the container if it doesn't exist try: container_client = blob_service_client.create_container(container_name) print(f"Container '{container_name}' created successfully.") except Exception as e: print(f"Container '{container_name}' already exists or another error: {e}") container_client = blob_service_client.get_container_client(container_name) # Example: List blobs in the container print("Listing blobs...") blob_list = container_client.list_blobs() for blob in blob_list: print(f"\t{blob.name}") except ValueError as e: print(f"Error: {e}. Please ensure AZURE_STORAGE_CONNECTION_STRING is set or configured correctly.") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingThe Azure Storage SDK for Python has undergone a major redesign from V2 to V12. The V12 SDK introduces a completely new API surface, different package names (e.g., `azure-storage-blob` for V12 vs. `azure-storage-blob` for V2, but with different major version numbers), and improved idiomatic Python design. Code written for V2 will not work with V12 without significant refactoring.
fix
Migrate your code to use the V12 SDK. Refer to the official Microsoft documentation for migration guides (search 'Migrate from Azure Storage SDK V2 to V12 Python'). Install `azure-storage-blob`, `azure-storage-file-share`, or `azure-storage-queue` directly.
affects: V2 SDK (e.g., `azure-storage-blob` < 3.0.0) vs. V12 SDK (`azure-storage-blob` >= 12.0.0)
deprecatedThe `azure-storage-nspkg` package and the V2 Azure Storage SDK it supported are deprecated. Microsoft recommends using the V12 SDK for all new development and migrating existing applications.
fix
Avoid using `azure-storage-nspkg`. Install and use the V12 client libraries, such as `azure-storage-blob>=12.0.0`, `azure-storage-file-share>=12.0.0`, and `azure-storage-queue>=12.0.0`. These packages do not depend on or require `azure-storage-nspkg`.
affects: All versions of `azure-storage-nspkg` and V2 related packages.
gotchaThe package name `azure-storage-blob` exists for both the legacy V2 SDK (versions < 3) and the current V12 SDK (versions >= 12). Installing `pip install azure-storage-blob` without specifying a version might lead to installing the V12 SDK, but if `azure-storage-nspkg` (or other V2 dependencies) is already present, version conflicts or unexpected behavior can occur if you intend to use V2.
fix
Always explicitly specify the major version when installing: `pip install azure-storage-blob==2.*` for V2 (legacy) or `pip install azure-storage-blob>=12` for V12 (recommended). For new projects, *only* install V12 packages and avoid `azure-storage-nspkg` entirely.
affects: All versions, due to ambiguous package naming across major versions.
Upgrade
Version history
3.1.0latest on PyPI · released Nov 10, 2018
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
26
OpenAI (training)
1
Resources
azure-storage-nspkg — pip install azure-storage-nspkg · libregistry