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

Collect one response within the request budget.

Network responses and fixtures pass through the same framing and size checks.

Function _field_tokens Split comma-delimited framing and encoding fields across header lines.
Function _framed_length Resolve the HTTP/1.1 message length using this transport's framing rules.
Async Function _read_body Bound each raw chunk before accumulation, including unframed bodies.
Async Function read_response Run one attempt and log only administrative metadata about the result.
Constant _LOG Record completed attempts with sanitized diagnostic fields.
Constant _NO_BODY Identify final status codes whose responses omit a message body.
Constant _PROTOCOL Classify invalid message framing as a transport protocol error.
Constant _RESPONSE_DIRECTION Identify the response as the source of a size-limit error.
def _field_tokens(headers: tuple[tuple[str, str], ...], name: str) -> list[str]: (source)

Split comma-delimited framing and encoding fields across header lines.

Parameters
headers:tuple of tuple[str, str]Header fields in request or wire order.
name:strCase-insensitive HTTP field name to match.
Returns
list[str]Lowercase field tokens in their original wire order.
def _framed_length(headers: tuple[tuple[str, str], ...], limit: int) -> int | None: (source)

Resolve the HTTP/1.1 message length using this transport's framing rules.

Parameters
headers:tuple of tuple[str, str]Header fields in request or wire order.
limit:intMaximum byte count allowed for this operation.
Returns
int | NoneDeclared byte length, or None for unknown framing.
async def _read_body(raw: TransportResponse, limit: int) -> bytes: (source)

Bound each raw chunk before accumulation, including unframed bodies.

Parameters
raw:TransportResponseOpen response whose stream belongs to the current attempt.
limit:intMaximum byte count allowed for this operation.
Returns
bytesComplete raw body within the response budget.
async def read_response(transport: IHttpTransport, request: PreparedRequest) -> ClientResponse: (source)

Run one attempt and log only administrative metadata about the result.

Parameters
transport:IHttpTransportTransport responsible for this attempt.
request:PreparedRequestAuthorized request submitted to the transport.
Returns
ClientResponseDetached status, headers and bounded response body.

Record completed attempts with sanitized diagnostic fields.

Value
logging.getLogger('orionis.http.client')
_NO_BODY = (source)

Identify final status codes whose responses omit a message body.

Value
frozenset((HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED))
_PROTOCOL: str = (source)

Classify invalid message framing as a transport protocol error.

Value
'protocol'
_RESPONSE_DIRECTION: str = (source)

Identify the response as the source of a size-limit error.

Value
'response'