Goal
Production SaaS example showing how to integrate enzu into a FastAPI service with per-customer budgets.
Use Case
Document analysis API with multiple customers, each with their own budget limits.
What It Demonstrates
- FastAPI integration - REST endpoints with enzu execution
- Multi-tenant isolation - per-customer budget tracking
- Job queue pattern - async processing with delegation
- Observability - Prometheus metrics, structured logging
- Rate limiting - budget-aware request throttling
- Session management - customer context preservation
Deliverables
Example Endpoints
POST /analyze - Submit document for analysis
GET /jobs/{id} - Check job status
GET /metrics - Prometheus metrics
GET /health - Health check
Success Criteria
- Runs with docker-compose
- Multiple customers isolated
- Budget enforcement per customer
- Prometheus metrics exposed
- Clean error handling + typed outcomes
Target Audience
SaaS companies, API service builders
Estimated Effort
Large (3-4 days)
Goal
Production SaaS example showing how to integrate enzu into a FastAPI service with per-customer budgets.
Use Case
Document analysis API with multiple customers, each with their own budget limits.
What It Demonstrates
Deliverables
examples/api_service/main.py- FastAPI app with endpointsmodels.py- Pydantic request/response modelsbudget.py- per-customer budget controllerworker.py- background job processordocker-compose.yml- Redis + service setupREADME.md- deployment guide, API docstests/- integration testsmetrics.py- Prometheus exportersExample Endpoints
Success Criteria
Target Audience
SaaS companies, API service builders
Estimated Effort
Large (3-4 days)