title | description | ms.date | ms.topic | ms.devlang | ms.service |
---|---|---|---|---|---|
Azure Storage SDK for Python |
Reference for Azure Storage SDK for Python |
03/01/2024 |
reference |
python |
azure-storage |
Package Name | Reference | Package Manager | Source |
---|---|---|---|
Storage Blob | Reference | PyPi | GitHub |
Storage Queue | Reference | PyPi | GitHub |
Storage File Share | Reference | PyPi | GitHub |
Storage File Data Lake (Preview) | Reference | PyPi | GitHub |
Package Name | Reference | Package Manager | Source |
---|---|---|---|
Storage Blob | Reference | PyPi | GitHub |
Storage Queue | Reference | PyPi | GitHub |
Storage File Share | Reference | PyPi | GitHub |
Package Name | Reference | Package Manager | Source |
---|---|---|---|
Storage Management | Reference | PyPi | GitHub |
Azure Storage Client Libraries consist of 3 packages: Blob, File Share, and Queue. To install the blob package, run:
pip install azure-storage-blob
pip install azure-mgmt-storage
Article | Description |
---|---|
Get started with Azure Blob Storage in Python | Create, read, update, restrict access, and delete files and objects in Azure Storage. |
Manage Azure Storage accounts | Create, update, and delete storage accounts. Retrieve and regenerate storage account access keys. |
Explore more sample Python code you can use in your apps.
This section details known issues for the Azure Storage client libraries for Python.
Under rare circumstances, performing a full download of a sparse Page Blob using BlobClient.download_blob
could result in the downloaded content containing up to one "chunk" of extra data (all byte value \x00
) at the end. Specifically, this could occur if the total blob size was not divisible by the chunk size used for the download (defaults to 4 MiB).
Client library | Versions impacted | Minimum safe version | Recommended action |
---|---|---|---|
azure-storage-blob | 12.0 to 12.19.0 | 12.19.1 | Update to latest version or minimum 12.19.1 |
In rare scenarios, applications that have upgraded to the latest beta or generally available version of the SDK can receive an InvalidHeaderValue
error message. This issue can occur when using any of the Storage libraries. The error message looks similar to the following sample:
HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format.
Content-Length: 328
Content-Type: application/xml
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: <REMOVED>
Date: Fri, 19 May 2023 17:10:33 GMT
<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:<REMOVED>
Time:2023-05-19T17:10:34.2972651Z</Message><HeaderName>x-ms-version</HeaderName><HeaderValue>yyyy-mm-dd</HeaderValue></Error>
If you've upgraded to the latest beta or generally available of the SDK and you experience this error, it's recommended that you downgrade to the previous generally available version of the SDK to see if the issue resolves. If the issue persists, or if the recommendation is not feasible, open a support ticket to explore further options.