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
Render named templates and return HTMLResponse objects.
ViewFactory is the primary entry-point for controllers and
other HTTP-layer code that needs to produce HTML responses from
templates. It delegates all rendering work to the bound
IViewEngine and wraps the output in a framework-native
HTMLResponse.
| Method | __init__ |
Initialise the factory with a rendering engine. |
| Method | make |
Prepare a template render as an awaitable, chainable response. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _engine |
Undocumented |
Initialise the factory with a rendering engine.
| Parameters | |
engine:IViewEngine | The view engine used to render templates. |
| Returns | |
None | Undocumented |
Prepare a template render as an awaitable, chainable response.
| Parameters | |
template:str | Template name using dot notation (e.g. 'users.index') or a relative path (e.g. 'users/index.html'). |
**context:Any | Keyword arguments forwarded as template variables. |
| Returns | |
PendingView | Awaitable proxy that renders the template on await and accepts chained response mutators such as withInput(), withErrors(), withFlash(), withCookie() or withoutCookie(). |
| Raises | |
ViewTemplateNotFoundException | When the view file cannot be located. |
ViewRenderException | When rendering fails for any reason. |