_internal.kwargs_resolve

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Shared kwargs-building logic for page handlers and route handlers.

Shared kwargs-building logic for page handlers and route handlers.

_internal.kwargs_resolve

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

build_base_kwargs
function
def build_base_kwargs(sig: inspect.Signature, request: object, path_params: dict[str, str], body_data: dict[str, Any] | None, *, cascade_ctx: dict[str, Any] | None = None, providers: dict[type, Callable[..., Any]] | None = None, invoke_provider: Callable[[Callable[..., Any], object, dict[str, Any]], Any] | None = None) -> dict[str, Any]

Build kwargs from signature using request, path params, context, providers, body.

Resolution order: request → path_params → cascade_ctx → providers → dataclass extract. When invoke_provider is set, providers are called via invoke_provider(factory, request, ctx). Otherwise providers are called as factory().

Parameters

Name Type Default Description
sig inspect.Signature
request object
path_params dict[str, str]
body_data dict[str, Any] | None
cascade_ctx dict[str, Any] | None None
providers dict[type, Callable[..., Any]] | None None
invoke_provider Callable[[Callable[..., Any], object, dict[str, Any]], Any] | None None

View source · /home/runner/work/chirp/chirp/site/../src/chirp/_internal/kwargs_resolve.py:1