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 dependencies declared by the application's project manifest.

Static Method __dependencyTable Validate a manifest table containing dependency declarations.
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 __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 dependencies in the interpreter running Reactor.
Class Variable __slots__ Undocumented
Class Variable arguments Undocumented
Class Variable description Undocumented
Class Variable signature Undocumented
Class Variable timestamps Undocumented
Instance Variable _console Undocumented
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 __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: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: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 __renderOptions(self, project_path: Path, options: dict[str, tuple[str, ...]]): (source)

Render a compact catalog with one row per installation option.

Parameters
project_path:PathManifest supplying the catalog.
options:dict[str, tuple[str, ...]]Namespaced installation options.
Returns
NonePrint project metadata and a compact Rich dependency table.
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: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
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 dependencies in the interpreter running Reactor.

Parameters
app: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)

Undocumented

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

Undocumented

description: str = (source)

Undocumented

signature: str = (source)

Undocumented

timestamps: bool = (source)

Undocumented

_console = (source)

Undocumented