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.

class documentation

Undocumented

Static Method __deserializeCompiledRoute Rebuild a CompiledRoute from a cache dict.
Static Method __deserializeFallback Rebuild the fallback tuple from a cache descriptor dict.
Static Method __resolveClass Import and return a class given its fully-qualified dotted path.
Static Method __resolveQualname Resolve a module-level qualname into its target object.
Static Method __serializeCompiledRoute Convert a CompiledRoute to a JSON-safe dict.
Static Method __serializeFallback Serialise the fallback tuple to a JSON-safe descriptor dict.
Method fromCache Rebuild compiled routes and the fallback handler from a cache dict.
Method toCache Serialise compiled routes and the fallback handler to a cache dict.
Constant VERSION Undocumented
def __deserializeCompiledRoute(route_data: dict, resolved_classes: dict[str, type], method: str, *, static_path: str | None = None) -> CompiledRoute: (source)

Rebuild a CompiledRoute from a cache dict.

regex and converters are recomputed via RouteCompiler.compilePath so that callable converters (including lambdas) never need to be serialised.

Parameters
route_data:dictDict produced by __serializeCompiledRoute.
resolved_classes:dict[str, type]Class references shared across this cache load.
method:strDispatch method owning this cache bucket.
static_path:str | None, optionalExpected path for static entries; None selects a dynamic entry.
Returns
CompiledRouteFully initialised compiled route.
Raises
ValueErrorIf transport, path or bucket metadata contradicts the cached route.
def __deserializeFallback(data: dict | None) -> tuple | None: (source)

Rebuild the fallback tuple from a cache descriptor dict.

Parameters
data:dict | NoneDescriptor produced by __serializeFallback.
Returns
tuple | NoneFallback tuple for the dispatch engine, or None.
def __resolveClass(dotted_path: str, resolved_classes: dict[str, type] | None = None) -> type: (source)

Import and return a class given its fully-qualified dotted path.

Parameters
dotted_path:strFully-qualified class path, e.g. 'app.http.middleware.Auth'.
resolved_classes:dict[str, type] | None, optionalMemoized class references for one cache load.
Returns
typeThe imported class object.
def __resolveQualname(module_path: str, qualname: str) -> object: (source)

Resolve a module-level qualname into its target object.

Parameters
module_path:strImport path of the module containing the object.
qualname:strQualname to resolve, potentially with dotted nesting.
Returns
objectResolved target object.
Raises
ValueErrorIf the qualname contains <locals>, which cannot be safely restored from cache.
def __serializeCompiledRoute(cr: CompiledRoute) -> dict: (source)

Convert a CompiledRoute to a JSON-safe dict.

regex and converters are omitted — they are fully deterministic from path and recomputed on deserialisation. Middleware class references are stored as dotted import paths.

Parameters
cr:CompiledRouteThe compiled route to serialise.
Returns
dictJSON-safe representation of the compiled route.
def __serializeFallback(fallback: tuple | None) -> dict | None: (source)

Serialise the fallback tuple to a JSON-safe descriptor dict.

Parameters
fallback:tuple | NoneRaw fallback tuple from the router.
Returns
dict | NoneDescriptor dict, or None if no fallback is registered.
def fromCache(self, cached: dict) -> tuple[dict[str, dict], tuple | None]: (source)

Rebuild compiled routes and the fallback handler from a cache dict.

Parameters
cached:dictDict previously produced by toCache.
Returns
tuple[dict[str, dict], tuple | None](routes, fallback) ready to be stored on the loader.
Raises
ValueErrorIf the cache schema version is missing or incompatible.
def toCache(self, routes: dict[str, dict], fallback: tuple | None) -> dict: (source)

Serialise compiled routes and the fallback handler to a cache dict.

Parameters
routes:dict[str, dict]Compiled routes mapping produced by RouteCompiler.compile.
fallback:tuple | NoneRaw fallback tuple stored by the loader.
Returns
dictJSON-safe representation suitable for FileBasedCache.save().

Undocumented

Value
3