Azure Storage client libraries for Python

Client Packages (12.X.X) - Latest

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

Client Packages (2.X.X) - Legacy

Package Name Reference Package Manager Source
Storage Blob Reference PyPi GitHub
Storage Queue Reference PyPi GitHub
Storage File Share Reference PyPi GitHub

Management

Package Name Reference Package Manager Source
Storage Management Reference PyPi GitHub

Install the libraries

Client

Azure Storage Client Libraries consist of 3 packages: Blob, File Share, and Queue. To install the blob package, run:

pip install azure-storage-blob

Management

pip install azure-mgmt-storage

Samples

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.

Known issues

This section details known issues for the Azure Storage client libraries for Python.

InvalidHeaderValue error message when using beta version of SDK

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.