Installation¶
Requirements¶
| 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.
Install from PyPI¶
Verify the installation¶
Optional dependencies¶
Install the dev extras for local development:
Install the docs extras to build the documentation site locally:
Add to requirements.txt¶
Azure Functions reads requirements.txt during deployment. Ensure both the runtime
SDK and this library are listed:
If your endpoints use Pydantic models for request or response schemas, add Pydantic as well:
Local Development Setup¶
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:
This creates the Hatch-managed environment and installs pre-commit hooks.
Azure Functions Core Tools¶
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:
Deployment¶
Azure Functions¶
Deploy with the Azure Functions Core Tools:
The requirements.txt in your project root is installed automatically during deployment.
Docker¶
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/wwwroot
Upgrading¶
Upgrade to the latest release:
Check the Changelog for breaking changes before upgrading across major or minor versions.