Microsoft Azure¶
obstore.store.AzureStore ¶
Configure a connection to Microsoft Azure Blob Storage container using the specified credentials.
__init__ ¶
__init__(
container: str,
*,
config: AzureConfig | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[AzureConfig],
) -> None
Construct a new AzureStore.
Parameters:
-
container
(str
) –description
Other Parameters:
-
config
(AzureConfig | None
) –Azure Configuration. Values in this config will override values inferred from the url. Defaults to None.
-
client_options
(ClientConfig | None
) –HTTP Client options. Defaults to None.
-
retry_config
(RetryConfig | None
) –Retry configuration. Defaults to None.
Returns:
-
None
–AzureStore
from_env
classmethod
¶
from_env(
container: str,
*,
config: AzureConfig | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[AzureConfig],
) -> AzureStore
Construct a new AzureStore with values pre-populated from environment variables.
Variables extracted from environment:
AZURE_STORAGE_ACCOUNT_NAME
: storage account nameAZURE_STORAGE_ACCOUNT_KEY
: storage account master keyAZURE_STORAGE_ACCESS_KEY
: alias forAZURE_STORAGE_ACCOUNT_KEY
AZURE_STORAGE_CLIENT_ID
-> client id for service principal authorizationAZURE_STORAGE_CLIENT_SECRET
-> client secret for service principal authorizationAZURE_STORAGE_TENANT_ID
-> tenant id used in oauth flows
Parameters:
-
container
(str
) –description
Other Parameters:
-
config
(AzureConfig | None
) –Azure Configuration. Values in this config will override values inferred from the url. Defaults to None.
-
client_options
(ClientConfig | None
) –HTTP Client options. Defaults to None.
-
retry_config
(RetryConfig | None
) –Retry configuration. Defaults to None.
Returns:
-
AzureStore
–AzureStore
from_url
classmethod
¶
from_url(
url: str,
*,
config: AzureConfig | None = None,
client_options: ClientConfig | None = None,
retry_config: RetryConfig | None = None,
**kwargs: Unpack[AzureConfig],
) -> AzureStore
Construct a new AzureStore with values populated from a well-known storage URL.
The supported url schemes are:
abfs[s]://<container>/<path>
(according to fsspec)abfs[s]://<file_system>@<account_name>.dfs.core.windows.net/<path>
abfs[s]://<file_system>@<account_name>.dfs.fabric.microsoft.com/<path>
az://<container>/<path>
(according to fsspec)adl://<container>/<path>
(according to fsspec)azure://<container>/<path>
(custom)https://<account>.dfs.core.windows.net
https://<account>.blob.core.windows.net
https://<account>.blob.core.windows.net/<container>
https://<account>.dfs.fabric.microsoft.com
https://<account>.dfs.fabric.microsoft.com/<container>
https://<account>.blob.fabric.microsoft.com
https://<account>.blob.fabric.microsoft.com/<container>
Note
Note that from_url
will not use any additional parts of the path as a
bucket prefix. It will only extract the container name, account name, and
whether it's a fabric endpoint. If you wish to use a path prefix, consider
wrapping this with PrefixStore
.
Parameters:
-
url
(str
) –well-known storage URL.
Other Parameters:
-
config
(AzureConfig | None
) –Azure Configuration. Values in this config will override values inferred from the url. Defaults to None.
-
client_options
(ClientConfig | None
) –HTTP Client options. Defaults to None.
-
retry_config
(RetryConfig | None
) –Retry configuration. Defaults to None.
Returns:
-
AzureStore
–AzureStore
obstore.store.AzureConfig ¶
Bases: TypedDict
Configuration parameters for AzureStore.
There are duplicates of many parameters, and parameters can be either upper or lower case. Not all parameters are required.
AZURE_CLIENT_ID
instance-attribute
¶
AZURE_CLIENT_ID: str
Service principal client id for authorizing requests
AZURE_CLIENT_SECRET
instance-attribute
¶
AZURE_CLIENT_SECRET: str
Service principal client secret for authorizing requests
AZURE_ENDPOINT
instance-attribute
¶
AZURE_ENDPOINT: str
Override the endpoint used to communicate with blob storage
AZURE_FEDERATED_TOKEN_FILE
instance-attribute
¶
AZURE_FEDERATED_TOKEN_FILE: str
File containing token for Azure AD workload identity federation
AZURE_IDENTITY_ENDPOINT
instance-attribute
¶
AZURE_IDENTITY_ENDPOINT: str
Endpoint to request a imds managed identity token
AZURE_MSI_ENDPOINT
instance-attribute
¶
AZURE_MSI_ENDPOINT: str
Endpoint to request a imds managed identity token
AZURE_MSI_RESOURCE_ID
instance-attribute
¶
AZURE_MSI_RESOURCE_ID: str
Msi resource id for use with managed identity authentication
AZURE_OBJECT_ID
instance-attribute
¶
AZURE_OBJECT_ID: str
Object id for use with managed identity authentication
AZURE_STORAGE_ACCESS_KEY
instance-attribute
¶
AZURE_STORAGE_ACCESS_KEY: str
Master key for accessing storage account
AZURE_STORAGE_ACCOUNT_KEY
instance-attribute
¶
AZURE_STORAGE_ACCOUNT_KEY: str
Master key for accessing storage account
AZURE_STORAGE_ACCOUNT_NAME
instance-attribute
¶
AZURE_STORAGE_ACCOUNT_NAME: str
The name of the azure storage account
AZURE_STORAGE_AUTHORITY_ID
instance-attribute
¶
AZURE_STORAGE_AUTHORITY_ID: str
Tenant id used in oauth flows
AZURE_STORAGE_CLIENT_ID
instance-attribute
¶
AZURE_STORAGE_CLIENT_ID: str
Service principal client id for authorizing requests
AZURE_STORAGE_CLIENT_SECRET
instance-attribute
¶
AZURE_STORAGE_CLIENT_SECRET: str
Service principal client secret for authorizing requests
AZURE_STORAGE_ENDPOINT
instance-attribute
¶
AZURE_STORAGE_ENDPOINT: str
Override the endpoint used to communicate with blob storage
AZURE_STORAGE_MASTER_KEY
instance-attribute
¶
AZURE_STORAGE_MASTER_KEY: str
Master key for accessing storage account
AZURE_STORAGE_SAS_KEY
instance-attribute
¶
AZURE_STORAGE_SAS_KEY: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
AZURE_STORAGE_SAS_TOKEN
instance-attribute
¶
AZURE_STORAGE_SAS_TOKEN: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
AZURE_STORAGE_TENANT_ID
instance-attribute
¶
AZURE_STORAGE_TENANT_ID: str
Tenant id used in oauth flows
AZURE_STORAGE_USE_EMULATOR
instance-attribute
¶
AZURE_STORAGE_USE_EMULATOR: bool
Use object store with azurite storage emulator
AZURE_USE_AZURE_CLI
instance-attribute
¶
AZURE_USE_AZURE_CLI: bool
Use azure cli for acquiring access token
AZURE_USE_FABRIC_ENDPOINT
instance-attribute
¶
AZURE_USE_FABRIC_ENDPOINT: bool
Use object store with url scheme account.dfs.fabric.microsoft.com
CLIENT_SECRET
instance-attribute
¶
CLIENT_SECRET: str
Service principal client secret for authorizing requests
ENDPOINT
instance-attribute
¶
ENDPOINT: str
Override the endpoint used to communicate with blob storage
FEDERATED_TOKEN_FILE
instance-attribute
¶
FEDERATED_TOKEN_FILE: str
File containing token for Azure AD workload identity federation
IDENTITY_ENDPOINT
instance-attribute
¶
IDENTITY_ENDPOINT: str
Endpoint to request a imds managed identity token
MSI_ENDPOINT
instance-attribute
¶
MSI_ENDPOINT: str
Endpoint to request a imds managed identity token
MSI_RESOURCE_ID
instance-attribute
¶
MSI_RESOURCE_ID: str
Msi resource id for use with managed identity authentication
OBJECT_ID
instance-attribute
¶
OBJECT_ID: str
Object id for use with managed identity authentication
SAS_KEY
instance-attribute
¶
SAS_KEY: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
SAS_TOKEN
instance-attribute
¶
SAS_TOKEN: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
USE_FABRIC_ENDPOINT
instance-attribute
¶
USE_FABRIC_ENDPOINT: bool
Use object store with url scheme account.dfs.fabric.microsoft.com
azure_client_id
instance-attribute
¶
azure_client_id: str
Service principal client id for authorizing requests
azure_client_secret
instance-attribute
¶
azure_client_secret: str
Service principal client secret for authorizing requests
azure_endpoint
instance-attribute
¶
azure_endpoint: str
Override the endpoint used to communicate with blob storage
azure_federated_token_file
instance-attribute
¶
azure_federated_token_file: str
File containing token for Azure AD workload identity federation
azure_identity_endpoint
instance-attribute
¶
azure_identity_endpoint: str
Endpoint to request a imds managed identity token
azure_msi_endpoint
instance-attribute
¶
azure_msi_endpoint: str
Endpoint to request a imds managed identity token
azure_msi_resource_id
instance-attribute
¶
azure_msi_resource_id: str
Msi resource id for use with managed identity authentication
azure_object_id
instance-attribute
¶
azure_object_id: str
Object id for use with managed identity authentication
azure_storage_access_key
instance-attribute
¶
azure_storage_access_key: str
Master key for accessing storage account
azure_storage_account_key
instance-attribute
¶
azure_storage_account_key: str
Master key for accessing storage account
azure_storage_account_name
instance-attribute
¶
azure_storage_account_name: str
The name of the azure storage account
azure_storage_authority_id
instance-attribute
¶
azure_storage_authority_id: str
Tenant id used in oauth flows
azure_storage_client_id
instance-attribute
¶
azure_storage_client_id: str
Service principal client id for authorizing requests
azure_storage_client_secret
instance-attribute
¶
azure_storage_client_secret: str
Service principal client secret for authorizing requests
azure_storage_endpoint
instance-attribute
¶
azure_storage_endpoint: str
Override the endpoint used to communicate with blob storage
azure_storage_master_key
instance-attribute
¶
azure_storage_master_key: str
Master key for accessing storage account
azure_storage_sas_key
instance-attribute
¶
azure_storage_sas_key: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
azure_storage_sas_token
instance-attribute
¶
azure_storage_sas_token: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.
azure_storage_tenant_id
instance-attribute
¶
azure_storage_tenant_id: str
Tenant id used in oauth flows
azure_storage_use_emulator
instance-attribute
¶
azure_storage_use_emulator: bool
Use object store with azurite storage emulator
azure_use_azure_cli
instance-attribute
¶
azure_use_azure_cli: bool
Use azure cli for acquiring access token
azure_use_fabric_endpoint
instance-attribute
¶
azure_use_fabric_endpoint: bool
Use object store with url scheme account.dfs.fabric.microsoft.com
client_secret
instance-attribute
¶
client_secret: str
Service principal client secret for authorizing requests
endpoint
instance-attribute
¶
endpoint: str
Override the endpoint used to communicate with blob storage
federated_token_file
instance-attribute
¶
federated_token_file: str
File containing token for Azure AD workload identity federation
identity_endpoint
instance-attribute
¶
identity_endpoint: str
Endpoint to request a imds managed identity token
msi_endpoint
instance-attribute
¶
msi_endpoint: str
Endpoint to request a imds managed identity token
msi_resource_id
instance-attribute
¶
msi_resource_id: str
Msi resource id for use with managed identity authentication
object_id
instance-attribute
¶
object_id: str
Object id for use with managed identity authentication
sas_key
instance-attribute
¶
sas_key: str
Shared access signature.
The signature is expected to be percent-encoded, much
like they are provided in
the azure storage explorer or azure portal.