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 InstallCommand(BaseCommand): (source)

Constructor: InstallCommand()

View In Hierarchy

Install optional features declared by the resolved project manifest.

Static Method __dependencyTable Validate a manifest table containing dependency declarations.
Static Method __projectPath Prefer the framework manifest over the application's fallback manifest.
Static Method __requirements Validate and deduplicate a list of package requirements.
Static Method __resolveOption Resolve a catalog number, namespaced key or unambiguous name.
Method __init__ Initialize the command arguments and Rich output.
Async Method __installSelection Confirm and install all requirements from the selected options.
Method __loadOptions Read extras and expand dependency groups from a TOML manifest.
Method __loadPurposes Read human-readable purposes for the installation options.
Method __optionPurpose Describe an option without exposing its package requirements.
Method __renderOptions Render a compact catalog with one row per installation option.
Method __resolveGroup Expand included dependency groups and reject recursive references.
Async Method __runInstaller Run uv against the current Python environment without a shell.
Method __selectOptions Read explicit options or ask for an interactive selection.
Async Method handle List and install optional features in the interpreter running Reactor.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Class Variable arguments Command-line argument declarations accepted by this command.
Class Variable description Install optional Orionis features and development tools..
Class Variable signature packages.
Class Variable timestamps Timestamps flag used by InstallCommand.
Instance Variable _console Console produced by RichConsole.
Instance Variable _purposes Human-readable descriptions of installable extras and dependency groups.
def __dependencyTable(value: object, origin: str) -> dict[str, object]: (source)

Validate a manifest table containing dependency declarations.

Parameters
value:objectParsed TOML value expected to be a table.
origin:strManifest section used in error messages.
Returns
dict[str, object]Validated dependency table.
Raises
TypeErrorIf the section is not a TOML table.
def __projectPath(application_root: Path) -> Path: (source)

Prefer the framework manifest over the application's fallback manifest.

Parameters
application_root:pathlib.PathApplication directory used when no framework manifest is available.
Returns
pathlib.PathBundled framework manifest, source manifest or application fallback.
def __requirements(entries: object, origin: str) -> tuple[str, ...]: (source)

Validate and deduplicate a list of package requirements.

Parameters
entries:objectParsed dependency list.
origin:strOption used in error messages.
Returns
tuple[str, ...]Nonempty requirement strings in declaration order.
Raises
ValueErrorIf the declaration is not a list of nonempty strings.
def __resolveOption(token: str, keys: tuple[str, ...]) -> str: (source)

Resolve a catalog number, namespaced key or unambiguous name.

Parameters
token:strSelection supplied by the user.
keys:tuple[str, ...]Available keys in the order displayed by the catalog.
Returns
strCanonical installation option key.
Raises
ValueErrorIf a number is out of range or a name is unknown or ambiguous.
def __init__(self): (source)

Initialize the command arguments and Rich output.

Returns
NoneInitialize the console used for the installation interface.
async def __installSelection(self, project_root: Path, options: dict[str, tuple[str, ...]], selected: list[str]) -> int: (source)

Confirm and install all requirements from the selected options.

Parameters
project_root:pathlib.PathWorking directory for relative package references.
options:dict[str, tuple[str, ...]]Available dependency requirements.
selected:list[str]Canonical keys chosen by the user.
Returns
intInstaller status, zero for cancellation or an empty selection, or one when non-interactive confirmation is missing.
Raises
EOFErrorIf interactive confirmation input is closed.
KeyboardInterruptIf the user interrupts the confirmation prompt.
OSErrorIf the installer process cannot be started.
def __loadOptions(self, project_path: Path) -> dict[str, tuple[str, ...]]: (source)

Read extras and expand dependency groups from a TOML manifest.

Parameters
project_path:pathlib.PathApplication manifest to read.
Returns
dict[str, tuple[str, ...]]Namespaced options and their deduplicated package requirements.
Raises
OSErrorIf the manifest cannot be read.
TypeErrorIf a dependency section has an invalid TOML type.
ValueErrorIf TOML, dependency values or group references are invalid.
def __loadPurposes(self, manifest: dict[str, object]) -> dict[str, str]: (source)

Read human-readable purposes for the installation options.

Parameters
manifest:dict[str, object]Parsed project manifest containing optional catalog descriptions.
Returns
dict[str, str]Descriptions keyed by the extra or dependency-group namespace.
Raises
TypeErrorIf the catalog configuration is not a TOML table.
ValueErrorIf a purpose is not a nonempty string.
def __optionPurpose(self, key: str) -> str: (source)

Describe an option without exposing its package requirements.

Parameters
key:strNamespaced extra or dependency-group key.
Returns
strConfigured purpose or a generic description for an unknown option.
def __renderOptions(self, project_path: Path, options: dict[str, tuple[str, ...]]): (source)

Render a compact catalog with one row per installation option.

Parameters
project_path:pathlib.PathManifest supplying the catalog.
options:dict[str, tuple[str, ...]]Namespaced installation options.
Returns
NonePrint project metadata and a compact Rich feature catalog.
def __resolveGroup(self, name: str, groups: dict[str, object], chain: tuple[str, ...]) -> tuple[str, ...]: (source)

Expand included dependency groups and reject recursive references.

Parameters
name:strDependency group to expand.
groups:dict[str, object]All dependency groups declared by the manifest.
chain:tuple[str, ...]Groups already visited in this expansion.
Returns
tuple[str, ...]Deduplicated requirements including referenced groups.
Raises
TypeErrorIf the group does not declare a list of dependencies.
ValueErrorIf a group is missing, cyclic or contains an invalid declaration.
async def __runInstaller(self, project_root: Path, requirements: tuple[str, ...]) -> int: (source)

Run uv against the current Python environment without a shell.

Parameters
project_root:pathlib.PathWorking directory used to resolve local dependency references.
requirements:tuple[str, ...]Requirement strings passed unchanged as individual arguments.
Returns
intZero on success, one when uv is missing or terminated by a signal, or the positive exit code reported by uv.
Raises
asyncio.CancelledErrorIf execution is canceled after stopping and waiting for the child.
OSErrorIf uv cannot be started.
def __selectOptions(self, options: dict[str, tuple[str, ...]]) -> list[str]: (source)

Read explicit options or ask for an interactive selection.

Parameters
options:dict[str, tuple[str, ...]]Available namespaced installation options.
Returns
list[str]Unique option keys, or an empty list for a canceled selection.
Raises
EOFErrorIf interactive input is closed.
KeyboardInterruptIf the user interrupts the prompt.
ValueErrorIf an option is unknown or ambiguous.
async def handle(self, app: IApplication) -> int: (source)

List and install optional features in the interpreter running Reactor.

Parameters
app:orionis.IApplicationApplication providing the project root.
Returns
intZero on success or a declined selection, 130 on interruption, or a nonzero status when validation or installation fails.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

arguments: ClassVar[list[Argument]] = (source)

Command-line argument declarations accepted by this command.

description: str = (source)

Install optional Orionis features and development tools..

signature: str = (source)

packages.

timestamps: bool = (source)

Timestamps flag used by InstallCommand.

_console = (source)

Console produced by RichConsole.

_purposes: dict[str, str] = (source)

Human-readable descriptions of installable extras and dependency groups.