ORIONIS API REFERENCE

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.

package documentation

Group the view globals components and public imports.

Module app Provide view globals operations through _global_app.
Module asset Provide view globals operations.
Module auth Provide view globals operations through _global_auth.
Module bcrypt Provide view globals operations through _global_encrypt, _global_decrypt.
Module cache Provide view globals operations through _global_cache.
Module collection Provide view globals operations through _global_collect.
Module config Provide view globals operations through _global_config.
Module csrf Provide view globals operations.
Module datetime Provide view globals operations through _global_now, _global_today.
Module dump Provide view globals operations through _global_dump.
Module errors Expose validation errors from the current request session.
Module flash Provide view globals operations through _global_flash.
Module lang Provide view globals operations.
Module old Provide view globals operations through _global_old.
Module request Provide view globals operations through _global_request.
Module route Provide view globals operations.
Module session Provide view globals operations through _global_session.
Module stringable Provide view globals operations through _global_stringable.
Module url Provide view globals operations.
Module version Provide view globals operations.

From __init__.py:

Function __dir__ List loaded attributes and declared public exports.
Function __getattr__ Resolve and cache a public package export.
Function _global_app Build the app template global.
Function _global_asset Build the async asset template global bound to the application.
Function _global_auth Build the auth template global.
Function _global_cache Build the cache template global.
Function _global_choice Build the choice template global.
Function _global_collect Build the collect template global.
Function _global_config Build the config template global bound to the application.
Function _global_csrf_field Build the async csrf_field template global bound to the application.
Function _global_csrf_token Build the async csrf_token template global bound to the application.
Function _global_decrypt Build the decrypt template global.
Function _global_dump Build the dump template global.
Function _global_encrypt Build the encrypt template global.
Function _global_errors Build the errors template global.
Function _global_flash Build the async flash template global.
Function _global_framework_version Build the framework_version template global.
Function _global_locale Build the locale template global.
Function _global_locales Build the locales template global.
Function _global_now Build the now template global.
Function _global_old Build the async old template global.
Function _global_python_version Build the python_version template global.
Function _global_request Build the async request template global.
Function _global_route Build the async route template global bound to the application.
Function _global_secure_asset Build the async secure_asset template global bound to the app.
Function _global_secure_url Build the async secure_url template global bound to the application.
Function _global_session Build the async session template global.
Function _global_stringable Build the stringable template global.
Function _global_today Build the today template global.
Function _global_trans Build the trans (and __) template global.
Function _global_url Build the async url template global bound to the application.
Constant _EXPORTS Public export names mapped to their defining modules and attributes.
Constant _LANG_MODULE Locate the shared translation global builders.
def __dir__() -> list[str]: (source)

List loaded attributes and declared public exports.

Returns
list[str]Sorted attribute names available on this package.
def __getattr__(name: str) -> object: (source)

Resolve and cache a public package export.

Parameters
name:strPublic attribute requested from this package.
Returns
objectExported object from its defining module.
Raises
AttributeErrorIf the requested attribute is not exported.
def _global_app(app: IApplication) -> Callable[[], IApplication]: (source)

Build the app template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
collections.abc.CallableCallable returning the application instance.
def _global_asset(app: IApplication) -> Callable[..., Awaitable[str]]: (source)

Build the async asset template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used to resolve the storage manager.
Returns
collections.abc.CallableAsync callable that builds the public URL of a stored file.
def _global_auth() -> Callable[[], type[Auth]]: (source)

Build the auth template global.

Returns
collections.abc.CallableCallable exposing the authentication facade without caching a user.
def _global_cache(app: IApplication) -> Callable[..., Awaitable[Any]]: (source)

Build the cache template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
collections.abc.CallableAsync callable reading the configured cache store.
def _global_choice() -> Callable[..., str]: (source)

Build the choice template global.

Returns
collections.abc.CallableCallable that translates a pluralized key based on a quantity.
def _global_collect() -> Callable[..., Collection]: (source)

Build the collect template global.

Returns
collections.abc.CallableCallable wrapping a value in the framework collection type.
def _global_config(app: IApplication) -> Callable[..., Any]: (source)

Build the config template global bound to the application.

Parameters
app:orionis.IApplicationApplication container providing configuration access.
Returns
collections.abc.CallableCallable that retrieves a dot-separated configuration key.
def _global_csrf_field(app: IApplication) -> Callable[[], Awaitable[Markup]]: (source)

