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

Compile declared routes into runtime dispatch metadata.

Class RouteCompiler Compile declared routes into runtime dispatch metadata.
Function _action_name Return an importable handler name for boot-time dispatch and caching.
Function _register_name Require one unambiguous URL template per route name.
Function _validate_literal Reject unmatched braces and malformed parameter declarations.
Constant _NAMED_GROUP_RE Precompiled pattern to normalise named capture groups for collision detection.
Constant _PARAM_RE Match path parameter placeholders, including optional converter names.
def _action_name(handler: Callable | type) -> str: (source)

Return an importable handler name for boot-time dispatch and caching.

Parameters
handler:collections.abc.Callable | typeValue supplied for handler.
Returns
strAn importable handler name for boot-time dispatch and caching.
Raises
ValueErrorIf the handler is local to a function and cannot be imported at boot.
def _register_name(names: dict[str, str], route: dict): (source)

Require one unambiguous URL template per route name.

Parameters
names:dict[str, str]Value supplied for names.
route:dictValue supplied for route.
Returns
NoneComplete the documented operation without returning a value.
Raises
ValueErrorIf the same name refers to different path templates.
def _validate_literal(fragment: str, path: str): (source)

Reject unmatched braces and malformed parameter declarations.

Parameters
fragment:strValue supplied for fragment.
path:strValue supplied for path.
Returns
NoneComplete the documented operation without returning a value.
Raises
ValueErrorIf a literal fragment contains a parameter delimiter.
_NAMED_GROUP_RE: re.Pattern = (source)

Precompiled pattern to normalise named capture groups for collision detection.

Value
re.compile(r'\(\?P<\w+>')

Match path parameter placeholders, including optional converter names.

Value
re.compile(r'\{(\w+)(?::(\w+))?\}')