Functions
generate_autodoc
1
tuple[DocPage, ...]
▼
Generate API reference pages from frozen app state.
Must be called after ``app…
generate_autodoc
1
tuple[DocPage, ...]
▼
def generate_autodoc(app: App) -> tuple[DocPage, ...]
Generate API reference pages from frozen app state.
Must be called afterapp.freeze(). Returns DocPageinstances
withsource=DocSource.AUTODOC.
Parameters
| Name | Type | Description |
|---|---|---|
app |
App |
Returns
tuple[DocPage, ...]
introspect_routes
1
tuple[RouteDoc, ...]
▼
Extract ``RouteDoc`` from each registered route.
introspect_routes
1
tuple[RouteDoc, ...]
▼
def introspect_routes(routes: list[Route]) -> tuple[RouteDoc, ...]
Parameters
| Name | Type | Description |
|---|---|---|
routes |
list[Route] |
Returns
tuple[RouteDoc, ...]
_extract_route_params
2
tuple[ParamDoc, ...]
▼
Extract path parameters from route path and handler signature.
_extract_route_params
2
tuple[ParamDoc, ...]
▼
def _extract_route_params(path: str, handler: Any) -> tuple[ParamDoc, ...]
Parameters
| Name | Type | Description |
|---|---|---|
path |
str |
|
handler |
Any |
Returns
tuple[ParamDoc, ...]
introspect_tools
1
tuple[ToolDoc, ...]
▼
Extract ``ToolDoc`` from MCP tool info list.
introspect_tools
1
tuple[ToolDoc, ...]
▼
def introspect_tools(tool_infos: list[McpToolInfo]) -> tuple[ToolDoc, ...]
Parameters
| Name | Type | Description |
|---|---|---|
tool_infos |
list[McpToolInfo] |
Returns
tuple[ToolDoc, ...]
_flatten_schema
1
tuple[ParamDoc, ...]
▼
Flatten JSON Schema properties into ``ParamDoc`` tuples.
_flatten_schema
1
tuple[ParamDoc, ...]
▼
def _flatten_schema(schema: dict[str, Any]) -> tuple[ParamDoc, ...]
Parameters
| Name | Type | Description |
|---|---|---|
schema |
dict[str, Any] |
Returns
tuple[ParamDoc, ...]
_slug_for_route
1
str
▼
Generate a URL-safe slug from a route path.
``/contacts/{id}`` → ``api/routes/…
_slug_for_route
1
str
▼
def _slug_for_route(path: str) -> str
Generate a URL-safe slug from a route path.
/contacts/{id} → api/routes/contacts-id
Parameters
| Name | Type | Description |
|---|---|---|
path |
str |
Returns
str
_slug_for_tool
1
str
▼
Generate a URL-safe slug from a tool name.
``search_docs`` → ``api/tools/searc…
_slug_for_tool
1
str
▼
def _slug_for_tool(name: str) -> str
Generate a URL-safe slug from a tool name.
search_docs → api/tools/search-docs
Parameters
| Name | Type | Description |
|---|---|---|
name |
str |
Returns
str
_route_doc_to_markdown
1
str
▼
Render a RouteDoc as markdown (for agent consumption via raw field).
_route_doc_to_markdown
1
str
▼
def _route_doc_to_markdown(rd: RouteDoc) -> str
Parameters
| Name | Type | Description |
|---|---|---|
rd |
RouteDoc |
Returns
str
_tool_doc_to_markdown
1
str
▼
Render a ToolDoc as markdown (for agent consumption via raw field).
_tool_doc_to_markdown
1
str
▼
def _tool_doc_to_markdown(td: ToolDoc) -> str
Parameters
| Name | Type | Description |
|---|---|---|
td |
ToolDoc |
Returns
str
_markdown_to_html
1
Markup
▼
Simple markdown-to-HTML for autodoc pages.
Uses MarkdownRenderer if available,…
_markdown_to_html
1
Markup
▼
def _markdown_to_html(md: str) -> Markup
Simple markdown-to-HTML for autodoc pages.
Uses MarkdownRenderer if available, falls back to minimal rendering.
Parameters
| Name | Type | Description |
|---|---|---|
md |
str |
Returns
Markup
_route_doc_to_page
2
DocPage
▼
Convert a RouteDoc to a DocPage.
_route_doc_to_page
2
DocPage
▼
def _route_doc_to_page(rd: RouteDoc, *, order: int) -> DocPage
Parameters
| Name | Type | Description |
|---|---|---|
rd |
RouteDoc |
|
order |
int |
Returns
DocPage
_tool_doc_to_page
2
DocPage
▼
Convert a ToolDoc to a DocPage.
_tool_doc_to_page
2
DocPage
▼
def _tool_doc_to_page(td: ToolDoc, *, order: int) -> DocPage
Parameters
| Name | Type | Description |
|---|---|---|
td |
ToolDoc |
|
order |
int |
Returns
DocPage