Build the async csrf_field template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that returns a hidden input field with the CSRF token.
def _global_csrf_token(app: IApplication) -> Callable[[], Awaitable[str]]: (source)

Build the async csrf_token template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that reads the CSRF token from the session.
def _global_decrypt(app: IApplication) -> Callable[[str], Awaitable[str]]: (source)

Build the decrypt template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
collections.abc.CallableAsync callable decrypting payloads through the configured encrypter.
def _global_dump() -> Callable[..., Markup]: (source)

Build the dump template global.

Returns
collections.abc.CallableCallable dumping the given variables and returning safe HTML.
def _global_encrypt(app: IApplication) -> Callable[[str], Awaitable[str]]: (source)

Build the encrypt template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
collections.abc.CallableAsync callable encrypting plaintext through the configured encrypter.
def _global_errors(app: IApplication) -> ErrorBag: (source)

Build the errors template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
orionis.view.globals.errors.ErrorBagBag exposing the validation errors flashed for this request.
def _global_flash(app: IApplication) -> Callable[..., Awaitable[Any]]: (source)

Build the async flash template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that reads one-request status messages.
def _global_framework_version() -> Callable[[], str]: (source)

Build the framework_version template global.

Returns
collections.abc.CallableCallable that returns the framework version.
def _global_locale() -> Callable[[], str]: (source)

Build the locale template global.

Returns
collections.abc.CallableCallable that returns the active application locale.
def _global_locales() -> Callable[[], tuple[str, ...]]: (source)

Build the locales template global.

Returns
collections.abc.CallableCallable that returns every locale with a translation source.
def _global_now() -> Callable[[], pendulum.DateTime]: (source)

Build the now template global.

Returns
collections.abc.CallableCallable returning the current date and time.
def _global_old(app: IApplication) -> Callable[..., Awaitable[Any]]: (source)

Build the async old template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that reads the previously submitted form input.
def _global_python_version() -> Callable[[], str]: (source)

Build the python_version template global.

Returns
collections.abc.CallableCallable that returns the Python version.
def _global_request(app: IApplication) -> Callable[[], Awaitable[IRequest | None]]: (source)

Build the async request template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that resolves the current HTTP request.
def _global_route(app: IApplication) -> Callable[..., Awaitable[str]]: (source)

Build the async route template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that builds the URL of a named route.
def _global_secure_asset(app: IApplication) -> Callable[..., Awaitable[str]]: (source)

Build the async secure_asset template global bound to the app.

Parameters
app:orionis.IApplicationApplication container used to resolve the storage manager.
Returns
collections.abc.CallableAsync callable that builds the HTTPS URL of a stored file.
def _global_secure_url(app: IApplication) -> Callable[..., Awaitable[str]]: (source)

Build the async secure_url template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that builds an HTTPS URL from a path.
def _global_session(app: IApplication) -> Callable[[], Awaitable[ISession | None]]: (source)

Build the async session template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that resolves the current session.
def _global_stringable() -> Callable[..., Stringable]: (source)

Build the stringable template global.

Returns
collections.abc.CallableCallable wrapping a value in a orionis.support.types.Stringable instance.
def _global_today() -> Callable[[], pendulum.DateTime]: (source)

Build the today template global.

Returns
collections.abc.CallableCallable returning the current date at midnight.
def _global_trans() -> Callable[..., str]: (source)

Build the trans (and __) template global.

Returns
collections.abc.CallableCallable that translates a key for a given or the active locale.
def _global_url(app: IApplication) -> Callable[..., Awaitable[str]]: (source)

Build the async url template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
collections.abc.CallableAsync callable that builds a URL from a path.
_EXPORTS = (source)

Public export names mapped to their defining modules and attributes.

Value
{'_global_app': ('orionis.view.globals.app', '_global_app'),
 '_global_asset': ('orionis.view.globals.asset', '_global_asset'),
 '_global_auth': ('orionis.view.globals.auth', '_global_auth'),
 '_global_cache': ('orionis.view.globals.cache', '_global_cache'),
 '_global_choice': (_LANG_MODULE, '_global_choice'),
 '_global_collect': ('orionis.view.globals.collection', '_global_collect'),
 '_global_config': ('orionis.view.globals.config', '_global_config'),
...
_LANG_MODULE: str = (source)

Locate the shared translation global builders.

Value
'orionis.view.globals.lang'