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 BaseCommand(Console, IBaseCommand): (source)

Constructor: BaseCommand()

View In Hierarchy

Define the metadata and execution hooks shared by console commands.

Method __init__ Initialize the BaseCommand instance.
Method getArgument Retrieve the value of a command-line argument.
Method getArguments Retrieve all parsed command-line arguments.
Async Method handle Run the main logic for the command.
Method setArguments Set the internal arguments dictionary with the provided 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.
Instance Variable __arguments__ Initialize internal argument storage for parsed CLI arguments.
def __init__(self): (source)

Initialize the BaseCommand instance.

Calls the superclass initializer and sets up the internal argument storage.

Returns
NoneThis method does not return a value.
def getArgument(self, key: str, default: Any | None = None) -> Any | None: (source)

Retrieve the value of a command-line argument.

Parameters
key:strThe name of the argument to retrieve.
default:typing.Any or None, optionalThe value to return if the argument is not present. Defaults to None.
Returns
typing.Any or NoneThe value of the argument if present, otherwise the default value.
def getArguments(self) -> dict[str, Any]: (source)

Retrieve all parsed command-line arguments.

Returns
dict[str, typing.Any]A copy of the dictionary containing all parsed arguments.
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 the provided arguments.

Parameters
args:dict[str, typing.Any]Dictionary containing parsed command-line arguments.
Returns
NoneThis method does not return a value.
Raises
TypeErrorIf the provided arguments are not a dictionary.
arguments: ClassVar[list[Argument]] = (source)

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

description: str = (source)

Human-readable description for documentation and help display.

signature: str = (source)

Command signature string for registration and help text generation.

timestamps: bool = (source)

Enable timestamps in console output by default.

__arguments__: dict[str, Any] = (source)

Initialize internal argument storage for parsed CLI arguments.