This Python Durable Functions quickstart sample has been created based on the .NET reference sample from: https://github.com/Azure-Samples/durable-functions-quickstart-dotnet-azd
- function_app.py: Contains the main durable functions application with:
- HTTP trigger (
http_start) to start orchestrations - Orchestrator function (
FetchOrchestration) that implements fan-out/fan-in pattern - Activity function (
fetch_title) that fetches article titles from URLs
- HTTP trigger (
- host.json: Configured with extension bundle v4.x for Durable Functions
- requirements.txt: Python dependencies (azure-functions, azure-functions-durable, aiohttp)
- main.bicep: Main infrastructure template configured for Python 3.12 runtime
- app/api.bicep: Function App configuration for Flex Consumption plan
- app/rbac.bicep: Role-based access control assignments
- app/vnet.bicep: Virtual network configuration (optional)
- app/storage-PrivateEndpoint.bicep: Private endpoint for storage (when VNet enabled)
- azure.yaml: Azure Developer CLI configuration pointing to Python project
- .vscode/: VS Code settings for Python development
- .devcontainer/: Codespaces/Dev Container configuration
To test locally:
- Python 3.12
- Azure Functions Core Tools v4
- Azurite (storage emulator)
- Virtual environment with dependencies from requirements.txt
- Azure subscription
- Azure Developer CLI (azd)
- Region that supports Flex Consumption plan
- Runtime changed from dotnet-isolated 8.0 to Python 3.12
- Project structure uses /src instead of /fanoutfanin
- Uses Python v2 programming model with decorators
- Different dependency management (requirements.txt vs .csproj)
- VS Code configuration adapted for Python debugging
- Uses Azure Verified Modules (AVM) in bicep
- Managed identity for authentication (no connection strings)
- Optional VNet for enhanced security
- Extension bundle v4.x (latest stable)
- Python 3.12 (latest stable version)