Getting Started¶
This guide shows the fastest path from clone to running recipe-aligned Azure Functions examples locally.
What you are using
This repository is a cookbook. You consume it by reading patterns in
docs/patterns/ and running matching sample apps in examples/.
1) Clone and set up the environment¶
git clone https://github.com/yeongseon/azure-functions-cookbook-python.git
cd azure-functions-cookbook-python
python -m venv .venv
source .venv/bin/activate
Install dependencies:
Alternative:
2) Pick a recipe based on your use case¶
Use this quick map:
| Need | Recipe | Example |
|---|---|---|
| Basic HTTP endpoint | patterns/apis-and-ingress/hello-http-minimal.md |
examples/apis-and-ingress/hello_http_minimal |
| Full CRUD with routing | patterns/apis-and-ingress/http-routing-query-body.md |
examples/apis-and-ingress/http_routing_query_body |
| GitHub event ingestion | patterns/apis-and-ingress/webhook-github.md |
examples/apis-and-ingress/webhook_github |
| Async queue processing | patterns/messaging-and-pubsub/queue-consumer.md |
examples/messaging-and-pubsub/queue_consumer |
| Scheduled jobs | patterns/scheduled-and-background/timer-cron-job.md |
examples/scheduled-and-background/timer_cron_job |
3) Read the recipe first¶
Each recipe describes:
- Why the pattern exists
- Trigger flow and architecture
- Project structure and local run steps
- Production concerns (security, scaling, retries, observability)
Tip
Read the recipe before editing the example code. It gives important context for design decisions and operational behavior.
4) Run the matching example¶
Hello HTTP Minimal¶
Test endpoints:
GitHub Webhook Receiver¶
Set GITHUB_WEBHOOK_SECRET before receiving signed webhook traffic.
Queue Consumer¶
For local queue emulation:
Set local storage connection to UseDevelopmentStorage=true.
Timer Cron Job¶
Manual trigger for quick testing:
curl -X POST http://localhost:7071/admin/functions/scheduled_job -H "Content-Type: application/json" -d '{"input":"test"}'
5) Adapt a recipe to your needs¶
After you confirm an example runs:
- Replace in-memory or placeholder logic with your domain logic.
- Move secrets to environment variables / Key Vault.
- Add structured logging and request correlation IDs.
- Add tests for happy-path and failure-path behavior.
- Validate production concerns listed in the recipe page.
6) Validate changes¶
This verifies linting, typing, tests, security scan, and docs build.
Common first-week workflow¶
flowchart LR
A[Choose recipe] --> B[Run sample]
B --> C[Confirm endpoint/trigger behavior]
C --> D[Customize code]
D --> E[Add tests]
E --> F[Re-run checks]
F --> G[Document changes]
Where to go next¶
- Pattern orientation: Pattern Catalog
- Contributor workflow: Development
- Test strategy: Testing
- Frequent issues: Troubleshooting
- Project direction: Roadmap