Skip to main content

Filesystem interface to Azure Blob and Data Lake Storage (Gen2)

PyPI version shields.io Latest conda-forge version API Reference

Quickstart

This package can be installed using:

pip install adlfs

or

conda install -c conda-forge adlfs

The az:// and abfs:// protocols are included in fsspec's known_implementations registry.

To connect to Azure Blob Storage or Azure Data Lake Storage (ADLS) Gen2 filesystem you can use the protocol abfs or az:

import dask.dataframe as dd

storage_options={'account_name': ACCOUNT_NAME, 'account_key': ACCOUNT_KEY}

ddf = dd.read_csv('abfs://{CONTAINER}/{FOLDER}/*.csv', storage_options=storage_options)
ddf = dd.read_parquet('az://{CONTAINER}/folder.parquet', storage_options=storage_options)

Accepted protocol / uri formats include:
'PROTOCOL://container/path-part/file'
'PROTOCOL://container@account.blob.core.windows.net/path-part/file'
'PROTOCOL://container@account.dfs.core.windows.net/path-part/file'

or optionally, if AZURE_STORAGE_ACCOUNT_NAME and an AZURE_STORAGE_<CREDENTIAL> is 
set as an environmental variable, then storage_options will be read from the environmental
variables

To read from a public storage blob you are required to specify the 'account_name'. For example, you can access NYC Taxi & Limousine Commission as:

storage_options = {'account_name': 'azureopendatastorage'}
ddf = dd.read_parquet('az://nyctlc/green/puYear=2019/puMonth=*/*.parquet', storage_options=storage_options)

Details

The package includes pythonic filesystem implementations for both Azure Blobs and Azure Datalake Gen2 (ADLS), that facilitate interactions between these implementations and Dask. This is done leveraging the fsspec/filesystem_spec base class and Azure Python SDKs.

Operations against Azure Blobs and ADLS Gen2 are implemented by leveraging Azure Blob Storage Python SDK.

Setting credentials

If no credentials/configuration is provided, DefaultAzureCredential will be used for authentication. If you want to use alternative credentials, storage_options can be instantiated with a variety of keyword arguments:

  • connection_string
  • account_name
  • account_key
  • sas_token
  • tenant_id, client_id, and client_secret are combined for an Azure ServicePrincipal e.g. storage_options={'account_name': ACCOUNT_NAME, 'tenant_id': TENANT_ID, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET}
  • anon: bool, optional. Set to True to use anonymous authentication. If not set, the AZURE_STORAGE_ANON environment variable will be checked before defaulting to False where credentials are discovered on the system.
  • location_mode: valid values are "primary" or "secondary" and apply to RA-GRS accounts

For more argument details see all arguments for AzureBlobFileSystem here

The following environmental variables can also be set and picked up for authentication:

  • "AZURE_STORAGE_CONNECTION_STRING"
  • "AZURE_STORAGE_ACCOUNT_NAME"
  • "AZURE_STORAGE_ACCOUNT_KEY"
  • "AZURE_STORAGE_SAS_TOKEN"
  • "AZURE_STORAGE_TENANT_ID"
  • "AZURE_STORAGE_CLIENT_ID"
  • "AZURE_STORAGE_CLIENT_SECRET"

The filesystem can be instantiated for different use cases based on a variety of storage_options combinations. The following list describes some common use cases utilizing AzureBlobFileSystem, i.e. protocols abfsor az. Note that all cases require the account_name argument to be provided:

  1. Auto credential solving using Azure's DefaultAzureCredential() library: storage_options={'account_name': ACCOUNT_NAME} will use DefaultAzureCredential to get valid credentials to the container ACCOUNT_NAME. DefaultAzureCredential attempts to authenticate via the mechanisms and order visualized here.
  2. Anonymous connection to public container: storage_options={'account_name': ACCOUNT_NAME, 'anon': True} will assume the ACCOUNT_NAME points to a public container, and attempt to use an anonymous login. Note, the default value for anon is False.
  3. Azure ServicePrincipal: tenant_id, client_id, and client_secret are all used as credentials for an Azure ServicePrincipal: e.g. storage_options={'account_name': ACCOUNT_NAME, 'tenant_id': TENANT_ID, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET}.

Append Blob

The AzureBlobFileSystem accepts all of the Async BlobServiceClient arguments.

By default, write operations create BlockBlobs in Azure, which, once written can not be appended. It is possible to create an AppendBlob using mode="ab" when creating and operating on blobs. Currently, AppendBlobs are not available if hierarchical namespaces are enabled.

Older versions

ADLS Gen1 filesystem has officially been retired. Hence the adl:// method, which was designed to connect to ADLS Gen1 is obsolete.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adlfs-2026.8.0.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adlfs-2026.8.0-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file adlfs-2026.8.0.tar.gz.

File metadata

  • Download URL: adlfs-2026.8.0.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for adlfs-2026.8.0.tar.gz
Algorithm Hash digest
SHA256 b78a01bd892c2a99f461b2b2ef4592c2eb45934e728f318472291ccaa6378e06
MD5 18a049335a806d128142d6156ab45224
BLAKE2b-256 f4299937905acfaf3e4826d7782f8efab845bb11eaa2e24749a16eeab32e7fa0

See more details on using hashes here.

File details

Details for the file adlfs-2026.8.0-py3-none-any.whl.

File metadata

  • Download URL: adlfs-2026.8.0-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for adlfs-2026.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 858d8999b83ad70baae89ee2ad67f40443f9d94e0257351a74866d643f22d54d
MD5 de46760694758c3bbedfbedb5e1b80e5
BLAKE2b-256 568c2a895811f69699915ddd4e346ea3a1ab26b585025eac890d19dd5193c7f4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2026.8.0 This release

2 files

2026.5.0

2 files

2026.4.0

2 files

2026.2.0

2 files

2025.8.0

2 files

2024.12.0

2 files

2024.7.0

2 files

2024.4.1

2 files

2024.4.0

2 files

2024.2.0

2 files

2024.1.0

2 files

2023.12.0

2 files

2023.10.0

2 files

2023.9.0

2 files

2023.8.0

2 files

2023.4.0

2 files

2023.1.0

2 files

2022.11.2

2 files

2022.11.1

2 files

2022.11.0

2 files

2022.10.0

2 files

2022.9.1

2 files

2022.9.0

2 files

2022.7.0

2 files

2022.4.0

2 files

2022.2.0

1 file

2021.10.0

1 file

2021.9.1

1 file

2021.8.2

1 file

2021.8.1

1 file

2021.7.1

1 file

2021.7.0

1 file

0.7.7

1 file

0.7.6

2 files

0.7.5

1 file

0.7.4

1 file

0.7.3

1 file

0.7.2

1 file

0.7.1

1 file

0.7.0

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.9

2 files

0.5.8

1 file

0.5.7

1 file

0.5.5

1 file

0.5.4

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.0

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.0

2 files

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

2 files

0.1.1

1 file

0.1.0

1 file

0.0.11

1 file

0.0.10.post2

1 file

0.0.10.post1

1 file

0.0.10.post0

1 file

0.0.10

1 file

0.0.9.post0

1 file

0.0.9

1 file

0.0.8.post3

1 file

0.0.8.post2

1 file

0.0.8.post1

1 file

0.0.8.post0

1 file

0.0.8

1 file

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.2

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page