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 IBaseCommand(ABC): (source)

Known subclasses: orionis.console.base.BaseCommand

View In Hierarchy

Define the contract for base command implementations.

Method getArgument Retrieve the value of a command-line argument by key, with optional default.
Method getArguments Return all parsed command-line arguments and options.
Async Method handle Run the main logic for the command.
Method setArguments Set the internal arguments dictionary with parsed command-line arguments.
Class Variable arguments List of Argument instances defining command-line options and arguments.
Class Variable description Human-readable description for documentation and help display.
Class Variable signature Command signature string for registration and help text generation.
Class Variable timestamps Enable timestamps in console output by default.
def getArgument(self, key: str, default: Any = None) -> Any: (source)

Retrieve the value of a command-line argument by key, with optional default.

Parameters
key:strArgument name to retrieve.
default:typing.Any, optionalValue to return if key is not found. Defaults to None.
Returns
typing.AnyValue of the argument if found, else the default value.
Raises
ValueErrorIf key is not a string or internal arguments are not a dictionary.
def getArguments(self) -> dict[str, Any]: (source)

Return all parsed command-line arguments and options.

Provides direct access to the internal arguments dictionary for the command.

Returns
typing.Dict[str, typing.Any]The dictionary of all parsed arguments and options.
async def handle(self): (source)

Run the main logic for the command.

This method must be implemented by subclasses to define the command's behavior. It is called after argument parsing and validation.

Returns
NoneNo value is returned. Output should be handled via console methods.
Raises
NotImplementedErrorRaised if not implemented in a subclass.
def setArguments(self, args: dict[str, Any]): (source)

Set the internal arguments dictionary with parsed command-line arguments.

Parameters
args:typing.Dict[str, typing.Any]Dictionary of parsed command-line arguments and options.
Returns
NoneNo return value.
arguments: ClassVar[list[Argument]] = (source)

List of Argument instances defining command-line options and arguments.

description: ClassVar[str] = (source)

Human-readable description for documentation and help display.

Command signature string for registration and help text generation.

Enable timestamps in console output by default.