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 IViewFactory(ABC): (source)
Known subclasses: orionis.view.factory.ViewFactory
Contract for the view factory.
Callers receive a orionis.view.pending.PendingView synchronously.
Await that value to render a named template and obtain an
orionis.http.HTMLResponse ready to return from an HTTP controller.
| Method | make |
Prepare a template render as an awaitable, chainable response. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
str, *, status_code: HTTPStatus | int = 200, headers: Mapping[ str, str] | None = None, background: BackgroundTask | None = None, context: Mapping[ str, Any] | None = None, **variables: Any) -> PendingView:
(source)
¶
orionis.view.factory.ViewFactoryPrepare a template render as an awaitable, chainable response.
Notes
Template lookup and rendering errors are raised when the returned value is awaited, rather than when this method prepares it. Response options are also validated on await; chained mutations are applied after the initial options, in call order.
| Parameters | |
template:str | Template name using dot notation (e.g. 'users.index') or a direct path relative to a configured template directory. |
statusorionis.http.enums.HTTPStatus | int, optional | HTTP status code for the rendered response. |
headers:collections.abc.Mapping[str, str] | None, optional | Response headers. The SSR marker is added when not supplied. |
background:orionis.background.BackgroundTask | None, optional | Task to run after the response is sent. |
context:collections.abc.Mapping[str, typing.Any] | None, optional | Template variables, including names reserved for response options. |
**variables:typing.Any | Additional template variables, overriding matching context entries. |
| Returns | |
orionis.view.pending.PendingView | Awaitable proxy that resolves to an orionis.http.HTMLResponse and
accepts chained response mutators such as withStatusCode() and
withFlash(). |
| Raises | |
TypeError | If context is neither a mapping nor None. |
orionis.view.factory.ViewFactoryDeclare that this class introduces no additional instance slots.