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 Reactor instance for command discovery and management.
Method __parseCommandArgs Parse command-line arguments for a command using its ArgumentParser.
Async Method call Execute a registered command by its signature.
Method command Register a fluent command with the given signature and handler.
Async Method hasCommand Check whether a command signature is registered.
Async Method info Return registered commands metadata.
Instance Variable __app Undocumented
Instance Variable __cache_info Undocumented
Instance Variable __catch Undocumented
Instance Variable __executer Undocumented
Instance Variable __loader Undocumented
Instance Variable __logger Undocumented
Instance Variable __performance_counter Undocumented
def __init__(self, app: IApplication, loader: Loader, executer: Executor, logger: ILogger, catch: ICatch, performance_counter: PerformanceCounter): (source)

Initialize Reactor instance for command discovery and management.

Set up the command processing environment, establish the application context, and initialize internal registries for command lookup and execution.

Parameters
app:IApplicationApplication instance for command processing.
loader:LoaderLoader instance for managing command loading.
executer:ExecutorExecutor instance for managing command output.
logger:ILoggerLogger instance for logging command execution details.
catch:ICatchCatch instance for handling exceptions.
performance_counter:PerformanceCounterPerformanceCounter instance for measuring command execution time.
Returns
NoneThis constructor does not return any value.
def __parseCommandArgs(self, command: Command, args: list[str] | None = None) -> dict: (source)

Parse command-line arguments for a command using its ArgumentParser.

Parameters
command:CommandCommand object containing the argument parser and metadata.
args:Optional[list[str]], default NoneList of command-line arguments to parse. If None, an empty list is used.
Returns
dictDictionary with parsed argument names and values. Returns an empty dict if no arguments are expected or provided.
Raises
SystemExitRaised by argparse if argument parsing fails or help is requested.
RuntimeErrorRaised if argument parsing fails for reasons other than SystemExit.
async def call(self, signature: str, args: list[str] | None = None) -> int: (source)

Execute a registered command by its signature.

Parameters
signature:strCommand signature to execute.
args:list of str or None, optionalArguments to pass to the command.
Returns
intThe output produced by the command execution.
Raises
ValueErrorIf the command is not found.
ExceptionIf command execution fails.
def command(self, signature: str, handler: list[type[Any] | str | None] | str) -> ICommand: (source)

Register a fluent command with the given signature and handler.

Parameters
signature:strCommand signature to register.
handler:list[type[Any] | str | None] | strHandler class and optional method name.
Returns
ICommandThe registered command instance.
async def hasCommand(self, signature: str) -> bool: (source)

Check whether a command signature is registered.

Parameters
signature:strCommand signature to look up.
Returns
boolWhether the signature identifies a registered command.
async def info(self) -> list[dict]: (source)

Return registered commands metadata.

Retrieve all loaded commands from the internal registry, skipping internal commands (those with double underscores). Each command is represented as a dictionary containing its signature and description.

Returns
list of dictList of dictionaries with 'signature' and 'description' for each command.

Undocumented

__cache_info: list[dict] | None = (source)

Undocumented

Undocumented

__executer = (source)

Undocumented

__loader = (source)

Undocumented

__logger = (source)

Undocumented

__performance_counter = (source)

Undocumented