Examples and Demos¶
Note (v0.90+): The new type-safe parameter system is recommended. See Parameter System Guide for the new
Path,Query,Body,DynamicBodyparameter types. Legacy examples below are still functional for backward compatibility.
This page lists canonical runnable examples shipped with Cullinan. Each entry includes the example path, a short description, and how to run it on common platforms.
Hello HTTP¶
- Path:
examples/hello_http.py - Description: Minimal HTTP server returning a greeting.
How to run¶
On Windows (PowerShell):
python examples\hello_http.py
On Linux / macOS:
python examples/hello_http.py
Expected behavior:
- Starts an HTTP server.
- Serves a response on
http://localhost:4080/hello.
Controller + DI + Middleware demo¶
- Path:
examples/controller_di_middleware.py - Description: Demonstrates integration between controllers, dependency injection, and middleware.
How to run¶
On Windows (PowerShell):
python examples\controller_di_middleware.py
On Linux / macOS:
python examples/controller_di_middleware.py
Expected behavior:
- Logs request handling through middleware.
- Shows how injected services participate in the request pipeline.