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

Constructor: Bootstrapper(app)

View In Hierarchy

Plan bootstrap integration before creating optional project resources.

Static Method _validateRoute Check existing routes with the same import rules as Application.
Method __init__ Store the configured application.
Method _directory Create a directory without changing existing resources.
Method _editor Find the source recorded by Application.create.
Method _file Create a template exclusively, preserving existing file bytes.
Method _routingPaths Reconcile declared routes with the loaded application registry.
Method lifespan Create and register native lifecycle callbacks before application boot.
Method routing Enable one routing context using the application's effective paths.
Instance Variable app Application providing effective routes and component paths.
def _validateRoute(path: Path): (source)

Check existing routes with the same import rules as Application.

Parameters
path:pathlib.PathRoute file to preserve and register if valid.
Returns
NoneAccept a missing file or validate the existing routing module.
Raises
ValueErrorIf the existing resource cannot be loaded as a routing module.
SyntaxErrorIf existing Python source cannot be compiled.
def __init__(self, app: IApplication): (source)

Store the configured application.

Parameters
app:orionis.IApplicationApplication providing effective routes and component paths.
Returns
NoneStore the application used by subsequent bootstrap operations.
def _directory(self, path: Path) -> tuple[str, str]: (source)

Create a directory without changing existing resources.

Parameters
path:pathlib.PathEffective component directory.
Returns
tuple[str, str]Action and resource path for Reactor output.
def _editor(self) -> BootstrapEditor: (source)

Find the source recorded by Application.create.

Returns
orionis.console.commands.bootstrap._editor.BootstrapEditorEditor for the effective entry point or conventional bootstrap file.
Raises
FileNotFoundErrorIf the application bootstrap source cannot be found.
def _file(self, path: Path, content: str) -> tuple[str, str]: (source)

Create a template exclusively, preserving existing file bytes.

Parameters
path:pathlib.PathExact effective target, including its original filename.
content:strRendered Python template.
Returns
tuple[str, str]Action and resource path for Reactor output.
Raises
ValueErrorIf the target exists but is not a regular file.
def _routingPaths(self, editor: BootstrapEditor, context: str) -> list[Path]: (source)

Reconcile declared routes with the loaded application registry.

Parameters
editor:orionis.console.commands.bootstrap._editor.BootstrapEditorSafely identified application bootstrap.
context:strContext whose effective files are required.
Returns
list[pathlib.Path]Effective route files or the context's default destination.
Raises
ValueErrorIf declared and effective routing cannot be reconciled safely.
def lifespan(self) -> list[tuple[str, str]]: (source)

Create and register native lifecycle callbacks before application boot.

Returns
list[tuple[str, str]]Resource actions and the bootstrap integration result.
Raises
ValueErrorIf an existing lifespan file does not expose its registration entry.
def routing(self, context: str) -> list[tuple[str, str]]: (source)

Enable one routing context using the application's effective paths.

Parameters
context:strAPI, AI, console, web, or websocket routing context.
Returns
list[tuple[str, str]]Resource actions, followed by the bootstrap integration result.
Raises
ValueErrorIf the context or bootstrap structure is unsafe.

Application providing effective routes and component paths.