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-functions/create-first-function-vs-code-python.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Create a Python function using Visual Studio Code - Azure Functions
3
3
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.
@@ -47,9 +47,9 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
47
47
48
48
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...`.
49
49
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.
51
51
52
-
3. Provide the following information at the prompts:
52
+
1. Provide the following information at the prompts:
53
53
54
54
|Prompt|Selection|
55
55
|--|--|
@@ -60,7 +60,21 @@ In this section, you use Visual Studio Code to create a local Azure Functions pr
60
60
|**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).|
61
61
|**Select how you would like to open your project**| Choose `Open in current window`.|
62
62
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:
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.
0 commit comments