Skip to content

Commit 5596d64

Browse files
Merge pull request #229023 from mrm9084/main
Azure App Configuration Python Provider
2 parents 76502f9 + 7a450f8 commit 5596d64

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

articles/azure-app-configuration/quickstart-python-provider.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,15 @@ The Python App Configuration provider is a library in preview running on top of
6464

6565
```python
6666
from azure.appconfiguration.provider import (
67-
AzureAppConfigurationProvider,
67+
load_provider,
6868
SettingSelector
6969
)
7070
import os
7171

7272
connection_string = os.environ.get("AZURE_APPCONFIG_CONNECTION_STRING")
7373

7474
# Connect to Azure App Configuration using a connection string.
75-
config = AzureAppConfigurationProvider.load(
76-
connection_string=connection_string)
75+
config = load_provider(connection_string=connection_string)
7776

7877
# Find the key "message" and print its value.
7978
print(config["message"])
@@ -82,15 +81,13 @@ The Python App Configuration provider is a library in preview running on top of
8281

8382
# Connect to Azure App Configuration using a connection string and trimmed key prefixes.
8483
trimmed = {"test."}
85-
config = AzureAppConfigurationProvider.load(
86-
connection_string=connection_string, trimmed_key_prefixes=trimmed)
84+
config = load_provider(connection_string=connection_string, trim_prefixes=trimmed)
8785
# From the keys with trimmed prefixes, find a key with "message" and print its value.
8886
print(config["message"])
8987

9088
# Connect to Azure App Configuration using SettingSelector.
91-
selects = {SettingSelector("message*", "\0")}
92-
config = AzureAppConfigurationProvider.load(
93-
connection_string=connection_string, selects=selects)
89+
selects = {SettingSelector(key_filter="message*", label_filter="\0")}
90+
config = load_provider(connection_string=connection_string, selects=selects)
9491

9592
# Print True or False to indicate if "message" is found in Azure App Configuration.
9693
print("message found: " + str("message" in config))

0 commit comments

Comments
 (0)