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
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/use-variant-feature-flags-python.md
+81-1Lines changed: 81 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,9 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
67
67
68
68
1. Create a new file named *app.py*in the *QuoteOfTheDay* folder.
69
69
70
+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
71
+
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.
72
+
70
73
```python
71
74
import os
72
75
from azure.appconfiguration.provider import load
@@ -125,7 +128,62 @@ In this example, you create a Python Flask web app named _Quote of the Day_. Whe
125
128
from . import routes
126
129
app.register_blueprint(routes.bp)
127
130
```
128
-
131
+
### [Connection string](#tab/connection-string)
132
+
```python
133
+
import os
134
+
from azure.appconfiguration.provider import load
135
+
from featuremanagement import FeatureManager
136
+
from featuremanagement.azuremonitor import publish_telemetry
137
+
from opentelemetry import trace
138
+
from opentelemetry.trace import get_tracer_provider
Set the environment variable named **ConnectionString** to the read-only connection string of your App Configuration store found under *Access keys* of your store in the Azure portal.
602
+
603
+
If you use the Windows command prompt, run the following command and restart the command prompt to allow the change to take effect:
0 commit comments