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
1. Create a new file named *app.py*inthe *QuoteOfTheDay* folder.
50
+
## Create the Quote of the Day app
51
51
52
-
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient timefor the permission to propagate before running your application.
52
+
1. Create a new file named *app.py*in the *QuoteOfTheDay* folder.
53
53
54
54
```python
55
-
import os
56
-
from azure.appconfiguration.provider import load
57
-
from featuremanagement import FeatureManager
58
-
from azure.identity import DefaultAzureCredential
59
55
from flask_bcrypt import Bcrypt
60
56
61
57
from flask_sqlalchemy import SQLAlchemy
@@ -66,22 +62,6 @@ In this tutorial, you use a variant feature flag to manage experiences for diffe
@@ -440,7 +412,68 @@ In this tutorial, you use a variant feature flag to manage experiences for diffe
440
412
}
441
413
```
442
414
443
-
### Build and run the app
415
+
## Use the variant feature flag
416
+
417
+
1. Install the latest versions of the following packages.
418
+
419
+
```bash
420
+
pip install azure-identity
421
+
pip install azure-appconfiguration-provider
422
+
pip install featuremanagement[AzureMonitor]
423
+
```
424
+
425
+
1. Open `app.py` to connect to App Configuration and set up feature management.
426
+
427
+
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient timefor the permission to propagate before running your application.
1. Set an environment variable. Set the environment variable named **AzureAppConfigurationEndpoint** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
0 commit comments