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 |
Build a URL from a path, prefixing the current request base URL. |
| Async Function | _request |
Return the base URL of the request currently in scope. |
| Function | _split |
Split an explicit URL scheme without normalizing its remaining content. |
| Function | _to |
Rewrite an already built URL so it uses the HTTPS scheme. |
Build a URL from a path, prefixing the current request base URL.
| Parameters | |
app:orionis.IApplication | Application container used for service resolution. |
path:str | HTTP(S), protocol-relative URL, or application-relative path. |
query:dict[str, typing.Any] | Query string values appended to the resulting URL. |
| Returns | |
str | Absolute URL when a request is in scope, otherwise the normalised path. |
Return the base URL of the request currently in scope.
| Parameters | |
app:orionis.IApplication | Application container used for service resolution. |
| Returns | |
str | Base URL without a trailing slash, or an empty string when no request is in scope. |
Split an explicit URL scheme without normalizing its remaining content.
| Parameters | |
url:str | URL 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. |
Rewrite an already built URL so it uses the HTTPS scheme.
| Parameters | |
url:str | URL to normalize. Recognize HTTP schemes without regard to case. Preserve existing HTTPS URLs, other schemes, and relative paths. |
| Returns | |
str | HTTPS URL for HTTP or protocol-relative inputs, with the remaining content unchanged. Return all other inputs without modification. |