adlfs 2025.8.0


pip install adlfs

  Latest version

Released: Aug 30, 2025

Project Links

Meta
Maintainer: Greg Hayes
Requires Python: >=3.9

Classifiers

Intended Audience
  • Developers

License
  • OSI Approved :: BSD License

Operating System
  • OS Independent

Programming Language
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Filesystem interface to Azure-Datalake Gen1 and Gen2 Storage

PyPI version shields.io Latest conda-forge version

Quickstart

This package can be installed using:

pip install adlfs

or

conda install -c conda-forge adlfs

The adl:// and abfs:// protocols are included in fsspec's known_implementations registry in fsspec > 0.6.1, otherwise users must explicitly inform fsspec about the supported adlfs protocols.

To use the Gen1 filesystem:

import dask.dataframe as dd

storage_options={'tenant_id': TENANT_ID, 'client_id': CLIENT_ID, 'client_secret': CLIENT_SECRET}

dd.read_csv('adl://{STORE_NAME}/{FOLDER}/*.csv', storage_options=storage_options)

To use the 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.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 Datalake Gen1 and Azure Datalake Gen2, that facilitate interactions between both Azure Datalake implementations and Dask. This is done leveraging the intake/filesystem_spec base class and Azure Python SDKs.

Operations against both Gen1 Datalake currently only work with an Azure ServicePrincipal with suitable credentials to perform operations on the resources of choice.

Operations against the Gen2 Datalake are implemented by leveraging Azure Blob Storage Python SDK.

Setting credentials

The storage_options can be instantiated with a variety of keyword arguments depending on the filesystem. The most commonly used arguments are:

  • 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. The value to use for whether to attempt anonymous access if no other credential is passed. By default (None), the AZURE_STORAGE_ANON environment variable is checked. False values (false, 0, f) will resolve to False and anonymous access will not be attempted. Otherwise the value for anon resolves to True.
  • location_mode: valid values are "primary" or "secondary" and apply to RA-GRS accounts

For more argument details see all arguments for AzureBlobFileSystem here and AzureDatalakeFileSystem 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. 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 True.
  2. Auto credential solving using Azure's DefaultAzureCredential() library: storage_options={'account_name': ACCOUNT_NAME, 'anon': False} will use DefaultAzureCredential to get valid credentials to the container ACCOUNT_NAME. DefaultAzureCredential attempts to authenticate via the mechanisms and order visualized here.
  3. Auto credential solving without requiring storage_options: Set AZURE_STORAGE_ANON to false, resulting in automatic credential resolution. Useful for compatibility with fsspec.
  4. 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.

2025.8.0 Aug 30, 2025
2024.12.0 Dec 15, 2024
2024.7.0 Jul 22, 2024
2024.4.1 Apr 15, 2024
2024.4.0 Apr 13, 2024
2024.2.0 Feb 05, 2024
2024.1.0 Jan 29, 2024
2023.12.0 Dec 23, 2023
2023.10.0 Oct 17, 2023
2023.9.0 Sep 17, 2023
2023.8.0 Aug 08, 2023
2023.4.0 Apr 27, 2023
2023.1.0 Jan 17, 2023
2022.11.2 Nov 24, 2022
2022.11.1 Nov 24, 2022
2022.11.0 Nov 23, 2022
2022.10.0 Oct 03, 2022
2022.9.1 Sep 06, 2022
2022.9.0 Sep 06, 2022
2022.7.0 Jul 09, 2022
2022.4.0 Apr 15, 2022
2022.4.0a0 Apr 15, 2022
2022.2.0 Feb 05, 2022
2021.10.0 Oct 03, 2021
2021.9.1 Sep 10, 2021
2021.8.2 Aug 18, 2021
2021.8.1 Aug 13, 2021
2021.7.1 Jul 19, 2021
2021.7.0 Jul 12, 2021
0.7.7 Jun 14, 2021
0.7.6 Jun 09, 2021
0.7.5 May 11, 2021
0.7.4 Apr 26, 2021
0.7.3 Apr 15, 2021
0.7.2 Apr 12, 2021
0.7.1 Apr 09, 2021
0.7.0 Mar 31, 2021
0.6.3 Feb 16, 2021
0.6.2 Feb 12, 2021
0.6.1 Feb 09, 2021
0.6.0 Jan 15, 2021
0.5.9 Dec 19, 2020
0.5.8 Dec 09, 2020
0.5.7 Nov 19, 2020
0.5.5 Oct 06, 2020
0.5.4 Oct 04, 2020
0.5.3 Sep 15, 2020
0.5.2 Sep 15, 2020
0.5.1 Sep 10, 2020
0.5.0 Sep 07, 2020
0.4.0 Aug 20, 2020
0.3.3 Aug 13, 2020
0.3.2 Aug 02, 2020
0.3.1 Jun 15, 2020
0.3.0 May 19, 2020
0.2.5 May 19, 2020
0.2.4 Apr 21, 2020
0.2.3 Apr 21, 2020
0.2.2 Apr 20, 2020
0.2.0 Feb 15, 2020
0.1.5 Dec 17, 2019
0.1.4 Dec 16, 2019
0.1.3 Dec 15, 2019
0.1.3a0 Dec 16, 2019
0.1.2 Nov 25, 2019
0.1.1 Nov 14, 2019
0.1.0 Oct 20, 2019
0.0.11 Oct 15, 2019
0.0.10.post2 Oct 14, 2019
0.0.10.post1 Oct 14, 2019
0.0.10.post0 Oct 14, 2019
0.0.10 Oct 14, 2019
0.0.9.post0 Oct 09, 2019
0.0.9 Oct 09, 2019
0.0.8.post3 Oct 09, 2019
0.0.8.post2 Oct 09, 2019
0.0.8.post1 Oct 09, 2019
0.0.8.post0 Oct 09, 2019
0.0.8 Oct 09, 2019
0.0.8a0 Oct 09, 2019
0.0.7 Sep 23, 2019
0.0.6 Sep 19, 2019
0.0.5 Sep 11, 2019
0.0.5a0 Sep 18, 2019
0.0.2 Aug 11, 2019

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
azure-core (<2.0.0,>=1.28.0)
azure-datalake-store (<0.1,>=0.0.53)
azure-identity
azure-storage-blob (>=12.17.0)
fsspec (>=2023.12.0)
aiohttp (>=3.7.0)