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

Provide support types operations through unique_items.

Function _comparison_keys Build hashable equality keys or select the linear comparison fallback.
Function _structural_key Build equality-compatible keys only for exact built-in value trees.
Function unique_items Preserve the first item for each equality key, with a safe tree fast path.
Constant _SCALARS Exact scalar types whose native equality supports structural indexing.
Constant _SMALL_INPUT Maximum input size for which linear unhashable comparison avoids index overhead.
Constant _UNSUPPORTED Sentinel distinguishing unsupported from ordinary values.
def _comparison_keys(comparisons: list[object]) -> list[object] | None: (source)

Build hashable equality keys or select the linear comparison fallback.

Parameters
comparisons:list[object]Selector results in input order.
Returns
list[object] or NoneHashable keys, or None for custom, cyclic or small unhashable inputs.
def _structural_key(value: object, active: set[int]) -> object: (source)

Build equality-compatible keys only for exact built-in value trees.

Parameters
value:objectValue to represent with a structural equality key.
active:set[int]Container identities on the current recursion path.
Returns
objectEquality key, or the unsupported sentinel for custom or cyclic values.
def unique_items(items: list[T], selector: Callable[[T], object]) -> list[T]: (source)

Preserve the first item for each equality key, with a safe tree fast path.

Parameters
items:list[T]Values whose order and identity are preserved.
selector:collections.abc.Callable[[T], object]Explicit business identity, or the value itself.
Returns
list[T]First representatives. Arbitrary unhashable objects and cycles retain Python equality fallback; no universal hash is assumed for custom types.
_SCALARS = (source)

Exact scalar types whose native equality supports structural indexing.

Value
set([str, bytes, int, float, complex, bool, type(None)])
_SMALL_INPUT: int = (source)

Maximum input size for which linear unhashable comparison avoids index overhead.

Value
128
_UNSUPPORTED = (source)

Sentinel distinguishing unsupported from ordinary values.

Value
object()