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

Create application files from packaged stubs.

Method createFile Render one stub into its configured application directory.
Method createFiles Create the files produced by this command.
Method getReplacements Read string replacements from the parsed command arguments.
Method getTemplateName Return the selected template name.
Async Method handle Create configured files without blocking the running event loop.
Class Variable arguments Undocumented
Class Variable path_key Undocumented
Class Variable postfix Undocumented
Class Variable prefix Undocumented
Class Variable replacement_arguments Undocumented
Class Variable success_label Undocumented
Class Variable template_name Undocumented
def createFile(self, app: IApplication, name: str, *, template_name: str | None = None, extension: str = 'py', replacements: dict[str, str] | None = None) -> str: (source)

Render one stub into its configured application directory.

Parameters
app:IApplicationApplication that resolves the destination path.
name:strFile name and optional nested directory path.
template_name:str | None, optionalStub override; the command's template is used when omitted.
extension:str, optionalGenerated source extension. Defaults to "py".
replacements:dict[str, str] | None, optionalPlaceholder values; command replacements are used when omitted.
Returns
strGenerated path relative to the application base directory.
Raises
OSErrorIf the generated file cannot be created.
TypeErrorIf the application path or replacement values are invalid.
ValueErrorIf the name or extension is invalid.
def createFiles(self, app: IApplication, name: str) -> tuple[tuple[str, str], ...]: (source)

Create the files produced by this command.

Parameters
app:IApplicationApplication that resolves the destination path.
name:strFile name and optional nested directory path.
Returns
tuple[tuple[str, str], ...]Success labels and generated application-relative paths.
def getReplacements(self) -> dict[str, str]: (source)

Read string replacements from the parsed command arguments.

Returns
dict[str, str]Template placeholders mapped to their argument values.
Raises
TypeErrorIf an argument mapped to a placeholder is not a string.
def getTemplateName(self) -> str: (source)

Return the selected template name.

Returns
strStub template name without its .stub suffix.
async def handle(self, app: IApplication): (source)

Create configured files without blocking the running event loop.

Parameters
app:IApplicationApplication that provides destination paths.
Returns
NoneWrite success or error details to the command output.