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.

class documentation

class _IsValidLevel: (source)

View In Hierarchy

Validate if a value is a valid logging level.

This validator checks if the provided value is a valid logging level. Accepted types are int, str, or Level enum.

Method __call__ Validate a logging level without returning its normalized value.
Method normalize Normalize a logging level to its integer representation.
Class Variable __slots__ Undocumented
Instance Variable _level_names Valid logging level names.
Instance Variable _level_values Valid logging level integer values.
def __call__(self, value: Level | int | str): (source)

Validate a logging level without returning its normalized value.

Parameters
value:Level | int | strValue to validate as a logging level. Can be int, str, or Level enum.
Returns
NoneThis method does not return a value. It raises an exception if validation fails.
Raises
ValueErrorIf the value is not a valid logging level.
TypeErrorIf the value is not of an accepted type (int, str, or Level).
def normalize(self, value: Level | int | str) -> int: (source)

Normalize a logging level to its integer representation.

Parameters
value:Level | int | strThe logging level to normalize. Can be an integer, string, or Level enum.
Returns
intThe numeric representation of the logging level.
Raises
ValueErrorIf the value is not a valid logging level.
TypeErrorIf the value is not of an accepted type (int, str, or Level).
__slots__: tuple = (source)

Undocumented

_level_names: frozenset[str] = (source)

Valid logging level names.

_level_values: frozenset[int] = (source)

Valid logging level integer values.