


In the integrated terminal, activate the virtual environment in the current folder, depending on your operating system: Open the editor's integrated terminal in the current folder ( Ctrl+Shift+`). Open the requirements.txt in the editor and change its content to the following code: azure-functions You then need to activate the virtual environment in a terminal and install some dependencies required by Azure Functions and Durable Functions. When you've created the project, the Azure Functions Visual Studio Code extension automatically creates a virtual environment with your selected Python version. Install azure-functions-durable from PyPI It specifies the Python packages required to run your function app. This project contains the host.json and configuration files.Ī requirements.txt file is also created in the root folder. It also creates a function app project in a folder. Visual Studio Code installs the Azure Functions Core Tools if needed. Reopens Visual Studio Code in the folder you selected. Select how you would like to open your project Visual Studio Code will create a virtual environment with the version you select. In this case, Core Tools are installed the first time you run the app. You only see this option when the Core Tools aren't already installed.

In the command palette, search for and select Azure Functions: Create New Project.Ĭhoose an empty folder location for your project and choose Select.įollow the prompts and provide the following information: PromptĬreate a local Python Functions project using the V2 programming model. In Visual Studio Code, press F1 (or Ctrl/Cmd+Shift+P) to open the command palette. In this section, you use Visual Studio Code to create a local Azure Functions project. If you don't have an Azure subscription, create an Azure free account before you begin. Make sure that you have version 3.7, 3.8, 3.9, or 3.10 of Python installed. Make sure that you have the latest version of the Azure Functions Core Tools.ĭurable Functions require an Azure storage account. Install the Azure Functions Visual Studio Code extension. To learn more, see Azure Functions Python developer guide. Compared to the current model, the new experience is designed to be more idiomatic and intuitive for Python programmers. The new programming model for authoring Functions in Python (V2) is currently in preview.
