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

Build isolated chains and delegate every terminal to the same executor.

A chain can be reused concurrently with independent credentials on each branch.

Method __init__ Bind the operation to its immutable policy and application manager.
Method _authorize Bind an authorization field to the selected origin.
Method _headers Return a new chain with the merged header fields.
Method acceptJson Request a JSON representation.
Method asForm Require a form-encoded request body.
Method baseUrl Bind to an authorized origin for subsequent relative paths.
Method connectTimeout Set the connect timeout within its configured ceiling.
Method deadline Set the total request budget in seconds.
Async Method delete Send one DELETE request.
Async Method get Send one GET request.
Async Method head Send one HEAD request.
Async Method options Send one OPTIONS request.
Async Method patch Send one PATCH request.
Async Method post Send one POST request.
Async Method put Send one PUT request.
Async Method query Send one safe, idempotent QUERY with its explicitly typed content.
Async Method send Prepare and send a single HTTP attempt.
Method timeout Apply the duration to all I/O phases within each administrative ceiling.
Method withBasicAuth Attach UTF-8 Basic credentials to the bound origin.
Method withHeaders Overlay a copied, case-insensitive set of caller-controlled headers.
Method withToken Attach one bearer credential to the bound origin.
Class Variable __slots__ Reserve storage for the application manager and immutable chain settings.
Instance Variable _manager Application manager that authorizes and executes requests.
Instance Variable _settings Immutable settings inherited by requests from this chain.
def __init__(self, manager: HttpManager, settings: Settings): (source)

Bind the operation to its immutable policy and application manager.

Parameters
manager:HttpManagerApplication-scoped outbound HTTP service.
settings:SettingsImmutable policy of the selected request chain.
Returns
NoneStore the manager and the immutable policy for this chain.
def _authorize(self, value: str) -> PendingRequest: (source)

Bind an authorization field to the selected origin.

Parameters
value:strAuthorization field value for the bound origin.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def _headers(self, values: tuple[tuple[str, str], ...]) -> PendingRequest: (source)

Return a new chain with the merged header fields.

Parameters
values:tuple of tuple[str, str]Header fields to overlay on the existing chain.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def acceptJson(self) -> PendingRequest: (source)

Request a JSON representation.

Returns
PendingRequestIndependent chain carrying the resulting settings.
def asForm(self) -> PendingRequest: (source)

Require a form-encoded request body.

Returns
PendingRequestIndependent chain carrying the resulting settings.
def baseUrl(self, origin: str) -> PendingRequest: (source)

Bind to an authorized origin for subsequent relative paths.

Parameters
origin:strExact HTTPS origin allowed by application configuration.
Returns
PendingRequestIndependent chain carrying the resulting settings.
Raises
HttpDestinationExceptionIf the origin is invalid, unauthorized or already bound elsewhere.
def connectTimeout(self, seconds: float) -> PendingRequest: (source)

Set the connect timeout within its configured ceiling.

Parameters
seconds:floatPositive timeout in seconds.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def deadline(self, seconds: float) -> PendingRequest: (source)

Set the total request budget in seconds.

Parameters
seconds:floatPositive timeout in seconds.
Returns
PendingRequestIndependent chain carrying the resulting settings.
async def delete(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one DELETE request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def get(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one GET request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def head(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one HEAD request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def options(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one OPTIONS request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def patch(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one PATCH request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def post(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one POST request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def put(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one PUT request.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
async def query(self, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Send one safe, idempotent QUERY with its explicitly typed content.

Parameters
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
Raises
HttpRequestExceptionIf query content is absent or raw bytes lack a concrete media type.
async def send(self, method: str, url: str, **options: Unpack[RequestOptions]) -> ClientResponse: (source)

Prepare and send a single HTTP attempt.

Parameters
method:strHTTP method for this attempt.
url:strAbsolute URL or path relative to the bound origin.
**options:orionis.http.client.request.RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
Raises
HttpRequestExceptionIf the destination, body or headers violate the request policy.
HttpCapacityExceptionIf the admission queue or the preparation workers are at capacity.
HttpTransportExceptionIf an I/O phase fails or the request deadline expires.
HttpSizeLimitExceptionIf the request or response exceeds its configured byte limit.
def timeout(self, seconds: float) -> PendingRequest: (source)

Apply the duration to all I/O phases within each administrative ceiling.

Parameters
seconds:floatPositive timeout in seconds.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def withBasicAuth(self, user: str, password: str) -> PendingRequest: (source)

Attach UTF-8 Basic credentials to the bound origin.

Parameters
user:strBasic authentication user name.
password:strBasic authentication password.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def withHeaders(self, mapping: Mapping[str, str]) -> PendingRequest: (source)

Overlay a copied, case-insensitive set of caller-controlled headers.

Parameters
mapping:collections.abc.Mapping[str, str]Header names and values to merge into the chain.
Returns
PendingRequestIndependent chain carrying the resulting settings.
def withToken(self, token: str) -> PendingRequest: (source)

Attach one bearer credential to the bound origin.

Parameters
token:strBearer token scoped to the bound origin.
Returns
PendingRequestIndependent chain carrying the resulting settings.
__slots__: tuple[str, ...] = (source)

Reserve storage for the application manager and immutable chain settings.

Application manager that authorizes and executes requests.

Immutable settings inherited by requests from this chain.