I’m currently converting Powershell scripts to python scripts using azure python SDK. Is there an equivalent class or module to AzStorageAccount
to get the list of blob urls using azure python sdk? I check the library azure.mngt.storage doesn’t provide me the info i needed.
2
Answers
I was able to solve the problem by using azure.mgmt.storage
The package you would want to use to work with data stored in Azure Blob Storage would be
azure-storage-blob
(https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python).azure.mngt.storage
is the SDK for managing storage account themselves and do not offer data management capabilities.The code would be something like:
You can find more code samples here: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob/samples.