Azure Blob Storage for Python
Guides secure, production-minded Blob Storage operations in Python.
The documentation recommends DefaultAzureCredential, constrains production credential chains, avoids account keys, and demonstrates user-delegation SAS with read-only permission, reducing credential risk. However, upload, delete, and SAS-generation operations lack user-confirmation, rollback, or recovery guidance; data-flow, sensitive-data handling, and permission boundaries are incomplete, so points are deducted.
The client hierarchy and upload, download, listing, and async patterns are broadly coherent, and deterministic client cleanup is emphasized. However, there is little exception handling, retry guidance, pagination guidance, conflict handling, or diagnosable permission/network failure feedback; the main async section also inconsistently omits credential lifecycle management. Static calibration limits this score to 10 or below.
Triggers, SDK scope, common scenarios, and sync/async modes are reasonably clear. Non-fit ranges, input/output contracts, compatibility boundaries, Chinese-language guidance, and mainland-China reachability of Azure endpoints and authentication services are not addressed, so points are deducted.
The skill has readable installation, authentication, hierarchy, workflow, performance, and reference sections, with MIT licensing, author, and version metadata. Dependencies are unpinned, and changelog, maintenance ownership, update path, troubleshooting, and complete limitation disclosures are missing; some reference content is duplicated.
It directly covers common Blob container, upload, download, listing, deletion, metadata, and SAS tasks, with usable starting snippets. The examples are not complete end-to-end implementations, lack production cleanup and error handling, and require substantial review for destructive operations. Static calibration caps this dimension at 7.
The skill and references, pinned revision, license, and repository CI/test infrastructure provide auditable evidence. There are no skill-specific committed tests, real execution results, or independent third-party corroboration for the key API paths, so independent reproduction cannot be claimed.
- The delete-blob example lacks confirmation, soft-delete/snapshot recovery, or rollback guidance; users should verify resource scope before applying it.
- Production dependency versions are unpinned, and examples do not cover authorization failures, network failures, retries, pagination, or large-file edge cases.
- Reachability of Azure authentication and service endpoints from mainland-China networks is not documented, and no Chinese-language guidance is provided.
What it does & when to use it
This skill gives coding agents focused guidance for the Azure Blob Storage SDK for Python. It covers container and blob creation, uploads, downloads, listing, deletion, metadata, properties, SAS tokens, and large-transfer tuning. Its authentication guidance favors DefaultAzureCredential, Microsoft Entra ID, and deterministic client cleanup, making it suited to Python projects that need consistent local and Azure production patterns.
It explains how to install azure-storage-blob and azure-identity, configure storage account environment variables, and use BlobServiceClient, ContainerClient, and BlobClient for container creation, blob uploads, downloads, prefix listing, virtual-directory walking, deletion, property retrieval, metadata updates, and HTTP content headers. It also provides synchronous and asynchronous examples, concurrent large-file transfers, and user-delegation SAS generation.
- A Python developer needs to upload files, bytes, or streams to Azure Blob Storage.
- A backend engineer needs to download blobs to disk, memory, or an existing buffer.
- An application needs prefix-based blob listing or virtual-directory traversal.
- A team wants Microsoft Entra authentication instead of connection strings or storage account keys.
- A service handles large uploads or downloads and needs chunk-size and concurrency controls.
Pros & cons
- Covers the core Azure Blob Storage object and file-transfer workflows.
- Provides explicit guidance for DefaultAzureCredential, user-delegation SAS, and production credential constraints.
- Includes synchronous, asynchronous, streaming, and concurrent-transfer examples.
- Addresses resource cleanup, memory efficiency, and content types.
- The scope is limited to the Blob Storage SDK and does not cover other Azure Storage services.
- The supplied source does not provide standalone test results or a version-compatibility matrix for this skill.
- It requires Python, the Azure SDK packages, a storage account, and appropriate identity permissions.
- Some environment-specific setup, permission details, and error-handling guidance remain undocumented.
How to install
Run npx skills add microsoft/skills and select the required skill in the wizard. The skill is located at .github/plugins/azure-sdk-python/skills/azure-storage-blob-py/SKILL.md. The README does not document a dedicated single-skill installation command.
How to use
In an Agent Skills-compatible coding agent, make a concrete request such as: “Use the azure-storage-blob Python SDK with DefaultAzureCredential to upload and download a blob.” Install azure-storage-blob azure-identity, set AZURE_STORAGE_ACCOUNT_NAME or AZURE_STORAGE_ACCOUNT_URL, and set AZURE_TOKEN_CREDENTIALS=prod as appropriate for production. Keep synchronous and asynchronous client usage consistent and use the shown context-manager patterns. Further runtime setup details are not documented in the supplied source.