Skip to content

Azure Functions Python Cookbook

Practical, production-oriented recipes for building Azure Functions with the Python v2 programming model.

What this project is

This repository is a cookbook and pattern catalog. It is not a runtime library you install as application dependency.

Why this cookbook exists

Azure Functions documentation is broad, but many teams still need concrete, copy-adapt-run patterns for common workloads. This cookbook focuses on that gap by pairing clear recipe narratives with runnable examples.

What you get

  • Trigger-focused recipes for real workloads (HTTP, webhook, queue, timer)
  • Runnable sample apps under examples/
  • Production considerations in every recipe
  • Consistent structure for learning, implementation, and contribution

Recipe cards

HTTP API Basic

  • Trigger: HTTP
  • Best for: minimal CRUD APIs and route handling
  • Learn more: HTTP API Basic

HTTP API with OpenAPI

GitHub Webhook

  • Trigger: HTTP
  • Best for: secure signed event ingestion from GitHub
  • Learn more: GitHub Webhook

Queue Worker

  • Trigger: Queue
  • Best for: asynchronous background processing
  • Learn more: Queue Worker

Timer Job

  • Trigger: Timer
  • Best for: scheduled maintenance and periodic automation
  • Learn more: Timer Job

Quick start

git clone https://github.com/yeongseon/azure-functions-python-cookbook.git
cd azure-functions-python-cookbook
python -m venv .venv
source .venv/bin/activate

Run one example:

cd examples/http_api_basic
pip install -r requirements.txt
func start

Then test:

curl http://localhost:7071/api/items
  1. Installation
  2. Getting Started
  3. Recipes Overview
  4. Pick one deep-dive recipe page
  5. Run the matching examples/<name> project
  6. Validate with Testing

Repository map

docs/       Documentation site pages and recipe deep-dives
recipes/    Source recipe narratives and template contract
examples/   Runnable Azure Functions app implementations

Ecosystem projects

These companion projects integrate well with cookbook patterns:

  • azure-functions-scaffold -> project bootstrap from known templates
  • azure-functions-validation -> request/response validation helpers
  • azure-functions-openapi -> generated API contracts and Swagger UI
  • azure-functions-logging -> structured telemetry and diagnostics
  • azure-functions-doctor -> local environment diagnosis

Contributing and quality

If you want to improve recipes or examples:

Additional references

Tip

The fastest path to value is: pick one recipe, run its example, then adapt for your production constraints.