| Dependency | Version |
|---|---|
| Python | 3.10 -- 3.14 |
| Azure Functions Core Tools | Latest stable |
| Azure Functions programming model | v2 (func.FunctionApp with decorators) |
This library is not compatible with the legacy function.json-based v1 model.
pip install azure-functions-openapipython -c "import azure_functions_openapi; print(azure_functions_openapi.__version__)"Install the dev extras for local development:
pip install azure-functions-openapi[dev]Install the docs extras to build the documentation site locally:
pip install azure-functions-openapi[docs]If you also use azure-functions-validation for request/response validation,
install it alongside — scan_validation_metadata() will auto-discover
validation metadata without any extra configuration:
pip install azure-functions-openapi azure-functions-validationAzure Functions reads requirements.txt during deployment. Ensure both the runtime
SDK and this library are listed:
azure-functions
azure-functions-openapi
If your endpoints use Pydantic models for request or response schemas, add Pydantic as well:
pydantic>=2.0
Clone the repository and create a virtual environment:
git clone https://github.com/yeongseon/azure-functions-openapi.git
cd azure-functions-openapi
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .[dev]Or use the Makefile shortcut:
make installThis creates the Hatch-managed environment and installs pre-commit hooks.
The Core Tools provide the func CLI for local development and deployment.
Install using the official Microsoft instructions for your platform:
- Windows: https://learn.microsoft.com/azure/azure-functions/functions-run-local
- macOS:
brew tap azure/functions && brew install azure-functions-core-tools@4 - Linux: https://learn.microsoft.com/azure/azure-functions/functions-run-local
Verify the installation:
func --versionDeploy with the Azure Functions Core Tools:
func azure functionapp publish <app-name>The requirements.txt in your project root is installed automatically during deployment.
If you deploy via a custom Docker image, install the package in your Dockerfile:
FROM mcr.microsoft.com/azure-functions/python:4-python3.12
COPY requirements.txt /home/site/wwwroot/requirements.txt
RUN pip install -r /home/site/wwwroot/requirements.txt
COPY . /home/site/wwwrootUpgrade to the latest release:
pip install --upgrade azure-functions-openapiCheck the Changelog for breaking changes before upgrading across major or minor versions.