Configure Local Development Environment
-
Update Azure Function Core Tools to the latest version (64-bit recommended);
funcshould be on your path. The following version is known to work:Azure Functions Core ToolsCore Tools Version: 4.0.5530 Commit hash: N/A +c8883e7f3c06e2b424fbac033806c19d8d91418c (64-bit)Function Runtime Version: 4.28.5.21962 -
Create a Python 3.10 virtual environment:
python3.10 -m venv .venvpyenv is recommended for managing the available Python versions on your system
-
Activate the virtual environment:
.\.venv\Scripts\activate. -
Install the requirements:
pip install -r .\requirements.txt -
Create a
local.settings.jsonthis is a git-ignored Azure Functions artifact
{"IsEncrypted": false,"Values": {"AzureWebJobsStorage__accountName": "samaxconftest","QUEUE_URL": "https://samaxconftest.queue.core.windows.net","FUNCTIONS_WORKER_RUNTIME": "python","AzureWebJobsFeatureFlags": "EnableWorkerIndexing","KEYVAULT_URL": "https://kvlt-maxconf-test.vault.azure.net/","AZURE_CLIENT_ID": "YOUR SERVICE PRINCIPAL CLIENT ID","AZURE_CLIENT_SECRET": "YOUR SERVICE PRINCIPAL CLIENT SECRET","AZURE_TENANT_ID":"953fc14a-00c7-4452-a2fb-0a73070de7f3","PEXIP_URI": "https://management.test.vc.maxconf.ca","APIM_URL": "http://localhost:7071","MAX_VMR": "0"}} -
Host the app using Azure Functions Core Tools:
func host startSaving changes to files in the function app restarts the worker process, so there is no need to stop and restart the function host.