You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Connecting to Azure App Configuration using a connection string
55
+
# Connecting to Azure App Configuration using an endpoint
56
+
# credential is used to authenticate the client, the InteractiveBrowserCredential is used for this sample. It will open a browser window to authenticate the user. For all credential options see [credential classes](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credential-classes).
55
57
# feature_flag_enabled makes it so that the provider will load feature flags from Azure App Configuration
56
58
# feature_flag_refresh_enabled makes it so that the provider will refresh feature flags from Azure App Configuration, when the refresh operation is triggered
@@ -68,14 +70,14 @@ Add a feature flag called *Beta* to the App Configuration store and leave **Labe
68
70
print("Beta is ", feature_manager.is_enabled("Beta"))
69
71
```
70
72
71
-
1. Set an environment variable named **APP_CONFIGURATION_CONNECTION_STRING**, and set it to the connection string to your App Configuration store. At the command line, run the following command and restart the command prompt to allow the change to take effect:
73
+
1. Set an environment variable named **APP_CONFIGURATION_ENDPOINT**, and set it to the connection string to your App Configuration store. At the command line, run the following command and restart the command prompt to allow the change to take effect:
Restart the command prompt to allow the change to take effect. Validate that it's set properly by printing the value of the environment variable.
@@ -130,7 +132,7 @@ Add a feature flag called *Beta* to the App Configuration store and leave **Labe
130
132
131
133
## Web applications
132
134
133
-
The following example shows how to update an existing web application, using Azure App Configuration with dynamic refresh to also use feature flags. See [Python Dynamic Configuration](./enable-dynamic-configuration-python.md) for a more detailed example of how to use dynamic refresh for configuration values.
135
+
The following example shows how to update an existing web application, using Azure App Configuration with dynamic refresh to also use feature flags. See [Python Dynamic Configuration](./enable-dynamic-configuration-python.md) for a more detailed example of how to use dynamic refresh for configuration values. Before continuing, make sure you have the Beta feature flag enabled in your App Configuration store.
134
136
135
137
### [Flask](#tab/flask)
136
138
@@ -142,6 +144,10 @@ from featuremanagement import FeatureManager
142
144
...
143
145
144
146
global azure_app_config, feature_manager
147
+
# Connecting to Azure App Configuration using an endpoint
148
+
# credential is used to authenticate the client, the InteractiveBrowserCredential is used for this sample. It will open a browser window to authenticate the user. For all credential options see [credential classes](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credential-classes).
149
+
# feature_flag_enabled makes it so that the provider will load feature flags from Azure App Configuration
150
+
# feature_flag_refresh_enabled makes it so that the provider will refresh feature flags from Azure App Configuration, when the refresh operation is triggered
@@ -179,6 +185,8 @@ Update your template `index.html` to use the new feature flags.
179
185
</body>
180
186
```
181
187
188
+
Once you have updated and run your application, you can see the feature flag in action, where the `Beta is enabled` message will appear on the page, but only if the feature flag is enabled in the App Configuration store.
189
+
182
190
> [!div class="mx-imgBorder"]
183
191
> 
184
192
@@ -192,7 +200,10 @@ Set up Azure App Configuration in your Django settings file, `settings.py` to lo
192
200
from featuremanagement import FeatureManager
193
201
194
202
...
195
-
203
+
# Connecting to Azure App Configuration using an endpoint
204
+
# credential is used to authenticate the client, the InteractiveBrowserCredential is used for this sample. It will open a browser window to authenticate the user. For all credential options see [credential classes](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credential-classes).
205
+
# feature_flag_enabled makes it so that the provider will load feature flags from Azure App Configuration
206
+
# feature_flag_refresh_enabled makes it so that the provider will refresh feature flags from Azure App Configuration, when the refresh operation is triggered
@@ -232,6 +243,8 @@ Update your template `index.html` to use the new configuration values.
232
243
</body>
233
244
```
234
245
246
+
Once you have updated and run your application, you can see the feature flag in action, where the `Beta is enabled` message will appear on the page, but only if the feature flag is enabled in the App Configuration store.
247
+
235
248
> [!div class="mx-imgBorder"]
236
249
> 
0 commit comments