Semblance Examples
Curated, runnable examples for common use cases. Each example's README shows example output from a real run so you can verify behavior.
Running Examples
From the project root (with semblance installed):
semblance run examples.<name>.app:api --port 8000
Or with uvicorn:
uvicorn examples.<name>.app:app --reload
Examples
| Example | Description |
|---|---|
| basic | Minimal GET list with FromInput, DateRangeFrom |
| pagination | PageParams, PaginatedResponse |
| nested | Nested model linking |
| stateful | POST stores items, GET returns stored list |
| advanced | WhenInput, ComputedFrom, filter_by |
| error_simulation | error_rate, error_codes |
| plugins | Custom link (FromEnv) |
| put_patch_delete | PUT, PATCH, DELETE (Phase 5) |
| stateful_crud | Full stateful CRUD: GET by id, PUT, PATCH, DELETE (Phase 6) |
| request_links | FromHeader, FromCookie (Phase 7) |