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/quickstart-python-provider.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,21 +171,26 @@ Add the following key-values to the App Configuration store. For more informatio
171
171
message found: True
172
172
test.message found: False
173
173
```
174
+
174
175
## Web app usage
176
+
175
177
You can use Azure App Configuration in your existing python Web Apps by adding the following lines of code into your `settings.py` (For Django) or `app.py` (for Flask) files.
To update individual configuration settings in the Django `settings.py` file, you can reference them from the provider object. e.g.,
184
188
```python
185
189
MESSAGE= config.get("message")
186
190
```
187
191
188
192
### Configuration settings in Flask
193
+
189
194
You can update the in-built configuration object in Flask by passing your App Configuration Provider object to the `update` function of your flask app instance in `app.py`:
190
195
```python
191
196
#NOTE: This will override all existing configuration settings with the same key name.
@@ -195,7 +200,6 @@ app.update(config)
195
200
json_value = app.config.get("my_json")
196
201
```
197
202
198
-
199
203
Full code samples on how Azure App Configuration is used in python web apps can be found in the [Azure App Configuration Python Samples](https://github.com/Azure/AppConfiguration/tree/main/examples/Python) repo.
0 commit comments