Skip to content

Commit f765a5a

Browse files
authored
Replace last step per @gavin-aguiar
1 parent 1d20c8b commit f765a5a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

articles/azure-functions/create-first-function-vs-code-python.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create a Python function using Visual Studio Code - Azure Functions
33
description: Learn how to create a Python function, then publish the local project to serverless hosting in Azure Functions using the Azure Functions extension in Visual Studio Code.
44
ms.topic: quickstart
5-
ms.date: 08/15/2024
5+
ms.date: 09/10/2024
66
ms.devlang: python
77
ms.custom: devx-track-python, mode-api, devdivchpfy22, vscode-azure-extension-update-complete, ai-video-demo
88
ai-usage: ai-assisted
@@ -47,9 +47,9 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
4747

4848
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette and search for and run the command `Azure Functions: Create New Project...`.
4949

50-
2. Choose the directory location for your project workspace and choose **Select**. You should either create a new folder or choose an empty folder for the project workspace. Don't choose a project folder that is already part of a workspace.
50+
1. Choose the directory location for your project workspace and choose **Select**. You should either create a new folder or choose an empty folder for the project workspace. Don't choose a project folder that is already part of a workspace.
5151

52-
3. Provide the following information at the prompts:
52+
1. Provide the following information at the prompts:
5353

5454
|Prompt|Selection|
5555
|--|--|
@@ -60,7 +60,21 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
6060
|**Authorization level**| Choose `ANONYMOUS`, which lets anyone call your function endpoint. For more information, see [Authorization level](functions-bindings-http-webhook-trigger.md#http-auth).|
6161
|**Select how you would like to open your project** | Choose `Open in current window`.|
6262

63-
4. Visual Studio Code uses the provided information and generates an Azure Functions project with an HTTP trigger. You can view the local project files in the Explorer. The generated `function_app.py` project file contains your functions.
63+
1. Visual Studio Code uses the provided information and generates an Azure Functions project with an HTTP trigger. You can view the local project files in the Explorer. The generated `function_app.py` project file contains your functions.
64+
65+
1. In the local.settings.json file, update the `AzureWebJobsStorage` setting as in the following example:
66+
67+
```json
68+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
69+
```
70+
71+
This tells the local Functions host to use the storage emulator for the storage connection required by the Python v2 model. When you publish your project to Azure, this setting uses the default storage account instead. If you're using an Azure Storage account during local development, set your storage account connection string here.
72+
73+
## Start the emulator
74+
75+
1. In Visual Studio Code, press <kbd>F1</kbd> to open the command palette. In the command palette, search for and select `Azurite: Start`.
76+
77+
1. Check the bottom bar and verify that Azurite emulation services are running. If so, you can now run your function locally.
6478

6579
[!INCLUDE [functions-run-function-test-local-vs-code](../../includes/functions-run-function-test-local-vs-code.md)]
6680

0 commit comments

Comments
 (0)