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 |
Replace path placeholders with their values. |
| Function | _compile |
Split a route template into literal chunks and placeholder names. |
| Async Function | _load |
Collect every named route as a mapping of name to path template. |
| Constant | _MISSING |
Undocumented |
| Constant | _ROUTE |
Undocumented |
| Constant | _ROUTE |
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:str | Route 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 | |
ViewRouteException | If a placeholder has no matching value in params. |
Split a route template into literal chunks and placeholder names.
| Parameters | |
template:str | Route 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. |
Collect every named route as a mapping of name to path template.
| Parameters | |
app:IApplication | Application container used to build the route loader. |
| Returns | |
dict[str, str] | Route name mapped to its raw path, e.g. '/users/{id:int}'. |