Compiled handler invocation plan — moves per-request reflection out of hot path.
At freeze time we inspect each route handler once and produce an InvokePlan that describes how to build kwargs. The handler uses this plan instead of calling inspect.signature() on every request.
_internal.invoke_plan
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Spec for one handler parameter — where to get its value.
Precomputed handler invocation plan.
Built once at freeze time from handler signature and providers. Used by handler to build kwargs without inspect.signature per request.
Inspect handler signature once and produce an InvokePlan.
Path params take priority over providers when a param name appears in both.
ParamSpec
class
Spec for one handler parameter — where to get its value.
InvokePlan
class
Precomputed handler invocation plan.
Built once at freeze time from handler signature and providers. Used by handler to build kwargs without inspect.signature per request.
compile_invoke_plan
function
def compile_invoke_plan(handler: Callable[..., Any], providers: dict[type, Callable[..., Any]] | None = None, *, path_param_names: frozenset[str] | None = None, inline: bool = False) -> InvokePlan
Inspect handler signature once and produce an InvokePlan.
Path params take priority over providers when a param name appears in both.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
handler
|
Callable[..., Any]
|
— | |
providers
|
dict[type, Callable[..., Any]] | None
|
None
|
|
path_param_names
|
frozenset[str] | None
|
None
|
|
inline
|
bool
|
False
|
View source · /home/runner/work/chirp/chirp/site/../src/chirp/_internal/invoke_plan.py:1