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
Expose validation errors from the current request session.
Exposed to templates as the errors global. Every method is a coroutine, which Jinja2 awaits transparently in async environments:
{% if errors.any() %}{{ errors.first('email') }}{% endif %}
| Method | __init__ |
Bind the bag to the application container. |
| Async Method | __resolve |
Return the flashed error mapping, or an empty mapping. |
| Async Method | all |
Return every error grouped by field. |
| Async Method | any |
Report whether at least one field failed validation. |
| Async Method | first |
Return the first message for field, or the first of any field. |
| Async Method | get |
Return every message recorded for field. |
| Async Method | has |
Report whether field has at least one error. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _app |
Application container used for service resolution. |
Bind the bag to the application container.
| Parameters | |
app:orionis.IApplication | Application container used for service resolution. |
| Returns | |
None | No return value. |
Return the first message for field, or the first of any field.
| Parameters | |
field:str | None, optional | Form field name. When omitted, the first message of the whole bag is returned, which suits a single summary line. |
| Returns | |
str | The message, or an empty string when there is none. |