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
class IHttpManager(PendingRequest, ABC): (source)
Known subclasses: orionis.http.client.HttpManager
Constructor: IHttpManager(manager, settings)
Expose request builders, HTTP terminals and context-local fixtures.
Consumers can inject this contract into a controller or command.
| Method | client |
Select a registered integration and return its independent request chain. |
| Method | fake |
Intercept sends in this context until its asynchronous exit. |
| Method | response |
Create a raw or JSON response fixture for a simulated attempt. |
| Class Variable | __slots__ |
Keep the request builder's inherited slot layout. |
Inherited from PendingRequest:
| 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. |
| Instance Variable | _manager |
Application manager that authorizes and executes requests. |
| Instance Variable | _settings |
Immutable settings inherited by requests from this chain. |
overridden in
orionis.http.client.HttpManagerSelect a registered integration and return its independent request chain.
| Parameters | |
name:str | Name of a configured integration. |
| Returns | |
PendingRequest | Independent chain carrying the resulting settings. |
@abstractmethod
def fake(self, fixtures: Fixtures) -> AbstractAsyncContextManager[ FakeContext]:
(source)
¶
overridden in
orionis.http.client.HttpManagerIntercept sends in this context until its asynchronous exit.
| Parameters | |
fixtures:Fixtures | Outcomes keyed by method and absolute URL. |
| Returns | |
contextlib.AbstractAsyncContextManager[FakeContext] | Context selecting the fixture transport until exit. |
@abstractmethod
def response(self, body: object = b'', *, status: int = 200, headers: HeaderInput = ()) -> FakeResponse:
(source)
¶
overridden in
orionis.http.client.HttpManagerCreate a raw or JSON response fixture for a simulated attempt.
| Parameters | |
body:object | Raw bytes, text or JSON-compatible fixture payload. |
status:int | HTTP response status code. |
headers:HeaderInput | Header fields in request or wire order. |
| Returns | |
FakeResponse | Immutable fixture consumed by the test transport. |