{"id":3417,"library":"azure-multiapi-storage","title":"Azure Multi-API Storage Client Library for Python","description":"The `azure-multiapi-storage` library provides a client for Microsoft Azure Storage services, allowing developers to target specific API versions for Blob, Queue, File Share, and Data Lake services. This is a meta-package that orchestrates the official `azure-storage-*` SDKs. The current stable version is 1.6.0, with frequent updates to support newer Azure Storage API versions and deprecate older ones.","status":"active","version":"1.6.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-multiapi-storage-python","tags":["azure","storage","blob","queue","file-share","data-lake","multi-api","cloud"],"install":[{"cmd":"pip install azure-multiapi-storage","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core functionality for Blob Storage service.","package":"azure-storage-blob","optional":false},{"reason":"Core functionality for Queue Storage service.","package":"azure-storage-queue","optional":false},{"reason":"Core functionality for File Share service.","package":"azure-storage-file-share","optional":false},{"reason":"Core functionality for Data Lake Storage service.","package":"azure-storage-file-datalake","optional":false}],"imports":[{"note":"The multi-api library requires explicit API versioning in the import path (e.g., `v2022_11_02`). Importing directly from `azure.storage.blob` bypasses the multi-api versioning and uses the underlying SDK's default API.","wrong":"from azure.storage.blob import BlobServiceClient","symbol":"BlobServiceClient","correct":"from azure.multiapi.storage.v2022_11_02.blob import BlobServiceClient"},{"note":"Example for Queue Service Client, using a supported API version from 1.6.0.","symbol":"QueueServiceClient","correct":"from azure.multiapi.storage.v2018_03_28.queue import QueueServiceClient"}],"quickstart":{"code":"import os\nfrom azure.multiapi.storage.v2022_11_02.blob import BlobServiceClient\n\nconnection_string = os.environ.get('AZURE_STORAGE_CONNECTION_STRING', 'DefaultEndpointsProtocol=https;AccountName=test;AccountKey=test;EndpointSuffix=core.windows.net')\n\nif connection_string == 'DefaultEndpointsProtocol=https;AccountName=test;AccountKey=test;EndpointSuffix=core.windows.net':\n    print(\"WARNING: AZURE_STORAGE_CONNECTION_STRING not set. Using dummy connection string. This will likely fail.\")\n\ntry:\n    # Create a BlobServiceClient with the specified API version\n    blob_service_client = BlobServiceClient.from_connection_string(connection_string)\n    \n    # List containers (example operation)\n    print(\"Listing blob containers:\")\n    for container in blob_service_client.list_containers(name_starts_with=\"my\"): # Add name_starts_with for faster results if many containers\n        print(f\"- {container['name']}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Ensure AZURE_STORAGE_CONNECTION_STRING is set and valid, and containers exist.\")","lang":"python","description":"This quickstart demonstrates how to initialize a `BlobServiceClient` using a specific API version (`v2022_11_02`) and list blob containers. Ensure you have the `AZURE_STORAGE_CONNECTION_STRING` environment variable set with your Azure Storage account connection string."},"warnings":[{"fix":"Always check release notes before upgrading and update your import paths (e.g., `from azure.multiapi.storage.vYYYY_MM_DD.blob import ...`) to use currently supported API versions. Pin your `azure-multiapi-storage` version if you need to stick to an older API.","message":"Each release of `azure-multiapi-storage` frequently removes support for older Azure Storage API versions. For example, version 1.7.0b1 removes several older API versions for blob, fileshare, filedatalake, and queue services. Relying on a specific older API version means you might encounter breaking changes upon upgrading the library.","severity":"breaking","affected_versions":"1.0.0+"},{"fix":"Migrate your code to use the 'Track 2' SDK patterns provided by `azure-multiapi-storage`, which involve explicit API versioning in the import paths (e.g., `v2021_08_06`).","message":"Version 1.5.0 of `azure-multiapi-storage` completely removed all 'Track 1' (older) SDKs. If your application was using these older APIs indirectly through this library, an upgrade to 1.5.0 or later will cause import and runtime errors.","severity":"breaking","affected_versions":"1.5.0+"},{"fix":"Avoid using `--pre` for production environments. If testing new features, be prepared for frequent breaking changes and carefully review the release notes for each beta version you use.","message":"Using `pip install --pre azure-multiapi-storage` to install preview/beta versions (e.g., `1.7.0b1`) can lead to very rapid and breaking API version changes between beta releases. New API versions are often introduced alongside the immediate removal of older ones in these pre-releases.","severity":"gotcha","affected_versions":"All preview/beta versions"},{"fix":"Always include the `vYYYY_MM_DD` segment in your import paths to correctly leverage the multi-API versioning capabilities of this library.","message":"The `azure-multiapi-storage` library does not automatically handle API version negotiation or fallback. You must explicitly specify the desired Azure Storage API version in your import statements (e.g., `from azure.multiapi.storage.v2022_11_02.blob import ...`). Failing to do so, or using direct imports like `from azure.storage.blob import ...`, will bypass the multi-api functionality.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}