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

Known subclasses: orionis.view.engine.Jinja2Engine

View In Hierarchy

Contract for view engine implementations.

All rendering engines registered with the view system must implement this interface so that the rest of the framework remains decoupled from any concrete template technology.

Async Method render Render a template with the supplied context and return HTML.
Class Variable __slots__ Undocumented
async def render(self, template: str, context: dict[str, Any]) -> str: (source)

Render a template with the supplied context and return HTML.

Parameters
template:strTemplate identifier. Engines are free to interpret this string (e.g. dot notation 'users.index' or a bare filename).
context:dict[str, Any]Mapping of variable names to values made available inside the template during rendering.
Returns
strThe rendered HTML string produced by the engine.
Raises
ViewTemplateNotFoundExceptionWhen the requested template file cannot be located.
ViewRenderExceptionWhen the template engine fails to render the template.
__slots__: tuple = (source)

Undocumented