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 chainable operations over a string value.

Function _pluralize_word Apply the supported regular English plural suffix rules.
Function _replace_portion Replace one bounded portion of the current string.
Function _replacement_values Validate and normalize one replacement parameter.
Constant _INTEGER_LIMIT_ERROR Validation message shared by non-integer limit arguments.
Constant _RE_CAMEL_SEP Word separators shared by camel-case and StudlyCase conversion.
Constant _RE_HEADLINE Word tokens used to construct headline case.
Constant _RE_KEBAB_CAMEL Boundary between a lowercase letter or digit and an uppercase letter.
Constant _RE_KEBAB_MULTI Repeated dashes collapsed during kebab-case conversion.
Constant _RE_KEBAB_SEP Whitespace and underscore runs replaced by kebab-case separators.
Constant _RE_NUMBERS Characters excluded by numeric-character extraction.
Constant _RE_PASCAL_WORDS Word segments used by PascalCase pluralization.
Constant _RE_SQUISH Whitespace runs collapsed by squish.
Constant _RE_UCSPLIT Uppercase-led words, lowercase words and digit runs for ucsplit.
Constant _ULID_RE Crockford Base32 encoding constrained to the 128-bit ULID range.
def _pluralize_word(word: str) -> str: (source)

Apply the supported regular English plural suffix rules.

Parameters
word:strWord whose original case is preserved.
Returns
strWord with a regular plural suffix.
def _replace_portion(value: str, replacement: str, offset: int, length: int) -> str: (source)

Replace one bounded portion of the current string.

Parameters
value:strCurrent string after preceding replacements.
replacement:strLiteral text to insert.
offset:intPosition counted from the start, or from the end when negative.
length:intNonnegative number of characters to remove; zero inserts text.
Returns
strString with the selected portion replaced.
Raises
ValueErrorIf the offset is outside the string boundaries.
def _replacement_values(value: T | list[T], kind: type[T], name: str) -> list[T]: (source)

Validate and normalize one replacement parameter.

Parameters
value:T or list[T]Scalar value or explicit sequence of values.
kind:type[T]Required type of each value.
name:strPublic parameter label used in errors.
Returns
list[T]Nonempty sequence whose values have the required type.
Raises
TypeErrorIf the scalar or a sequence member has an incompatible type.
ValueErrorIf an explicit list is empty.
_INTEGER_LIMIT_ERROR: str = (source)

Validation message shared by non-integer limit arguments.

Value
'Limit must be an integer.'
_RE_CAMEL_SEP = (source)

Word separators shared by camel-case and StudlyCase conversion.

Value
re.compile(r'[_-\s]+')
_RE_HEADLINE = (source)

Word tokens used to construct headline case.

Value
re.compile(r'\b\w+\b')
_RE_KEBAB_CAMEL = (source)

Boundary between a lowercase letter or digit and an uppercase letter.

Value
re.compile(r'([a-z0-9])([A-Z])')
_RE_KEBAB_MULTI = (source)

Repeated dashes collapsed during kebab-case conversion.

Value
re.compile(r'-+')
_RE_KEBAB_SEP = (source)

Whitespace and underscore runs replaced by kebab-case separators.

Value
re.compile(r'[_\s]+')
_RE_NUMBERS = (source)

Characters excluded by numeric-character extraction.

Value
re.compile(r'\D')
_RE_PASCAL_WORDS = (source)

Word segments used by PascalCase pluralization.

Value
re.compile(r'[A-Z][a-z]*|[a-z]+')
_RE_SQUISH = (source)

Whitespace runs collapsed by squish.

Value
re.compile(r'\s+')
_RE_UCSPLIT = (source)

Uppercase-led words, lowercase words and digit runs for ucsplit.

Value
re.compile(r'[A-Z][a-z]*|[a-z]+|\d+')
_ULID_RE = (source)

Crockford Base32 encoding constrained to the 128-bit ULID range.

Value
re.compile(r'[0-7][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{25}')