Search code examples
pythonazure-blob-storage

Python library to open a file handle to Azure Blob Storage object, similar to s3fs library for AWS S3


For AWS S3, there is a Python library called s3fs that can open file handles to S3 objects.

E.g.

import s3fs
s3 = s3fs.S3FileSystem(anon=True)
with s3.open('my-bucket/my-file.txt', 'rb') as f:
    print(f.read())

Is there something similar for Azure Blob Storage?


Solution

  • The direct equivalent package of s3fs for Azure Blob / Data Lake storage is adlfs.

    fsspec is a library that sits on top of both s3fs and adlfs(and many other file systems) .