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 orm operations.

Includes snake_case, pluralize, ModelMetadata, ModelMeta.

Class ModelMeta Metaclass discovering model columns and building their metadata.
Class ModelMetadata Precomputed metadata describing a model class.
Function pluralize Pluralize an English word using conventional heuristics.
Function snake_case Convert a CamelCase class name into snake_case.
Constant _ACCESSOR_PREFIX Prefixes and suffix identifying the accessor/mutator naming convention.
Constant _ACCESSOR_SUFFIX Attribute.
Constant _CAMEL_BOUNDARY Pattern splitting CamelCase words for snake_case conversion.
Constant _ES_SUFFIXES Suffixes that pluralize with "es".
Constant _FORWARDED_BUILDER_METHODS Builder entry points forwarded from the model class via the metaclass.
Constant _GUARD_ALL Wildcard marking every attribute as guarded.
Constant _MUTATOR_PREFIX set.
Constant _SCOPE_PREFIX Prefix identifying a local query scope declared on a model.
Constant _VOWELS English vowels used by the pluralization heuristic.
Constant MODEL_EVENTS Lifecycle events a model can dispatch.
def pluralize(word: str) -> str: (source)

Pluralize an English word using conventional heuristics.

Parameters
word:strSingular word to pluralize.
Returns
strPluralized word.
def snake_case(name: str) -> str: (source)

Convert a CamelCase class name into snake_case.

Leading underscores are ignored so private class names still map to clean table names.

Parameters
name:strClass name to convert.
Returns
strsnake_case version of the name.
_ACCESSOR_PREFIX: str = (source)

Prefixes and suffix identifying the accessor/mutator naming convention.

Value
'get'
_ACCESSOR_SUFFIX: str = (source)

Attribute.

Value
'Attribute'
_CAMEL_BOUNDARY = (source)

Pattern splitting CamelCase words for snake_case conversion.

Value
re.compile(r'(?<!^)(?=[A-Z])')
_ES_SUFFIXES: tuple[str, ...] = (source)

Suffixes that pluralize with "es".

Value
('s', 'x', 'z', 'ch', 'sh')
_FORWARDED_BUILDER_METHODS: frozenset[str] = (source)

Builder entry points forwarded from the model class via the metaclass.

Value
frozenset(set(['addSelect',
               'avg',
               'count',
               'crossJoin',
               'distinct',
               'doesntExist',
               'exists',
...
_GUARD_ALL: str = (source)

Wildcard marking every attribute as guarded.

Value
'*'
_MUTATOR_PREFIX: str = (source)

set.

Value
'set'
_SCOPE_PREFIX: str = (source)

Prefix identifying a local query scope declared on a model.

Value
'scope'

English vowels used by the pluralization heuristic.

Value
frozenset('aeiou')
MODEL_EVENTS: tuple[str, ...] = (source)

Lifecycle events a model can dispatch.

Value
('retrieved',
 'saving',
 'creating',
 'created',
 'updating',
 'updated',
 'saved',
...