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
Plan bootstrap integration before creating optional project resources.
| Static Method | _validate |
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 | _routing |
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. |
Check existing routes with the same import rules as Application.
| Parameters | |
path:pathlib.Path | Route file to preserve and register if valid. |
| Returns | |
None | Accept a missing file or validate the existing routing module. |
| Raises | |
ValueError | If the existing resource cannot be loaded as a routing module. |
SyntaxError | If existing Python source cannot be compiled. |
Store the configured application.
| Parameters | |
app:orionis.IApplication | Application providing effective routes and component paths. |
| Returns | |
None | Store the application used by subsequent bootstrap operations. |
Create a directory without changing existing resources.
| Parameters | |
path:pathlib.Path | Effective component directory. |
| Returns | |
tuple[str, str] | Action and resource path for Reactor output. |
Find the source recorded by Application.create.
| Returns | |
orionis.console.commands.bootstrap._editor.BootstrapEditor | Editor for the effective entry point or conventional bootstrap file. |
| Raises | |
FileNotFoundError | If the application bootstrap source cannot be found. |
Create a template exclusively, preserving existing file bytes.
| Parameters | |
path:pathlib.Path | Exact effective target, including its original filename. |
content:str | Rendered Python template. |
| Returns | |
tuple[str, str] | Action and resource path for Reactor output. |
| Raises | |
ValueError | If the target exists but is not a regular file. |
Reconcile declared routes with the loaded application registry.
| Parameters | |
editor:orionis.console.commands.bootstrap._editor.BootstrapEditor | Safely identified application bootstrap. |
context:str | Context whose effective files are required. |
| Returns | |
list[pathlib.Path] | Effective route files or the context's default destination. |
| Raises | |
ValueError | If declared and effective routing cannot be reconciled safely. |
Create and register native lifecycle callbacks before application boot.
| Returns | |
list[tuple[str, str]] | Resource actions and the bootstrap integration result. |
| Raises | |
ValueError | If an existing lifespan file does not expose its registration entry. |