routing.params

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

Path parameter parsing and type conversion.

Built-in converters for route path segments like{id:int}.

Path parameter parsing and type conversion.

Built-in converters for route path segments like{id:int}.

routing.params

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

convert_param
function
def convert_param(value: str, param_type: str) -> str | int | float

Convert a captured path parameter string to the target type.

RaisesValueErrorif the string cannot be converted. RaisesKeyErrorif param_type is not a registered converter.

Parameters

Name Type Default Description
value str —
param_type str —

View source · /home/runner/work/chirp/chirp/site/../src/chirp/routing/params.py:1