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
Define the metadata and execution hooks shared by console commands.
| Method | __init__ |
Initialize the BaseCommand instance. |
| Method | get |
Retrieve the value of a command-line argument. |
| Method | get |
Retrieve all parsed command-line arguments. |
| Async Method | handle |
Run the main logic for the command. |
| Method | set |
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. |
Initialize the BaseCommand instance.
Calls the superclass initializer and sets up the internal argument storage.
| Returns | |
None | This method does not return a value. |
Retrieve the value of a command-line argument.
| Parameters | |
key:str | The name of the argument to retrieve. |
default:typing.Any or None, optional | The value to return if the argument is not present. Defaults to None. |
| Returns | |
typing.Any or None | The value of the argument if present, otherwise the default value. |
Retrieve all parsed command-line arguments.
| Returns | |
dict[str, typing.Any] | A copy of the dictionary containing all parsed arguments. |
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 | |
None | No value is returned. Output should be handled via console methods. |
| Raises | |
NotImplementedError | Raised if not implemented in a subclass. |
Set the internal arguments dictionary with the provided arguments.
| Parameters | |
args:dict[str, typing.Any] | Dictionary containing parsed command-line arguments. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If the provided arguments are not a dictionary. |