Skip to content

Commit 390841a

Browse files
committed
Update quickstart-python-provider.md
1 parent 2cf11c0 commit 390841a

File tree

1 file changed

+25
-49
lines changed

1 file changed

+25
-49
lines changed

articles/azure-app-configuration/quickstart-python-provider.md

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: Quickstart for using Azure App Configuration with Python apps | Microsoft Learn
33
description: In this quickstart, create a Python app with the Azure App Configuration to centralize storage and management of application settings separate from your code.
44
services: azure-app-configuration
5-
author: maud-lv
5+
author: mrm9084
66
ms.service: azure-app-configuration
77
ms.devlang: python
88
ms.topic: quickstart
99
ms.custom: devx-track-python, mode-other, engagement-fy23
10-
ms.date: 11/20/2023
11-
ms.author: malev
10+
ms.date: 12/03/2024
11+
ms.author: mametcal
1212
#Customer intent: As a Python developer, I want to manage all my app settings in one place.
1313
---
1414
# Quickstart: Create a Python app with Azure App Configuration
@@ -126,76 +126,52 @@ In this section, you will create a console application and load data from your A
126126
print("message found: " + str("message" in config))
127127
print("test.message found: " + str("test.message" in config))
128128
```
129+
---
129130

130131
### Run the application
131132

132-
1. Set an environment variable named **AZURE_APPCONFIG_CONNECTION_STRING**, and set it to the connection string of your App Configuration store. At the command line, run the following command:
133-
134-
#### [Windows command prompt](#tab/windowscommandprompt)
133+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
134+
Set the environment variable named **AZURE_APPCONFIG_ENDPOINT** to the endpoint of your App Configuration store found under the *Overview* of your store in the Azure portal.
135135

136-
To run the app locally using the Windows command prompt, run the following command and replace `<app-configuration-store-connection-string>` with the connection string of your app configuration store:
136+
If you use the Windows command prompt, run the following command and restart the command prompt to allow the change to take effect:
137137

138138
```cmd
139-
setx AZURE_APPCONFIG_CONNECTION_STRING "connection-string-of-your-app-configuration-store"
139+
setx AZURE_APPCONFIG_ENDPOINT "endpoint-of-your-app-configuration-store"
140140
```
141141

142-
#### [PowerShell](#tab/powershell)
142+
If you use PowerShell, run the following command:
143143

144-
If you use Windows PowerShell, run the following command and replace `<app-configuration-store-connection-string>` with the connection string of your app configuration store:
145-
146-
```azurepowershell
147-
$Env:AZURE_APPCONFIG_CONNECTION_STRING = "<app-configuration-store-connection-string>"
144+
```powershell
145+
$Env:AZURE_APPCONFIG_ENDPOINT = "endpoint-of-your-app-configuration-store"
148146
```
149147

150-
#### [macOS](#tab/unix)
151-
152-
If you use macOS, run the following command and replace `<app-configuration-store-connection-string>` with the connection string of your app configuration store:
148+
If you use macOS or Linux, run the following command:
153149

154-
```console
155-
export AZURE_APPCONFIG_CONNECTION_STRING='<app-configuration-store-connection-string>'
156-
```
157-
158-
#### [Linux](#tab/linux)
159-
160-
If you use Linux, run the following command and replace `<app-configuration-store-connection-string>` with the connection string of your app configuration store:
161-
162-
```console
163-
export AZURE_APPCONFIG_CONNECTION_STRING='<app-configuration-store-connection-string>'
150+
```bash
151+
export AZURE_APPCONFIG_ENDPOINT='endpoint-of-your-app-configuration-store'
164152
```
165153

166-
1. Print out the value of the environment variable to validate that it is set properly with the command below.
167-
168-
#### [Windows command prompt](#tab/windowscommandprompt)
154+
### [Connection string](#tab/connection-string)
155+
Set the environment variable named **AZURE_APPCONFIG_CONNECTION_STRING** to the read-only connection string of your App Configuration store found under *Access keys* of your store in the Azure portal.
169156

170-
Using the Windows command prompt, restart the command prompt to allow the change to take effect and run the following command:
157+
If you use the Windows command prompt, run the following command and restart the command prompt to allow the change to take effect:
171158

172159
```cmd
173-
echo %AZURE_APPCONFIG_CONNECTION_STRING%
174-
```
175-
176-
#### [PowerShell](#tab/powershell)
177-
178-
If you use Windows PowerShell, run the following command:
179-
180-
```azurepowershell
181-
$Env:AZURE_APPCONFIG_CONNECTION_STRING
160+
setx AZURE_APPCONFIG_CONNECTION_STRING "connection-string-of-your-app-configuration-store"
182161
```
183162

184-
#### [macOS](#tab/unix)
185-
186-
If you use macOS, run the following command:
163+
If you use PowerShell, run the following command:
187164

188-
```console
189-
echo "$AZURE_APPCONFIG_CONNECTION_STRING"
165+
```powershell
166+
$Env:AZURE_APPCONFIG_CONNECTION_STRING = "connection-string-of-your-app-configuration-store"
190167
```
191168

192-
#### [Linux](#tab/linux)
169+
If you use macOS or Linux, run the following command:
193170

194-
If you use Linux, run the following command:
195-
196-
```console
197-
echo "$AZURE_APPCONFIG_CONNECTION_STRING"
171+
```bash
172+
export AZURE_APPCONFIG_CONNECTION_STRING='connection-string-of-your-app-configuration-store'
198173
```
174+
---
199175

200176
1. After the environment variable is properly set, run the following command to run the app locally:
201177

0 commit comments

Comments
 (0)