azure-functions-python-worker

Azure Functions Python Runtime — Engineering & Architecture

Welcome to the engineering documentation for the Azure Functions Python Worker & Runtime.

While preserving the exact same FunctionRpc.proto Host contract and customer-facing azure-functions programming models (V1 function.json and V2 @app decorators), the Python worker architecture has evolved across three distinct generations:

Generation Python Versions Worker Shell Execution Engine Architecture Guide
Generation 1 — Monolith 3.7 – 3.12 workers/azure_functions_worker (prodV4/worker.py) Bundled inside monolith Python ≤ 3.12 Architecture
Generation 2 — Proxy Split 3.13 – 3.14 workers/proxy_worker (proxyV4/worker.py) runtimes/v2, runtimes/v1, or Custom Agent Runtime Python 3.13 – 3.14 Architecture
Generation 3 — R2P2 (Rust) 3.15+ (GIL) workers/r2p2 (tonic + prost + PyO3) Embedded CPython + runtimes/v2 / v1 (native_invocation.py) Python 3.15+ (R2P2) Architecture

Interactive R2P2 Architecture Preview (Python 3.15+)

Use the interactive explorer below to step through all 7 lifecycle phases (Worker Init, Specialization, Metadata, Functions Load, Invocation, Worker Status, and Worker Logs), inspect extracted AST/Rust symbols, or click ⛶ Expand for fullscreen mode. Every page in this site also preserves full static Markdown narratives and native mermaid diagrams in Git.


Documentation Map