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

Validate supported environment type hints before values are cast.

Class __ValidateTypes Validate supported environment type hints before values are cast.
Function _normalize_type_hint Normalize and validate a type hint, returning its canonical string value.
Constant _ALLOWED_TYPE_HINT_VALUES Pre-build allowed types list once — avoids repeated list comprehension in error paths.
@functools.lru_cache(maxsize=64)
def _normalize_type_hint(type_hint: str | EnvironmentValueType) -> str: (source)

Normalize and validate a type hint, returning its canonical string value.

Cached with lru_cache — type hints are a finite, known set so repeated calls with the same hint become O(1) dict lookups after the first call.

Parameters
type_hint:str or orionis.environment.enums.EnvironmentValueTypeThe type hint to normalize.
Returns
strThe canonical string value of the type hint.
Raises
RuntimeErrorIf the type hint string is not a valid EnvironmentValueType name.
_ALLOWED_TYPE_HINT_VALUES: list[str] = (source)

Pre-build allowed types list once — avoids repeated list comprehension in error paths.

Value
[e.value for e in EnvironmentValueType]