Azure Data Lake Store Filesystem Client Library
raw JSON → 1.0.1 verified Tue May 12 auth: no python install: verified
The `azure-datalake-store` library provides a pure-Python interface for Azure Data Lake Storage Gen 1, offering Pythonic file-system and file objects with capabilities for high-performance uploading and downloading. It is currently at version 1.0.1, having recently transitioned from a series of `0.0.x` pre-releases to a `1.0.x` stable branch. The project is under active development, but the official documentation notes it is 'not yet recommended for general use'. This library specifically supports ADLS Gen 1; for ADLS Gen 2, users should refer to `azure-storage-file-datalake`.
pip install azure-datalake-store Common errors
error ModuleNotFoundError: No module named 'azure.datalake.store' ↓
cause The 'azure-datalake-store' package is not installed or not accessible in the current environment.
fix
Install the package using 'pip install azure-datalake-store'.
error ModuleNotFoundError: No module named 'azure' ↓
cause The 'azure' namespace package is missing, possibly due to incomplete installation of Azure-related packages.
fix
Ensure that the 'azure' package is installed by running 'pip install azure'.
error ImportError: cannot import name 'core' from 'azure.datalake.store' ↓
cause The 'core' module is not found within the 'azure.datalake.store' package, possibly due to an outdated or incorrect installation.
fix
Verify the installation of 'azure-datalake-store' and reinstall it if necessary using 'pip install --upgrade azure-datalake-store'.
error DatalakeRESTException: Data-lake REST exception: LISTSTATUS ↓
cause An error occurred while attempting to list the contents of a directory in Azure Data Lake Store, possibly due to incorrect credentials or insufficient permissions.
fix
Check the authentication credentials and ensure the account has the necessary permissions to access the specified directory.
error ModuleNotFoundError: No module named 'azure.datalake' ↓
cause The Python environment cannot find the 'azure.datalake' module, often due to incorrect installation, an inactive virtual environment, or an outdated package structure.
fix
Ensure the
azure-datalake-store package is correctly installed using pip install azure-datalake-store and that your Python environment (e.g., virtual environment) is activated and configured correctly. For some older setups, it might also be pip install azure if other Azure SDK components are missing, but for this specific library, azure-datalake-store is the direct dependency. Warnings
breaking This library is exclusively for **Azure Data Lake Storage Gen 1**. For Azure Data Lake Storage Gen 2, which is the current generation, you **must** use the `azure-storage-file-datalake` library. Using `azure-datalake-store` for Gen 2 will result in compatibility issues. ↓
fix For ADLS Gen 2, install `azure-storage-file-datalake` (`pip install azure-storage-file-datalake`) and migrate your code to use its APIs (e.g., `DataLakeServiceClient`).
gotcha The official documentation states that this 'software is under active development and not yet recommended for general use'. This suggests it may not be suitable for critical production workloads or that its APIs could still undergo significant changes. ↓
fix Evaluate your use case carefully. For production systems, consider the stability implications or explore alternatives like ADLS Gen 2 with `azure-storage-file-datalake`.
breaking Authentication mechanisms changed significantly from `0.x` to `1.0.x`. Older versions used ADAL and custom authentication. Version `1.0.0-alpha0` and `1.0.1` shifted to 'generic azure token credential for auth instead of custom lib.auth' and removed ADAL support, replacing it with MSAL internally within `lib.auth`. ↓
fix Update your authentication code. While `lib.auth` still exists, ensure your credentials (tenant ID, username, password) are compatible with the new underlying MSAL-based token acquisition or consider using `azure-identity` for direct token management.
breaking In version `1.0.1`, the `concat` operation was removed from multi-part uploads, and large files are now uploaded in a single chunk. This changes the behavior for handling very large files. ↓
fix Review any code relying on multi-part upload concatenation. No direct fix is provided in the release notes, implying the library now handles large files differently internally, which might impact custom upload logic or performance expectations.
deprecated All `0.0.x` versions were explicitly labeled as 'pre-release or preview version' with a warning that there 'will be fairly rapid development and bug fixing, which might result in breaking changes from release to release.' Upgrading directly from `0.0.x` to `1.0.x` will likely involve significant breaking changes. ↓
fix Avoid using `0.0.x` versions for new development. For existing `0.0.x` deployments, plan for a thorough migration and testing period when upgrading to `1.0.x` or later, as many aspects of the API and behavior may have changed.
breaking Version `1.0.0-alpha0` and `1.0.1` removed support for older Python versions. The specific versions removed are not detailed in the release notes, but users on older Python environments should verify compatibility. ↓
fix Upgrade your Python environment to a currently supported version (e.g., Python 3.8+). Check the project's `setup.py` or latest documentation for explicit Python version requirements.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) wheel - 0.69s 23.0M
3.10 alpine (musl) - - 0.66s 23.0M
3.10 slim (glibc) wheel 2.4s 0.48s 23M
3.10 slim (glibc) - - 0.46s 23M
3.11 alpine (musl) wheel - 0.80s 25.4M
3.11 alpine (musl) - - 0.86s 25.4M
3.11 slim (glibc) wheel 2.5s 0.72s 26M
3.11 slim (glibc) - - 0.65s 26M
3.12 alpine (musl) wheel - 0.74s 17.2M
3.12 alpine (musl) - - 0.76s 17.1M
3.12 slim (glibc) wheel 2.2s 0.75s 18M
3.12 slim (glibc) - - 0.76s 18M
3.13 alpine (musl) wheel - 0.78s 16.9M
3.13 alpine (musl) - - 0.74s 16.8M
3.13 slim (glibc) wheel 2.2s 0.72s 17M
3.13 slim (glibc) - - 0.76s 17M
3.9 alpine (musl) wheel - 0.58s 23.0M
3.9 alpine (musl) - - 0.57s 23.0M
3.9 slim (glibc) wheel 2.9s 0.57s 23M
3.9 slim (glibc) - - 0.48s 24M
Imports
- AzureDLFileSystem wrong
from azure.datalake.store.core import AzureDLFileSystem # Direct import is fine, but common pattern is through 'core'correctfrom azure.datalake.store import core adl_fs = core.AzureDLFileSystem(...) - lib.auth
from azure.datalake.store import lib token = lib.auth(tenant_id, username, password)
Quickstart last tested: 2026-04-24
import os
from azure.datalake.store import core
# Set these environment variables for authentication
# Ensure AZURE_TENANT_ID, AZURE_USERNAME, AZURE_PASSWORD, AZURE_STORE_NAME are set
# For testing, use placeholder values if not connecting to a real ADLS Gen1
tenant_id = os.environ.get('AZURE_TENANT_ID', 'YOUR_TENANT_ID')
username = os.environ.get('AZURE_USERNAME', 'YOUR_USERNAME')
password = os.environ.get('AZURE_PASSWORD', 'YOUR_PASSWORD')
store_name = os.environ.get('AZURE_STORE_NAME', 'youradlstorename')
try:
# Authenticate (lib.auth now uses generic Azure token credentials internally)
token = core.lib.auth(tenant_id, username, password)
# Initialize the Data Lake Store filesystem client
adl = core.AzureDLFileSystem(store_name, token=token)
# Example: List contents of the root directory
print(f"Listing contents of / in {store_name}:")
items = adl.ls('/', detail=True)
if items:
for item in items:
print(item)
else:
print("Directory is empty or path does not exist.")
# Example: Create a directory and a file
test_dir = 'mytestdir'
test_file = f'{test_dir}/testfile.txt'
if not adl.exists(test_dir):
adl.mkdir(test_dir)
print(f"Created directory: {test_dir}")
with adl.open(test_file, 'wb') as f:
f.write(b"Hello from Azure Data Lake Store Gen1!")
print(f"Created and wrote to file: {test_file}")
# Example: Read the file
with adl.open(test_file, 'rb') as f:
content = f.read()
print(f"Content of {test_file}: {content.decode('utf-8')}")
# Example: Delete the file and directory
adl.rm(test_file)
print(f"Deleted file: {test_file}")
adl.rmdir(test_dir)
print(f"Deleted directory: {test_dir}")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure environment variables for ADLS Gen1 authentication (AZURE_TENANT_ID, AZURE_USERNAME, AZURE_PASSWORD, AZURE_STORE_NAME) are correctly set, or replace placeholders.")