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

View In Hierarchy

Remove generated optimization artifacts from the application.

Method __clearBuildArtifacts Remove top-level build output and package metadata directories.
Method __clearBytecode Remove bytecode directories and standalone bytecode files.
Method __clearCompiledCaches Remove framework-owned compiled state cache files.
Method __removePath Remove one file, directory, or symbolic link and record failures.
Method __reportCleanup Write a cleanup summary and any filesystem errors to the console.
Method handle Clear generated bytecode, build artifacts, and compiled caches.
Class Variable description Undocumented
Class Variable signature Undocumented
Class Variable timestamps Undocumented
def __clearBuildArtifacts(self, base_path: Path) -> tuple[int, list[str]]: (source)

Remove top-level build output and package metadata directories.

Parameters
base_path:PathApplication root containing generated build artifacts.
Returns
tuple[int, list[str]]Number of removed paths and filesystem errors encountered.
def __clearBytecode(self, base_path: Path) -> tuple[int, list[str]]: (source)

Remove bytecode directories and standalone bytecode files.

Parameters
base_path:PathRoot directory walked while virtual environments are excluded.
Returns
tuple[int, list[str]]Number of removed paths and filesystem errors encountered.
def __clearCompiledCaches(self, app: IApplication) -> tuple[int, list[str]]: (source)

Remove framework-owned compiled state cache files.

Parameters
app:IApplicationApplication providing the configured compiled cache path.
Returns
tuple[int, list[str]]Number of removed cache files and filesystem errors encountered.
def __removePath(self, path: Path, errors: list[str]) -> bool: (source)

Remove one file, directory, or symbolic link and record failures.

Parameters
path:PathFilesystem path to remove.
errors:list[str]List updated with a description when removal fails.
Returns
boolWhether an existing path was removed successfully.
def __reportCleanup(self, console: Console, label: str, removed_count: int, errors: list[str]): (source)

Write a cleanup summary and any filesystem errors to the console.

Parameters
console:ConsoleConsole used to display the summary and errors.
label:strName of the cleanup group.
removed_count:intNumber of paths successfully removed.
errors:list[str]Filesystem errors encountered by the cleanup group.
Returns
NoneWrite the cleanup details to the console.
def handle(self, app: IApplication, console: Console) -> int: (source)

Clear generated bytecode, build artifacts, and compiled caches.

Parameters
app:IApplicationApplication providing the project and cache paths.
console:ConsoleConsole used to report cleanup results and failures.
Returns
intZero when every cleanup succeeds; one when a path cannot be removed.
description: str = (source)

Undocumented

signature: str = (source)

Undocumented

timestamps: bool = (source)

Undocumented