Introduction¶
azure-functions-scaffold is a CLI for creating and evolving Azure Functions
Python v2 projects with consistent architecture and practical defaults.
It generates the wiring you would otherwise repeat manually:
function_app.pyentrypoint structure- function module layout under
app/functions/ - service and schema boundaries
- optional quality tooling and integrations
Who This Guide Is For¶
- Production teams that need repeatable structure across multiple apps.
- Platform engineers standardizing starter templates and CI behavior.
- API developers who want OpenAPI and validation support from day one.
Core Workflow¶
- Generate a project with
afs new. - Add triggers over time with
afs add. - Keep business logic in services, trigger code thin.
- Use preset-driven quality checks in CI.
pip install azure-functions-scaffold
afs new my-api --preset standard
cd my-api
pip install -e .[dev]
func start
Built-In Building Blocks¶
Templates¶
httptimerqueueblobservicebus
Presets¶
minimal: no extra toolingstandard: Ruff + pyteststrict: Ruff + mypy + pytest
Feature Flags¶
--with-openapifor HTTP documentation routes--with-validationfor HTTP request/response validation--with-doctorfor diagnostics integration (make doctor)
Command alias
afs and azure-functions-scaffold are equivalent. Use whichever fits your
shell scripts and team conventions.
Recommended Reading Order¶
Example-Driven Learning¶
If you prefer concrete flows over reference docs, jump to: