daft.io.AzureConfig

daft.io.AzureConfig#

class daft.io.AzureConfig(storage_account=None, access_key=None, sas_token=None, tenant_id=None, client_id=None, client_secret=None, anonymous=None, endpoint_url=None, use_ssl=None)#

Create configurations to be used when accessing Azure Blob Storage. To authenticate with Microsoft Entra ID, tenant_id, client_id, and client_secret must be provided. If no credentials are provided, Daft will attempt to fetch credentials from the environment.

Parameters:
  • storage_account (str) – Azure Storage Account, defaults to reading from AZURE_STORAGE_ACCOUNT environment variable.

  • access_key (str, optional) – Azure Secret Access Key, defaults to reading from AZURE_STORAGE_KEY environment variable

  • sas_token (str, optional) – Shared Access Signature token, defaults to reading from AZURE_STORAGE_SAS_TOKEN environment variable

  • tenant_id (str, optional) – Azure Tenant ID

  • client_id (str, optional) – Azure Client ID

  • client_secret (str, optional) – Azure Client Secret

  • anonymous (bool, optional) – Whether or not to use “anonymous mode”, which will access Azure without any credentials

Example

>>> io_config = IOConfig(azure=AzureConfig(storage_account="dafttestdata", access_key="xxx"))
>>> daft.read_parquet("az://some-path", io_config=io_config)
__init__()#

Methods

__init__()

replace([storage_account, access_key, ...])

Attributes

access_key

Azure Secret Access Key

anonymous

Whether access is anonymous

client_id

client_secret

endpoint_url

Azure Secret Access Key

sas_token

storage_account

Storage Account to use when accessing Azure Storage

tenant_id

use_ssl

Whether SSL (HTTPS) is required