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

Canonicalize and authorize outbound HTTPS destinations.

Configuration and request builders compare the same normalized origins.

Function _check Reject empty, oversized or ambiguous destination strings.
Function _normalize_path Resolve literal dot segments without modifying encoded segments or slashes.
Function _parts Split an HTTPS URL into normalized authority, path and query.
Function destination Resolve one destination before attaching credentials.
Function origin Return a normalized, path-free HTTPS origin.
Function origin_of_url Return the origin of an absolute outgoing URL.
Constant _AUTHORITY Match an authority and capture its ASCII-only IP literal and optional port.
Constant _HTTPS_PREFIX Define the canonical HTTPS prefix for every authorized authority.
Constant _HTTPS_URL Match an absolute HTTPS URL and capture its authority, path and optional query.
Constant _INVALID_ESCAPE Match percent signs that do not introduce two ASCII hexadecimal digits.
Constant MAX_URL_BYTES Limit the length of an outgoing URL and its encoded request target.
def _check(value: str): (source)

Reject empty, oversized or ambiguous destination strings.

Parameters
value:strDestination to validate before parsing.
Returns
NoneComplete validation of the destination text before parsing.
def _normalize_path(path: str) -> str: (source)

Resolve literal dot segments without modifying encoded segments or slashes.

Parameters
path:strAbsolute URL path with literal or encoded segments.
Returns
strPath with literal dot segments resolved.
def _parts(value: str) -> tuple[str, str, str]: (source)

Split an HTTPS URL into normalized authority, path and query.

Parameters
value:strAbsolute HTTPS URL to split.
Returns
tuple[str, str, str]Normalized authority, path and unmodified query.
def destination(value: str, base: str | None, allowed: frozenset[str]) -> str: (source)

Resolve one destination before attaching credentials.

Parameters
value:strAbsolute URL or integration-relative path.
base:str | NoneSelected integration origin, if present.
allowed:frozenset[str]Canonical HTTPS origins permitted by the application.
Returns
strCanonical URL under an authorized origin.
Raises
HttpDestinationExceptionIf the URL is malformed or outside the configured origins.
HttpSizeLimitExceptionIf the source URL or its encoded form exceeds the byte budget.
def origin(value: str) -> str: (source)

Return a normalized, path-free HTTPS origin.

Parameters
value:strHTTPS URL that must identify only an origin.
Returns
strNormalized scheme and authority.
def origin_of_url(value: str) -> str: (source)

Return the origin of an absolute outgoing URL.

Parameters
value:strAbsolute outgoing URL.
Returns
strNormalized scheme and authority.
_AUTHORITY = (source)

Match an authority and capture its ASCII-only IP literal and optional port.

Value
re.compile(r'(?:\[([\da-fA-F:\.]+)\]|[^:]+\b)(?::(\d{1,5}))?\Z')
_HTTPS_PREFIX: str = (source)

Define the canonical HTTPS prefix for every authorized authority.

Value
'https://'
_HTTPS_URL = (source)

Match an absolute HTTPS URL and capture its authority, path and optional query.

Value
re.compile(r'https://([^/\?#]+)(/[^\?#]*)?(?:\?(.*))?\Z',
           (re.ASCII | re.IGNORECASE))
_INVALID_ESCAPE = (source)

Match percent signs that do not introduce two ASCII hexadecimal digits.

Value
re.compile(r'%(?![\da-fA-F]{2})',
           re.ASCII)
MAX_URL_BYTES: int = (source)

Limit the length of an outgoing URL and its encoded request target.

Value
8192