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.

module documentation

Resolve a Granian development launch into shell-independent arguments.

Process execution consumes an argument list. Shell quoting applies only to exports.

Class ServeOptions Share resolved socket, logging and static settings across server strategies.
Function _child_environment Publish effective launcher settings to the supervisor and its workers.
Function _reload_arguments Build watcher options using absolute application paths.
Function build_launch Prepare native Granian arguments and an isolated child environment.
Function shell_command Quote a displayed command for PowerShell or a POSIX shell.
Function watch_paths Collect unique existing watch targets relative to the application root.
def _child_environment(app: IApplication, options: ServeOptions, targets: tuple[Path, ...]) -> dict[str, str]: (source)

Publish effective launcher settings to the supervisor and its workers.

Parameters
app:IApplicationApplication supplying its name and bootstrap timestamp.
options:ServeOptionsResolved configuration for this invocation.
targets:tuplePaths passed individually on the command line and as a native path list in the environment.
Returns
dict[str, str]Copy of the parent environment with matching Orionis and Granian settings.
def _reload_arguments(app: IApplication, targets: tuple[Path, ...]) -> list[str]: (source)

Build watcher options using absolute application paths.

Parameters
app:IApplicationApplication declaring source and generated storage locations.
targets:tupleEffective filesystem targets, empty when reload is disabled.
Returns
list[str]Flags and individual path arguments ready for Granian.
def build_launch(app: IApplication, options: ServeOptions, *, reload: bool) -> tuple[list[str], dict[str, str]]: (source)

Prepare native Granian arguments and an isolated child environment.

Parameters
app:IApplicationApplication supplying worker metadata, entry point and invalidation paths.
options:ServeOptionsSettings shared with the embedded server.
reload:boolWhether to watch the development sources for changes.
Returns
tuple[list[str], dict[str, str]]Ordered process arguments and the environment for the supervisor.
def shell_command(argv: list[str], *, windows: bool) -> str: (source)

Quote a displayed command for PowerShell or a POSIX shell.

Parameters
argv:list[str]Exact arguments passed to Granian.
windows:boolSelect PowerShell syntax for Windows.
Returns
strCopyable invocation preserving spaces, apostrophes and shell metacharacters.
def watch_paths(app: IApplication, root: Path) -> tuple[Path, ...]: (source)

Collect unique existing watch targets relative to the application root.

Parameters
app:IApplicationApplication supplying its compiled invalidation files and directories.
root:PathResolved application root used for relative paths and fallback.
Returns
tupleStable targets with descendants of watched directories omitted.