|
1 | 1 | ---
|
2 | 2 | title: Create a Python function from the command line - Azure Functions
|
3 | 3 | description: Learn how to create a Python function from the command line, then publish the local project to serverless hosting in Azure Functions.
|
4 |
| -ms.date: 06/15/2022 |
| 4 | +ms.date: 03/22/2023 |
5 | 5 | ms.topic: quickstart
|
6 | 6 | ms.devlang: python
|
7 | 7 | ms.custom: devx-track-python, devx-track-azurecli, devx-track-azurepowershell, mode-api, devdivchpfy22
|
@@ -79,7 +79,7 @@ Verify your prerequisites, which depend on whether you're using Azure CLI or Azu
|
79 | 79 |
|
80 | 80 | ## <a name="create-venv"></a>Create and activate a virtual environment
|
81 | 81 |
|
82 |
| -In a suitable folder, run the following commands to create and activate a virtual environment named `.venv`. Make sure that you're using Python 3.8, 3.7 or 3.6, which are supported by Azure Functions. |
| 82 | +In a suitable folder, run the following commands to create and activate a virtual environment named `.venv`. Make sure that you're using Python 3.9, 3.8, or 3.7, which are supported by Azure Functions. |
83 | 83 |
|
84 | 84 | # [bash](#tab/bash)
|
85 | 85 |
|
@@ -328,15 +328,15 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
|
328 | 328 | az functionapp create --consumption-plan-location westeurope --runtime python --runtime-version 3.9 --functions-version 4 --name <APP_NAME> --os-type linux --storage-account <STORAGE_NAME>
|
329 | 329 | ```
|
330 | 330 |
|
331 |
| - The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. If you're using Python 3.8, 3.7, or 3.6, change `--runtime-version` to `3.8`, `3.7`, or `3.6`, respectively. You must supply `--os-type linux` because Python functions can't run on Windows, which is the default. |
| 331 | + The [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command creates the function app in Azure. If you're using Python 3.9, 3.8, or 3.7, change `--runtime-version` to `3.9`, `3.8`, or `3.7`, respectively. You must supply `--os-type linux` because Python functions can't run on Windows, which is the default. |
332 | 332 |
|
333 | 333 | # [Azure PowerShell](#tab/azure-powershell)
|
334 | 334 |
|
335 | 335 | ```azurepowershell
|
336 | 336 | New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccountName <STORAGE_NAME> -FunctionsVersion 4 -RuntimeVersion 3.9 -Runtime python -Location '<REGION>'
|
337 | 337 | ```
|
338 | 338 |
|
339 |
| - The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Python 3.8, 3.7, or 3.6, change `-RuntimeVersion` to `3.8`, `3.7`, or `3.6`, respectively. |
| 339 | + The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Python 3.9, 3.8, or 3.7, change `-RuntimeVersion` to `3.9`, `3.8`, or `3.7`, respectively. |
340 | 340 |
|
341 | 341 | ---
|
342 | 342 |
|
|
0 commit comments