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

Undocumented

Method __init__ Initialize ExceptionParser with an exception instance.
Method _getSourceCode Extract source code lines around a specific line number from a file.
Method _parseStack Parse stack trace summary into frame dictionaries.
Method toDict Serialize exception details into a dictionary.
Class Variable __slots__ Undocumented
Instance Variable _cache Undocumented
Instance Variable _error_code Undocumented
Instance Variable _exc_type Undocumented
Instance Variable _tb Undocumented
def __init__(self, exception: Exception): (source)

Initialize ExceptionParser with an exception instance.

Eagerly parses the exception traceback and metadata on construction so repeated calls to toDict() pay no extra CPU cost.

Parameters
exception:ExceptionException to be parsed and formatted.
Returns
NoneComplete the documented operation without returning a value.
def _getSourceCode(self, filename: str | None, lineno: int | None) -> tuple[list[int], list[str]]: (source)

Extract source code lines around a specific line number from a file.

Reuses cached file lines and builds the requested source window.

Parameters
filename:str | NonePath to the source file to read from.
lineno:int | NoneLine number to center the code extraction around.
Returns
tuple[list[int], list[str]]Tuple containing line numbers and corresponding source code lines.
def _parseStack(self, stack: traceback.StackSummary | list) -> list[dict[str, Any]]: (source)

Parse stack trace summary into frame dictionaries.

Iterate over the stack in reverse to produce the most-recent-first order. FrameSummary attributes are provided by the traceback contract.

Parameters
stack:traceback.StackSummary | listStack trace summary or an empty list.
Returns
list[dict[str, Any]]List of frame dicts ordered most-recent first.
def toDict(self) -> dict[str, Any]: (source)

Serialize exception details into a dictionary.

The result is cached after the first call; subsequent calls return the same dict with no additional computation.

Returns
dict[str, Any]Dictionary with keys: - 'error_type': str, type of the exception. - 'error_message': str, formatted traceback string. - 'error_code': Any, custom error code if present. - 'stack_trace': list[dict], frame details.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

_error_code: Any = (source)

Undocumented

_exc_type: str = (source)

Undocumented

Undocumented