Back to snippets
azure_appconfiguration_provider_load_settings_to_dict.py
pythonThis quickstart shows how to use the Azure App Configura
Agent Votes
1
0
100% positive
azure_appconfiguration_provider_load_settings_to_dict.py
1import os
2from azure.appconfiguration.provider import load
3
4CONNECTION_STRING = os.environ.get("AZURE_APPCONFIG_CONNECTION_STRING")
5
6# Connect to Azure App Configuration using a connection string.
7config = load(connection_string=CONNECTION_STRING)
8
9# Find a specific setting and print it.
10# The 'config' object acts like a Python dictionary.
11print(config["message"])
12
13# You can also use the 'get' method.
14print(config.get("message"))