ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

module documentation

Undocumented

Function _build_route_path Replace path placeholders with their values.
Function _compile_route_template Split a route template into literal chunks and placeholder names.
Async Function _load_named_routes Collect every named route as a mapping of name to path template.
Constant _MISSING Undocumented
Constant _ROUTE_PARAM_RE Undocumented
Constant _ROUTE_PLAN_CACHE Undocumented
def _build_route_path(template: str, params: dict[str, Any]) -> tuple[str, dict[str, Any]]: (source)

Replace path placeholders with their values.

Parameters
template:strRoute path containing {name} or {name:type} segments.
params:dict[str, Any]Values available to fill the placeholders.
Returns
tuple[str, dict[str, Any]]The interpolated path and the parameters left unused, which the caller appends as a query string.
Raises
ViewRouteExceptionIf a placeholder has no matching value in params.
def _compile_route_template(template: str) -> tuple[tuple[str, ...], tuple[str, ...]]: (source)

Split a route template into literal chunks and placeholder names.

Parameters
template:strRoute path containing {name} or {name:type} segments.
Returns
tuple[tuple[str, ...], tuple[str, ...]]Literal chunks surrounding each placeholder and the ordered placeholder names. The result is memoised for later calls.
async def _load_named_routes(app: IApplication) -> dict[str, str]: (source)

Collect every named route as a mapping of name to path template.

Parameters
app:IApplicationApplication container used to build the route loader.
Returns
dict[str, str]Route name mapped to its raw path, e.g. '/users/{id:int}'.
_MISSING: Any = (source)

Undocumented

Value
object()
_ROUTE_PARAM_RE: re.Pattern = (source)

Undocumented

Value
re.compile(r'\{(\w+)(?::\w+)?\}')
_ROUTE_PLAN_CACHE: dict[str, tuple[tuple[str, ...], tuple[str, ...]]] = (source)

Undocumented

Value
{}