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

class HttpManager(IHttpManager): (source)

Constructor: HttpManager(app)

View In Hierarchy

Share application policy while isolating request and test state.

Configuration is shared, while fixtures follow the active execution context.

Static Method response Build an in-memory response fixture.
Method __init__ Resolve one validated configuration snapshot without opening connections.
Method _profile Merge integration overrides with application limits.
Method client Start a fresh chain with the named integration's policy.
Async Method execute Collect one bounded response within the operation deadline.
Async Method fake Select a strict test transport for the current execution context.
Method requireOrigin Verify an origin before binding a chain to it.
Instance Variable _allowed Canonical origins to which this application may send requests.
Instance Variable _clients Immutable starting settings for each named integration.
Instance Variable _config Validated application settings used to initialize profiles and transports.
Instance Variable _fake Select the active fixture scope for the current task.
Instance Variable _runtime Track admission and connection ownership across this application's lifetimes.

Inherited from IHttpManager:

Class Variable __slots__ Keep the request builder's inherited slot layout.

Inherited from PendingRequest (via IHttpManager):

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.
Instance Variable _manager Application manager that authorizes and executes requests.
Instance Variable _settings Immutable settings inherited by requests from this chain.
def response(body: object = b'', *, status: int = 200, headers: HeaderInput = ()) -> FakeResponse: (source)

Build an in-memory response fixture.

Parameters
body:objectRaw bytes, text or JSON-compatible fixture payload.
status:intHTTP response status code.
headers:HeaderInputHeader fields in request or wire order.
Returns
FakeResponseImmutable fixture consumed by the test transport.
def __init__(self, app: IApplication): (source)

Resolve one validated configuration snapshot without opening connections.

Parameters
app:IApplicationApplication that owns configuration and runtime state.
Returns
NoneInitialize the profiles and the default request chain.
def _profile(self, name: str, profile: dict) -> Settings: (source)

Merge integration overrides with application limits.

Parameters
name:strIntegration name retained for diagnostics.
profile:dictValidated overrides for the named integration.
Returns
SettingsEffective policy for the integration.
def client(self, name: str) -> PendingRequest: (source)

Start a fresh chain with the named integration's policy.

Parameters
name:strName of a configured integration.
Returns
PendingRequestIndependent chain carrying the resulting settings.
Raises
HttpConfigurationExceptionIf the integration name is not registered.
async def execute(self, settings: Settings, method: str, url: str, options: RequestOptions) -> ClientResponse: (source)

Collect one bounded response within the operation deadline.

Parameters
settings:SettingsImmutable policy of the selected request chain.
method:strHTTP method for this attempt.
url:strAbsolute URL or path relative to the bound origin.
options:RequestOptionsQuery, headers and body arguments supplied to the terminal.
Returns
ClientResponseDetached status, headers and bounded response body.
@asynccontextmanager
async def fake(self, fixtures: Fixtures) -> AsyncGenerator[FakeContext]: (source)

Select a strict test transport for the current execution context.

Parameters
fixtures:FixturesOutcomes keyed by method and absolute URL.
Yields
FakeContextFixture scope receiving attempts until context exit.
def requireOrigin(self, new: str, current: str | None): (source)

Verify an origin before binding a chain to it.

Parameters
new:strNormalized origin requested by the builder.
current:str | NonePreviously bound origin, if any.
Returns
NoneAllow the builder to bind the validated origin.
Raises
HttpDestinationExceptionIf the requested origin is unauthorized or differs from the bound origin.

Canonical origins to which this application may send requests.

Immutable starting settings for each named integration.

Validated application settings used to initialize profiles and transports.

Select the active fixture scope for the current task.

Track admission and connection ownership across this application's lifetimes.