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 expansion once and verify every inverse result by expansion.

Class UriMatcher Compile expansion once and verify every inverse result by expansion.
Function _decode_captures Decode URI variables while checking repeated variable consistency.
Function _expansion_value Preserve Orionis scalar formatting and mapping order during RFC expansion.
Function _simple_pattern Compile safe simple-string inverses; other expressions need a match hook.
Function _uppercase_escape Normalize the hexadecimal digits of one percent escape.
Function _validate_template Require RFC 6570 syntax before compiling a resource template.
Function validate_uri Require an absolute URI without malformed escapes or literal controls.
Constant _ESCAPE Compiled pattern used to recognize escape.
Constant _EXPRESSION Compiled pattern used to recognize expression.
Constant _INVALID_LITERAL Compiled pattern used to recognize invalid literal.
Constant _MODIFIER (?::[1-9]\d{0,3}|\*)?.
Constant _PART Compiled pattern used to recognize part.
Constant _SCHEME Compiled pattern used to recognize scheme.
Constant _SIMPLE Compiled pattern used to recognize simple.
Constant _VARNAME (?:\w|%[0-9A-Fa-f]{2})++(?:\.(?:\w|%[0-9A-Fa-f]{2})++)*+.
def _decode_captures(captures: tuple[str, ...], groups: tuple[str, ...]) -> dict[str, object] | None: (source)

Decode URI variables while checking repeated variable consistency.

Parameters
captures:tuple[str, ...]Variable names in capture order.
groups:tuple[str, ...]Values captured by the compiled inverse pattern.
Returns
dict[str, object] | NoneDecoded variables, or None when repeated variables disagree.
def _expansion_value(value: object) -> object: (source)

Preserve Orionis scalar formatting and mapping order during RFC expansion.

Parameters
value:objectOne value returned by the resource inverse.
Returns
objectLibrary-compatible value with booleans formatted as lowercase strings.
def _simple_pattern(template: str) -> tuple[re.Pattern[str], tuple[str, ...]] | None: (source)

Compile safe simple-string inverses; other expressions need a match hook.

Parameters
template:strValue supplied for template.
Returns
tuple[re.Pattern[str], tuple[str, ...]] | NoneResult of the operation described above.
def _uppercase_escape(match: re.Match[str]) -> str: (source)

Normalize the hexadecimal digits of one percent escape.

Parameters
match:re.Match[str]Matched percent escape.
Returns
strEscape with uppercase hexadecimal digits.
def _validate_template(template: str): (source)

Require RFC 6570 syntax before compiling a resource template.

Parameters
template:strValue supplied for template.
Returns
NoneComplete the documented operation without returning a value.
def validate_uri(uri: str): (source)

Require an absolute URI without malformed escapes or literal controls.

Parameters
uri:strValue supplied for uri.
Returns
NoneComplete the documented operation without returning a value.

Compiled pattern used to recognize escape.

Value
re.compile(r'%[0-9a-fA-F]{2}')
_EXPRESSION = (source)

Compiled pattern used to recognize expression.

Value
re.compile(f'[+#./;?&]?{_VARNAME}{_MODIFIER}(?:,{_VARNAME}{_MODIFIER})*+', re.ASCII↵
)
_INVALID_LITERAL = (source)

Compiled pattern used to recognize invalid literal.

Value
re.compile(r'[\x00- \x7f"<>\\\^`\{\}]|%(?![0-9A-Fa-f]{2})|[\ud800-\udfff]')
_MODIFIER: str = (source)

(?::[1-9]\d{0,3}|\*)?.

Value
'(?::[1-9]\\d{0,3}|\\*)?'

Compiled pattern used to recognize part.

Value
re.compile(r'\{([^\{\}]*)\}')

Compiled pattern used to recognize scheme.

Value
re.compile(r'[A-Za-z][A-Za-z0-9\+\.-]*:')

Compiled pattern used to recognize simple.

Value
re.compile(_VARNAME, re.ASCII)
_VARNAME: str = (source)

(?:\w|%[0-9A-Fa-f]{2})++(?:\.(?:\w|%[0-9A-Fa-f]{2})++)*+.

Value
'(?:\\w|%[0-9A-Fa-f]{2})++(?:\\.(?:\\w|%[0-9A-Fa-f]{2})++)*+'