daft.io.AzureConfig#
- class AzureConfig(storage_account=None, access_key=None, sas_token=None, bearer_token=None, tenant_id=None, client_id=None, client_secret=None, use_fabric_endpoint=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
, andclient_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 variablesas_token (str, optional) – Shared Access Signature token, defaults to reading from
AZURE_STORAGE_SAS_TOKEN
environment variablebearer_token (str, optional) – Bearer Token, defaults to reading from
AZURE_STORAGE_TOKEN
environment variabletenant_id (str, optional) – Azure Tenant ID
client_id (str, optional) – Azure Client ID
client_secret (str, optional) – Azure Client Secret
use_fabric_endpoint (bool, optional) – Whether to use Microsoft Fabric, you may want to set this if your URLs are from “fabric.microsoft.com”. Defaults to false
anonymous (bool, optional) – Whether or not to use “anonymous mode”, which will access Azure without any credentials
endpoint_url (str, optional) – Custom URL to the Azure endpoint, e.g.
https://my-account-name.blob.core.windows.net
. Overridesuse_fabric_endpoint
if setuse_ssl (bool, optional) – Whether or not to use SSL, which require accessing Azure over HTTPS rather than HTTP, defaults to True
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
bearer_token
Azure Bearer Token
client_id
client_secret
endpoint_url
Azure Secret Access Key
sas_token
Azure Shared Access Signature token
storage_account
Storage Account to use when accessing Azure Storage
tenant_id
use_fabric_endpoint
Whether to use Microsoft Fabric
use_ssl
Whether SSL (HTTPS) is required