endpoint#

Helper functions for constructing Azure endpoint URLs.

Functions#

_construct_https_url(→ str)

Construct a simple https URL via

construct_batch_endpoint(→ str)

Construct an Azure Batch endpoint URL from

construct_azure_container_registry_endpoint(→ str)

Construct an Azure container registry endpoint URL

construct_blob_account_endpoint(→ str)

Construct an Azure blob storage account endpoint URL.

construct_blob_container_endpoint(→ str)

Construct an endpoint URL for a blob storage container

Module Contents#

_construct_https_url(netloc: str, path: str = '') str#

Construct a simple https URL via urllib.parse.urlunparse().

Parameters#

netloc

netloc value for urlunparse() (subdomains and domain).

path

path value for urlunparse() (path after the domain).

Returns#

str

The URL, as a string.

construct_batch_endpoint(batch_account: str, batch_location: str, batch_endpoint_subdomain: str = d.default_azure_batch_endpoint_subdomain) str#

Construct an Azure Batch endpoint URL from the account name, location, and subdomain.

Parameters#

batch_account

Name of the Azure batch account.

batch_location

Location of the Azure batch servers, e.g. "eastus".

batch_endpoint_subdomain

Azure batch endpoint subdomains and domains that follow the account and location, e.g. "batch.azure.com/", the default.

Returns#

str

The endpoint URL.

construct_azure_container_registry_endpoint(azure_container_registry_account: str, azure_container_registry_domain: str = d.default_azure_container_registry_domain) str#

Construct an Azure container registry endpoint URL from the account name, location, and subdomain.

Parameters#

azure_container_registry_account

Name of the Azure container registry account.

azure_container_registry_domain

Domain for the Azure container registry. Typically "azurecr.io", the default.

Returns#

str

The registry endpoint URL.

construct_blob_account_endpoint(blob_account: str, blob_endpoint_subdomain: str = d.default_azure_blob_storage_endpoint_subdomain) str#

Construct an Azure blob storage account endpoint URL.

Parameters#

blob_account

Name of the Azure blob storage account.

blob_endpoint_subdomain

Azure batch endpoint subdomains and domains that follow the account, e.g. "blob.core.windows.net/", the default.

Returns#

str

The endpoint URL.

construct_blob_container_endpoint(blob_container: str, blob_account: str, blob_endpoint_subdomain: str = d.default_azure_blob_storage_endpoint_subdomain) str#

Construct an endpoint URL for a blob storage container from the container name, account name, and endpoint subdomain.

Parameters#

blob_container

Name of the blob storage container.

blob_account

Name of the Azure blob storage account.

blob_endpoint_subdomain

Azure Blob endpoint subdomains and domains that follow the account name, e.g. "blob.core.windows.net/", the default.

Returns#

str

The endpoint URL.