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.
Awaitable, chainable result of IViewFactory.make.
Rendering is deferred until the object is awaited, so response mutators such as withInput(), withErrors(), withFlash() or withCookie() can be chained directly on the make() call:
return await View.make("auth.login").withErrors(errors)
Every attribute that exists on HTMLResponse is accepted and
replayed on the real response once the template has been rendered.
| Method | __await__ |
Render the template and apply every queued mutation. |
| Async Method | __flash |
Write the queued flash data into the active session. |
| Method | __getattr__ |
Queue a HTMLResponse call to replay after rendering. |
| Method | __init__ |
Store the rendering intent without performing any work. |
| Async Method | render |
Render the template into a fully formed HTMLResponse. |
| Method | with |
Flash validation errors so the errors global can read them. |
| Method | with |
Flash a status message into the session before rendering. |
| Method | with |
Flash the submitted payload so old() can repopulate the form. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _context |
Undocumented |
| Instance Variable | _engine |
Undocumented |
| Instance Variable | _flash |
Undocumented |
| Instance Variable | _mutations |
Undocumented |
| Instance Variable | _template |
Undocumented |
Render the template and apply every queued mutation.
| Returns | |
Generator[Any, None, HTMLResponse] | Generator yielding control until the response is ready. |
Write the queued flash data into the active session.
Silently skips when no session is available, e.g. on routes without the session middleware.
| Returns | |
None | Undocumented |
Queue a HTMLResponse call to replay after rendering.
| Parameters | |
name:str | Name of the response method being chained. |
| Returns | |
Callable[..., PendingView] | Callable that records the invocation and returns self. |
| Raises | |
AttributeError | If HTMLResponse exposes no callable named name. |
Render the template into a fully formed HTMLResponse.
| Returns | |
HTMLResponse | An HTTP response whose body is the rendered HTML content. |
| Raises | |
ViewTemplateNotFoundException | When the view file cannot be located. |
ViewRenderException | When rendering fails for any reason. |
Flash validation errors so the errors global can read them.
| Parameters | |
errors:Mapping[str, Any] | Exception | Mapping of field to message(s), or a validation exception. |
| Returns | |
PendingView | The same pending view, allowing fluent chaining. |
Flash a status message into the session before rendering.
Writing happens ahead of rendering so this very view can read the value back through the flash() global, and it remains available for the next request.
| Parameters | |
key:str | Flash data key. |
value:Any, optional | Value to flash. |
| Returns | |
PendingView | The same pending view, allowing fluent chaining. |
Flash the submitted payload so old() can repopulate the form.
Credential-like fields such as password are stripped.
| Parameters | |
values:Mapping[str, Any] | Submitted form payload to remember. |
| Returns | |
PendingView | The same pending view, allowing fluent chaining. |