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
Encapsulate and configure a Jinja2 Environment instance.
This is the single authorised class for configuring the underlying template engine. All loaders, caches, globals, filters, tests and extensions must be registered through the public methods of this class.
The Jinja2 Environment is built once during construction and
stored internally; no other class may access it directly except through
getJinjaEnvironment.
| Method | __init__ |
Build the Jinja2 environment from the application view configuration. |
| Method | add |
Register a Jinja2 extension class with the environment. |
| Method | add |
Register a filter callable that templates can apply with |. |
| Method | add |
Register a global variable or callable in all templates. |
| Method | add |
Register a test callable used in Jinja2 is expressions. |
| Method | get |
Return the configured Jinja2 Environment instance. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _jinja |
Undocumented |
Build the Jinja2 environment from the application view configuration.
| Parameters | |
app:IApplication | Application container used to read view configuration and resolve the base path for relative template directories. |
| Returns | |
None | Undocumented |
Register a Jinja2 extension class with the environment.
| Parameters | |
extension:Any | A Jinja2 Extension subclass or its dotted import path. |
| Returns | |
None | Undocumented |
| Raises | |
ViewException | When the extension cannot be registered by Jinja2. |
Return the configured Jinja2 Environment instance.
| Returns | |
jinja2.Environment | The internal Jinja2 environment. Treat as read-only outside this class; all mutations must flow through the typed helpers. |