How azure/azure-functions-python-worker works
Project type and purpose
• This is an open-source language worker for Azure Functions, written in Python (the “Python Worker”).
• It implements the Functions language‐worker protocol (FunctionRpc) so that the Azure Functions Host (a .NET process) can invoke Python functions, manage triggers/bindings, handle logging, and report cold starts, metrics, etc.
File structure
• Top-level modules:
• azure_functions_worker/ – core Python Worker implementation
• protos/ – generated gRPC/Protobuf definitions (FunctionRpc, ClaimsIdentityRpc, NullableTypes)
• extension.py – registers binding extensions
• dispatcher.py – receives host RPCs and routes them to the user function
• loader.py – discovers and loads user code (“Function Apps”)
• bindings/ – converts between gRPC messages and Python types for each binding (Blob, HTTP, Timer, etc.)
• http_v2.py – HTTP v2 streaming support
• utils/ – common helpers (dependency resolution, tracing, app settings)
• main.py – process entry point, starts gRPC server and listens for FunctionRpc calls
• proxy_worker/ – legacy or intermediary layer for some host scenarios (similar structure to azure_functions_worker)
• python/ – sample “worker.config.json” and “worker.py” launch scripts for local or production use
• eng/, .github/, docs/ – CI/CD pipelines, build/release scripts, documentation and templates
• tests/ – split into unit tests, end-to-end tests (triggers, bindings), extension tests, integration tests
README for additional insights
• Confirms that the worker hosts Python 3.8–3.12, implements all first-party triggers/bindings, and plugs into Azure Functions Core Tools or VS Code.
• Points to a “Language worker architecture” wiki describing process boundaries, extension loading, and the RPC protocol.
Detail
• Every major subcomponent (protos, dispatcher, loader, each binding folder)
• How tests (unit, e2e, extension) map back to modules they cover (e.g., extension_tests → extension.py)
• Do not over-simplify—each binding adapter is a plugin point.