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 localization components and public imports.

Package contracts Group the localization contracts components and public imports.
Module exceptions Provide localization operations.
Module loader Load translation sources from the configured language path.
Module manager Wire the localization component from the application configuration.
Module provider Service provider for the Orionis localization system.
Module repository Cache translation maps in memory by locale.
Module translator Resolve translation lines for the active locale.
Module types Define types for localization.
Module validators Validate locale codes shared by translators and filesystem loaders.

From __init__.py:

Class LocalizationManager Wire the localization component from the application configuration.
Class TranslationLoader Load translation sources from the configured language path.
Class TranslationRepository In-memory cache of translation maps keyed by locale.
Class Translator Resolve translation lines for the active locale.
Exception InvalidLocaleException Raised when a locale code is empty, malformed, or unsafe.
Exception TranslationException Base exception for all localization-related errors.
Exception TranslationFileNotFoundException Raised when a translation file cannot be found on disk.
Exception TranslationSyntaxException Raised when a translation file contains invalid JSON or structure.
Function __dir__ List loaded attributes and declared public exports.
Function __getattr__ Resolve and cache a public package export.
Constant _EXCEPTION_MODULE Module defining the public localization exception types.
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.
_EXCEPTION_MODULE: str = (source)

Module defining the public localization exception types.

Value
'orionis.localization.exceptions'
_EXPORTS = (source)

Public export names mapped to their defining modules and attributes.

Value
{'InvalidLocaleException': (_EXCEPTION_MODULE, 'InvalidLocaleException'),
 'LocalizationManager': ('orionis.localization.manager', 'LocalizationManager'),
 'TranslationException': (_EXCEPTION_MODULE, 'TranslationException'),
 'TranslationFileNotFoundException': (_EXCEPTION_MODULE,
                                      'TranslationFileNotFoundException'),
 'TranslationLoader': ('orionis.localization.loader', 'TranslationLoader'),
 'TranslationRepository': ('orionis.localization.repository', 'TranslationReposi↵
...