Classes
LayoutDebugMiddleware
1
▼
Middleware that adds X-Chirp-Layout-* and X-Chirp-Route-* headers when config.debug.
LayoutDebugMiddleware
1
▼
Middleware that adds X-Chirp-Layout-* and X-Chirp-Route-* headers when config.debug.
Methods
Internal Methods 1 ▼
__call__
2
AnyResponse
▼
async
__call__
2
AnyResponse
▼
async def __call__(self, request: Request, next: Next) -> AnyResponse
Parameters
| Name | Type | Description |
|---|---|---|
request |
— |
|
next |
— |
Returns
AnyResponse
Functions
set_layout_debug_metadata
4
None
▼
Store layout chain metadata on the request for the layout debug middleware.
set_layout_debug_metadata
4
None
▼
def set_layout_debug_metadata(request: Request | None, chain: str, match: str, mode: str) -> None
Parameters
| Name | Type | Description |
|---|---|---|
request |
Request | None |
|
chain |
str |
|
match |
str |
|
mode |
str |
_build_render_plan_payload
1
dict | None
▼
Build a rich render plan payload from the stashed RenderPlan.
Uses the public …
_build_render_plan_payload
1
dict | None
▼
def _build_render_plan_payload(request: Request) -> dict | None
Build a rich render plan payload from the stashed RenderPlan.
Uses the publicget_render_plan()API to access the frozen
RenderPlan object, producing a richer payload than the old compact
snapshot (which was capped at 20 context keys and ~2 KB).
Parameters
| Name | Type | Description |
|---|---|---|
request |
Request |
Returns
dict | None
_compact_render_plan
1
dict
▼
Trim a render plan snapshot to header-safe size (~2 KB).
Fallback used when th…
_compact_render_plan
1
dict
▼
def _compact_render_plan(plan: dict) -> dict
Trim a render plan snapshot to header-safe size (~2 KB).
Fallback used when the frozen RenderPlan is not available.
Parameters
| Name | Type | Description |
|---|---|---|
plan |
dict |
Returns
dict