Forkable example APIs
Every project has its own manifest and framework-independent Python code. Copy one, run it as-is, or pin it as an APIZIT integration fixture.
The gallery is tested with APIZIT Linking 1.0.1. The original examples retain legacy binding; the persistent example adds typed models and explicit HTTP/security policy. Their business modules import neither APIZIT Linking, FastAPI, nor Flask.
Project catalogue#
Repository root · 1 route
Hello World#
The smallest complete function-to-route project.
- GET
- module:function
- preview
examples/path-and-query-parameters · 1 route
Path and query parameters#
Explicit request sources, int/bool conversion, and a Python default.
- path
- query
- defaults
examples/json-body · 1 route
JSON body#
Required and optional top-level body fields with typed conversion, nullable values, and defaults.
- POST
- body
- list[str]
examples/error-handling · 1 route
Error handling#
Structured request-resolution failures and the generic boundary for an unhandled business exception.
- 400
- 500
- conversion
examples/multi-module-api · 1 route
Multi-module API#
A dotted target inside a Python package, with a package-relative import performed by the linked function.
- package
- dotted target
- relative import
examples/task-api · 5 routes
Task API#
A realistic CRUD-style service using path, query, and body inputs with process-local state.
- GET
- POST
- PATCH
- DELETE
Route matrix#
| Project | Method | Path | Linked function |
|---|---|---|---|
| Hello World | GET | /hello | hello:hello |
| Path and query | GET | /users/{user_id}/greeting | greetings:get_greeting |
| JSON body | POST | /products | products:create_product |
| Error handling | GET | /divide | calculator:divide |
| Multi-module API | GET | /products/{product_id}/quote | catalog.service:quote |
| Task API | GET | /tasks | tasks:list_tasks |
| POST | /tasks | tasks:create_task | |
| GET | /tasks/{task_id} | tasks:get_task | |
| PATCH | /tasks/{task_id} | tasks:update_task | |
| DELETE | /tasks/{task_id} | tasks:delete_task |
Validate or run any project#
python -m pip install -r requirements.txt
apizit-linking validate examples/task-api
apizit-linking preview examples/task-api --port 8080Replace task-api with any directory name in the catalogue. Each project README includes its routes, request examples, expected responses, tests, and specific limitations.
Use the whole repository as a test fixture#
The integration suite compiles every manifest, rejects framework imports in business files, invokes all routes through the actual ASGI adapter, and runs the complete task lifecycle.
The three V1 demonstrations#
- The multi-module library retains its original Python files and direct behavior while YAML exposes its functions.
- Persistent API: SQLite, nested models, owner permissions and correct HTTP without APIZIT.
- Route diagnosis: an observed event locates source; export/diff and tests control a correction.
The process-local task gallery remains a legacy demonstration, not durable storage. Fork the repository, run its tests and use the example matching your intended boundary.