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

Known subclasses: orionis.view.factory.ViewFactory

View In Hierarchy

Contract for the view factory.

Callers use this interface to render named templates and receive fully formed HTMLResponse objects ready to return from HTTP controllers.

Method make Prepare a template render as an awaitable, chainable response.
Class Variable __slots__ Undocumented
def make(self, template: str, **context: Any) -> PendingView: (source)

Prepare a template render as an awaitable, chainable response.

Parameters
template:strTemplate name using dot notation (e.g. 'users.index') or a direct path relative to a configured template directory.
**context:AnyKeyword arguments are forwarded as template variables.
Returns
PendingViewAwaitable proxy that resolves to an HTMLResponse and accepts chained response mutators such as withFlash().
Raises
ViewTemplateNotFoundExceptionWhen the requested template file cannot be located.
ViewRenderExceptionWhen the template engine fails during rendering.
__slots__: tuple = (source)

Undocumented