Skip to content

Commit 9121e9d

Browse files
committed
Update docs metadata
1 parent 4a1979a commit 9121e9d

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

docs-ref-services/latest/appconfiguration-provider-readme.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Azure App Configuration Python Provider client library for Python
33
keywords: Azure, python, SDK, API, azure-appconfiguration-provider, appconfiguration
4-
ms.date: 01/29/2024
4+
ms.date: 05/28/2024
55
ms.topic: reference
66
ms.devlang: python
77
ms.service: appconfiguration
88
---
9-
# Azure App Configuration Python Provider client library for Python - version 1.1.0
9+
# Azure App Configuration Python Provider client library for Python - version 1.2.0
1010

1111

1212
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely. This provider adds additional functionality above the azure-sdk-for-python.
@@ -51,6 +51,7 @@ Currently the Azure App Configuration Provider enables:
5151

5252
* Connecting to an App Configuration Store using a connection string or Azure Active Directory.
5353
* Selecting multiple sets of configurations using `SettingSelector`.
54+
* Loading Feature Flags
5455
* Dynamic Refresh
5556
* Trim prefixes off key names.
5657
* Resolving Key Vault References, requires AAD.
@@ -62,7 +63,6 @@ Currently the Azure App Configuration Provider enables:
6263
List of features we are going to add to the Python Provider in the future.
6364

6465
* Geo-Replication support
65-
* Feature Management
6666
* Configuration Placeholders
6767

6868
## Examples
@@ -177,6 +177,36 @@ key_vault_options = AzureAppConfigurationKeyVaultOptions(
177177
config = load(endpoint=endpoint, credential=DefaultAzureCredential(), key_vault_options=key_vault_options)
178178
```
179179

180+
## Loading Feature Flags
181+
182+
Feature Flags can be loaded from config stores using the provider. Feature flags are loaded as a dictionary of key/value pairs stored in the provider under the `feature_management`, then `feature_flags`.
183+
184+
```python
185+
config = load(endpoint=endpoint, credential=DefaultAzureCredential(), feature_flags_enabled=True)
186+
alpha = config["feature_management"]["feature_flags"]["Alpha"]
187+
print(alpha["enabled"])
188+
```
189+
190+
By default all feature flags with no label are loaded when `feature_flags_enabled` is set to `True`. . If you want to load feature flags with a specific label you can use `SettingSelector` to filter the feature flags.
191+
192+
```python
193+
from azure.appconfiguration.provider import load, SettingSelector
194+
195+
config = load(endpoint=endpoint, credential=DefaultAzureCredential(), feature_flags_enabled=True, feature_flag_selectors=[SettingSelector(key_filter="*", label_filter="dev")])
196+
alpha = config["feature_management"]["feature_flags"]["Alpha"]
197+
print(alpha["enabled"])
198+
```
199+
200+
To enable refresh for feature flags you need to enable refresh. This will allow the provider to refresh feature flags the same way it refreshes configurations. Unlike configurations, all loaded feature flags are monitored for changes and will cause a refresh. Refresh of configuration settings and feature flags are independent of each other. Both are trigged by the `refresh` method, but a feature flag changing will not cause a refresh of configurations and vice versa. Also, if refresh for configuration settings is not enabled, feature flags can still be enabled for refresh.
201+
202+
```python
203+
config = load(endpoint=endpoint, credential=DefaultAzureCredential(), feature_flags_enabled=True, feature_flag_refresh_enabled=True)
204+
205+
...
206+
207+
config.refresh()
208+
```
209+
180210
## Key concepts
181211

182212
## Troubleshooting
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "azure-appconfiguration-provider",
3-
"Version": "1.1.0",
3+
"Version": "1.2.0",
44
"DevVersion": null,
55
"DirectoryPath": "sdk/appconfiguration/azure-appconfiguration-provider",
66
"ServiceDirectory": "appconfiguration",
@@ -10,15 +10,15 @@
1010
"SdkType": "client",
1111
"IsNewSdk": true,
1212
"ArtifactName": "azure-appconfiguration-provider",
13-
"ReleaseStatus": "2024-01-29",
13+
"ReleaseStatus": "2024-05-24",
14+
"Namespaces": [
15+
"azure.appconfiguration.provider"
16+
],
1417
"DocsCiConfigProperties": {
1518
"extension_config": {
1619
"autodoc_default_options": {
1720
"inherited-members": 1
1821
}
1922
}
20-
},
21-
"Namespaces": [
22-
"azure.appconfiguration.provider"
23-
]
23+
}
2424
}

0 commit comments

Comments
 (0)