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.

module documentation

Provide view globals operations.

Includes _split_scheme, _request_base_url, _absolute_url, _to_secure_url, and _global_url.

Async Function _absolute_url Build a URL from a path, prefixing the current request base URL.
Async Function _request_base_url Return the base URL of the request currently in scope.
Function _split_scheme Split an explicit URL scheme without normalizing its remaining content.
Function _to_secure_url Rewrite an already built URL so it uses the HTTPS scheme.
async def _absolute_url(app: IApplication, path: str, query: dict[str, Any]) -> str: (source)

Build a URL from a path, prefixing the current request base URL.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
path:strHTTP(S), protocol-relative URL, or application-relative path.
query:dict[str, typing.Any]Query string values appended to the resulting URL.
Returns
strAbsolute URL when a request is in scope, otherwise the normalised path.
async def _request_base_url(app: IApplication) -> str: (source)

Return the base URL of the request currently in scope.

Parameters
app:orionis.IApplicationApplication container used for service resolution.
Returns
strBase URL without a trailing slash, or an empty string when no request is in scope.
def _split_scheme(url: str) -> tuple[str, str]: (source)

Split an explicit URL scheme without normalizing its remaining content.

Parameters
url:strURL or path whose scheme may be followed by a colon and two slashes.
Returns
tuple[str, str]Lowercase scheme and exact remainder, or two empty strings when the separator is absent. This helper performs no URL validation.
def _to_secure_url(url: str) -> str: (source)

Rewrite an already built URL so it uses the HTTPS scheme.

Parameters
url:strURL to normalize. Recognize HTTP schemes without regard to case. Preserve existing HTTPS URLs, other schemes, and relative paths.
Returns
strHTTPS URL for HTTP or protocol-relative inputs, with the remaining content unchanged. Return all other inputs without modification.