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 PendingRequest: (source)
Known subclasses: orionis.http.client.contracts.IHttpManager
Constructor: PendingRequest(manager, settings)
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 | accept |
Request a JSON representation. |
| Method | as |
Require a form-encoded request body. |
| Method | base |
Bind to an authorized origin for subsequent relative paths. |
| Method | connect |
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 | with |
Attach UTF-8 Basic credentials to the bound origin. |
| Method | with |
Overlay a copied, case-insensitive set of caller-controlled headers. |
| Method | with |
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. |
orionis.http.client.HttpManagerBind the operation to its immutable policy and application manager.
| Parameters | |
manager:HttpManager | Application-scoped outbound HTTP service. |
settings:Settings | Immutable policy of the selected request chain. |
| Returns | |
None | Store the manager and the immutable policy for this chain. |
Bind an authorization field to the selected origin.
| Parameters | |
value:str | Authorization field value for the bound origin. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
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 | |
PendingRequest | Independent chain carrying the resulting settings. |
Request a JSON representation.
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
Require a form-encoded request body.
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
Bind to an authorized origin for subsequent relative paths.
| Parameters | |
origin:str | Exact HTTPS origin allowed by application configuration. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
| Raises | |
HttpDestinationException | If the origin is invalid, unauthorized or already bound elsewhere. |
Set the connect timeout within its configured ceiling.
| Parameters | |
seconds:float | Positive timeout in seconds. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
Set the total request budget in seconds.
| Parameters | |
seconds:float | Positive timeout in seconds. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
Send one DELETE request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one GET request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one HEAD request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one OPTIONS request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one PATCH request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one POST request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one PUT request.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
Send one safe, idempotent QUERY with its explicitly typed content.
| Parameters | |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
| Raises | |
HttpRequestException | If query content is absent or raw bytes lack a concrete media type. |
str, url: str, **options: Unpack[ RequestOptions]) -> ClientResponse:
(source)
¶
Prepare and send a single HTTP attempt.
| Parameters | |
method:str | HTTP method for this attempt. |
url:str | Absolute URL or path relative to the bound origin. |
**options:orionis.http.client.request.RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
ClientResponse | Detached status, headers and bounded response body. |
| Raises | |
HttpRequestException | If the destination, body or headers violate the request policy. |
HttpCapacityException | If the admission queue or the preparation workers are at capacity. |
HttpTransportException | If an I/O phase fails or the request deadline expires. |
HttpSizeLimitException | If the request or response exceeds its configured byte limit. |
Apply the duration to all I/O phases within each administrative ceiling.
| Parameters | |
seconds:float | Positive timeout in seconds. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
Attach UTF-8 Basic credentials to the bound origin.
| Parameters | |
user:str | Basic authentication user name. |
password:str | Basic authentication password. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
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 | |
PendingRequest | Independent chain carrying the resulting settings. |
Attach one bearer credential to the bound origin.
| Parameters | |
token:str | Bearer token scoped to the bound origin. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
orionis.http.client.contracts.IHttpManagerReserve storage for the application manager and immutable chain settings.