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 Read-only view over the validation errors flashed for this request.
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.
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) -> Any: (source)

Build the app template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
typing.AnyCallable returning the application instance.
def _global_asset(app: IApplication) -> Any: (source)

Build the async asset template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used to resolve the storage manager.
Returns
typing.AnyAsync 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.Callable[[], type[orionis.support.facades.Auth]]Callable exposing the authentication facade without caching a user.
def _global_cache(app: IApplication) -> Any: (source)

Build the cache template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
typing.AnyCallable returning the application instance.
def _global_choice() -> Any: (source)

Build the choice template global.

Returns
typing.AnyCallable that translates a pluralized key based on a quantity.
def _global_collect() -> Any: (source)

Build the collect template global.

Returns
typing.AnyCallable wrapping a value in a collections.abc.Collection instance.
def _global_config(app: IApplication) -> Any: (source)

Build the config template global bound to the application.

Parameters
app:orionis.IApplicationApplication container providing configuration access.
Returns
typing.AnyCallable that retrieves a dot-separated configuration key.
def _global_csrf_field(app: IApplication) -> Any: (source)

Build the async csrf_field template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that returns a hidden input field with the CSRF token.
def _global_csrf_token(app: IApplication) -> Any: (source)

Build the async csrf_token template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that reads the CSRF token from the session.
def _global_decrypt(app: IApplication) -> Any: (source)

Build the decrypt template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
typing.AnyCallable returning the application instance.
def _global_dump() -> Any: (source)

Build the dump template global.

Returns
typing.AnyCallable dumping the given variables and returning safe HTML.
def _global_encrypt(app: IApplication) -> Any: (source)

Build the encrypt template global.

Parameters
app:orionis.IApplicationApplication container to expose in templates.
Returns
typing.AnyCallable returning the application instance.
def _global_errors(app: IApplication) -> Any: (source)

Build the errors template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyBag exposing the validation errors flashed for this request.
def _global_flash(app: IApplication) -> Any: (source)

Build the async flash template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that reads one-request status messages.
def _global_framework_version() -> Any: (source)

Build the framework_version template global.

Returns
typing.AnyCallable that returns the framework version.
def _global_locale() -> Any: (source)

Build the locale template global.

Returns
typing.AnyCallable that returns the active application locale.
def _global_locales() -> Any: (source)

Build the locales template global.

Returns
typing.AnyCallable that returns every locale with a translation source.
def _global_now() -> Any: (source)

Build the now template global.

Returns
typing.AnyCallable returning the current date and time.
def _global_old(app: IApplication) -> Any: (source)

Build the async old template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that reads the previously submitted form input.
def _global_python_version() -> Any: (source)

Build the python_version template global.

Returns
typing.AnyCallable that returns the Python version.
def _global_request(app: IApplication) -> Any: (source)

Build the async request template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that resolves the current HTTP request.
def _global_route(app: IApplication) -> Any: (source)

Build the async route template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that builds the URL of a named route.
def _global_secure_asset(app: IApplication) -> Any: (source)

Build the async secure_asset template global bound to the app.

Parameters
app:orionis.IApplicationApplication container used to resolve the storage manager.
Returns
typing.AnyAsync callable that builds the HTTPS URL of a stored file.
def _global_secure_url(app: IApplication) -> Any: (source)

Build the async secure_url template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that builds an HTTPS URL from a path.
def _global_session(app: IApplication) -> Any: (source)

Build the async session template global.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that resolves the current session.
def _global_stringable() -> Any: (source)

Build the stringable template global.

Returns
typing.AnyCallable wrapping a value in a orionis.support.types.Stringable instance.
def _global_today() -> Any: (source)

Build the today template global.

Returns
typing.AnyCallable returning the current date without time component.
def _global_trans() -> Any: (source)

Build the trans (and __) template global.

Returns
typing.AnyCallable that translates a key for a given or the active locale.
def _global_url(app: IApplication) -> Any: (source)

Build the async url template global bound to the application.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
typing.AnyAsync callable that builds a URL from a path.
_EXPORTS: dict = (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': ('orionis.view.globals.lang', '_global_choice'),
 '_global_collect': ('orionis.view.globals.collection', '_global_collect'),
 '_global_config': ('orionis.view.globals.config', '_global_config'),
...