Use the create_tdapi_context method to create a TDAPI context to be used to run TDApiClient functions.
Required Arguments:
- type: Specifies the cloud type of the TDAPI context.
If the cloud type is Azure, the only accepted value is "azure".
- datastore_path: Specifies path in Azure datastore.
Optional Argument:
- datastore_name: Specifies the name of Azure datastore.
If not provided, default datastore in Azure workspace is used.
Environment Variables
Create the following environment variables before using the module.
- Required environment variables:
- AZURE_TENANT_ID: Specifies Azure tenant ID.
- AZURE_CLIENT_ID: Specifies Azure client ID.
- AZURE_CLIENT_SECRET: Specifies Azure client key.
- AZURE_SUB_ID: Specifies Azure subscription ID.
- AZURE_RG: Specifies Azure resource group.
- AZURE_WS: Specifies Azure workspace.
- AZURE_REGION: Specifies Azure region.
Example
This example creates Azure Machine Learning context using "model_data" as parent folder in default datastore.
from tdapiclient import create_tdapi_context, TDApiClient
create_tdapi_context("azure", datastore_path="model_data")