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
class ITranslationRepository(ABC): (source)
Known subclasses: orionis.localization.TranslationRepository
Define the contract for the in-memory translation cache.
The repository guarantees that each locale is read from disk at most once, keeping every subsequent lookup fully in memory with O(1) access.
Notes
Implementations are not required to be thread-safe nor to copy the cached mapping before returning it.
| Method | flush |
Discard every cached translation map. |
| Method | forget |
Discard the cached translations for locale. |
| Method | get |
Return the translation map for locale, loading it on demand. |
| Method | has |
Determine whether locale is already cached in memory. |
| Method | loaded |
Return the locales currently held in the cache. |
| Class Variable | __slots__ |
Undocumented |
overridden in
orionis.localization.TranslationRepositoryDiscard every cached translation map.
| Returns | |
None | Undocumented |
overridden in
orionis.localization.TranslationRepositoryReturn the translation map for locale, loading it on demand.
| Parameters | |
locale:str | Locale code whose translations are requested. |
| Returns | |
TranslationMap | Cached translation map for the locale. The mapping is the cached instance, not a copy. |