Created
November 2, 2022 06:11
-
-
Save thehappycheese/6c985b1ab0cd69f41b33af75a0940cd1 to your computer and use it in GitHub Desktop.
How to use fsspec with Azure Blob Storage Account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must use the async io variant of Azure Credentials | |
from azure.identity.aio import DefaultAzureCredential | |
# fsspec directly, use this library which implements it and gives better type hints and autocompletion | |
import adlfs | |
cloud_filesystem = adlfs.AzureBlobFileSystem( | |
account_name="<STORAGE_ACCOUNT_NAME>", | |
credential=DefaultAzureCredential() | |
) | |
# list objects | |
cloud_filesystem.ls(f"<CONTAINER_NAME>/some/path/", detail=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment