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
Prepare a bounded HTTP request.
The prepared payload owns the headers and bytes submitted to the transport.
| Class | _ |
Write strict JSON directly into a size-limited buffer. |
| Class | _ |
Copy only bounded JSON-native containers before handing work to a thread. |
| Class | |
Describe one authorized outbound attempt. |
| Class | |
Describe the options accepted by HTTP terminal methods. |
| Class | |
Store an immutable snapshot of request-chain settings. |
| Function | _body |
Resolve the body encoder and its implied media type. |
| Function | _content |
Validate or supply the media type for the chosen encoder. |
| Function | _copy |
Copy text pairs while enforcing the unencoded size budget. |
| Function | _escaped |
Percent-encode one query or form field as ASCII. |
| Function | _json |
Encode JSON into a bounded UTF-8 buffer. |
| Function | _urlencoded |
Serialize ordered field pairs within the byte limit. |
| Function | _validate |
Require explicit query content and a concrete media type for RFC 10008. |
| Function | merge |
Replace names case-insensitively and enforce the merged wire budget. |
| Function | prepare |
Snapshot a request with an authorized URL, bounded body and fresh headers. |
| Function | seconds |
Accept positive and finite time values expressed in seconds. |
| Function | snapshot |
Own mutable arguments before queueing or passing them to a worker. |
| Function | user |
Validate application-supplied headers and copy their names and values. |
| Constant | _HEADER |
Match ASCII token characters permitted in HTTP header names and media types. |
| Constant | _MAX |
Limit the nesting depth of a JSON request body. |
| Constant | _MAX |
Limit the number of JSON values visited in a single request body. |
| Constant | _METHODS |
Define the HTTP methods accepted by the outgoing request builder. |
| Constant | _PAIR |
Require exactly two elements in each query or form field pair. |
| Constant | _RESERVED |
Reserve these header names for the transport and credential binding methods. |
| Constant | _UNBOUND |
Allow these headers before a chain is bound to an origin. |
| Constant | MAX |
Limit the combined size of request headers in bytes, including separators. |
| Type Alias | |
Keep immutable header name-value pairs in transmission order. |
| Type Alias | |
Represent input fields as a mapping or an ordered sequence of key-value pairs. |
| Type Alias | |
Group connect, read, write and pool timeouts in seconds, in that order. |
def _body(method:
str, options: RequestOptions, settings: Settings) -> tuple[ bytes | None, str | None]:
(source)
¶
Resolve the body encoder and its implied media type.
| Parameters | |
method:str | HTTP method for this attempt. |
options:RequestOptions | Query, headers and body arguments supplied to the terminal. |
settings:Settings | Immutable policy of the selected request chain. |
| Returns | |
tuple[bytes | None, str | None] | Encoded bytes and implied media type, when supplied. |
def prepare(settings:
Settings, allowed: frozenset[ str], method: str, url: str, options: RequestOptions) -> PreparedRequest:
(source)
¶
Snapshot a request with an authorized URL, bounded body and fresh headers.
| Parameters | |
settings:Settings | Immutable policy of the selected request chain. |
allowed:frozenset[str] | Canonical HTTPS origins permitted by the application. |
method:str | HTTP method for this attempt. |
url:str | Absolute URL or path relative to the bound origin. |
options:RequestOptions | Query, headers and body arguments supplied to the terminal. |
| Returns | |
PreparedRequest | Authorized, serialized request ready for transport. |
Own mutable arguments before queueing or passing them to a worker.
| Parameters | |
options:RequestOptions | Query, headers and body arguments supplied to the terminal. |
settings:Settings | Immutable policy of the selected request chain. |
| Returns | |
RequestOptions | Options detached from caller-owned mutable data. |
Match ASCII token characters permitted in HTTP header names and media types.
| Value |
|
Define the HTTP methods accepted by the outgoing request builder.
| Value |
|
Reserve these header names for the transport and credential binding methods.
| Value |
|
Allow these headers before a chain is bound to an origin.
| Value |
|