azure.appconfiguration.provider package

class azure.appconfiguration.provider.AzureAppConfigurationKeyVaultOptions(credential: TokenCredential = None, secret_clients: List[SecretClient] = None, secret_resolver: Callable = None)[source]

Options for connecting to Key Vault.

Parameters
  • credential (TokenCredential) – A credential for authenticating with the key vault. This is optional if secret_clients is provided.

  • secret_clients (list[SecretClient]) – A list of SecretClient from azure-keyvault-secrets. This is optional if credential is provided.

  • secret_resolver (callable) – A function that takes a URI and returns a value.

class azure.appconfiguration.provider.AzureAppConfigurationProvider[source]

Provides a dictionary-like interface to Azure App Configuration settings. Enables loading of sets of configuration settings from Azure App Configuration into a Python application. Enables trimming of prefixes from configuration keys. Enables resolution of Key Vault references in configuration settings.

copy()[source]

Returns a copy of the configuration settings

type: () -> dict

keys()[source]

Returns a list of keys loaded from Azure App Configuration.

type: () -> list

classmethod load(connection_string=None, endpoint=None, credential=None, **kwargs)[source]

Loads configuration settings from Azure App Configuration into a Python application.

Parameters
  • connection_string (str) – Connection string (one of connection_string or endpoint and credential must be set)

  • endpoint (str) – Endpoint (one of connection_string or endpoint and credential must be set)

  • credential (Union[AppConfigConnectionStringCredential, TokenCredential]) – Credential (one of connection_string or endpoint and credential must be set)

Keyword Arguments
  • selectors – List of setting selectors to filter configuration settings

  • trim_prefixes – List of prefixes to trim from configuration keys

  • key_vault_options – Options for resolving Key Vault references

values()[source]

Returns a list of values loaded from Azure App Configuration. Any values that are Key Vault references will be resolved.

type: () -> list

class azure.appconfiguration.provider.SettingSelector(key_filter: str, label_filter: str = '\x00')[source]

Selects a set of configuration settings from Azure App Configuration.

Parameters
  • key_filter (str) – A filter to select configuration settings based on their keys.

  • label_filter (str) – A filter to select configuration settings based on their labels. Default is value is ‘'