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

Undocumented

Method printRequest Print a formatted HTTP request line to stdout or queue.
Method setEnabled Set whether to enable or disable console output for HTTP requests.
Async Method start Start the background print worker.
Method startTimer Capture the current high-resolution timestamp for request timing.
Async Method stop Drain remaining output and stop the background worker.
def printRequest(self, adapter: TransportAdapter, response: Response): (source)

Print a formatted HTTP request line to stdout or queue.

Computes the elapsed duration from start_time, builds an ANSI-coloured output line, and either enqueues it for the background worker (if start() was called) or writes directly to stdout.

Parameters
adapter:TransportAdapterThe transport adapter providing method and path information.
response:ResponseThe HTTP response object.
Returns
NoneThis method does not return a value.
def setEnabled(self, *, enabled: bool): (source)

Set whether to enable or disable console output for HTTP requests.

Parameters
enabled:boolIf True, HTTP requests are printed to console. If False, output is suppressed.
Returns
NoneThis method does not return a value.
async def start(self): (source)

Start the background print worker.

Creates the internal async queue and spawns a background task to drain queued output lines. Must be called once from an async context before the first request is handled.

Returns
NoneThis method does not return a value.
def startTimer(self) -> float | None: (source)

Capture the current high-resolution timestamp for request timing.

Returns None immediately if printing is disabled (setEnabled(enabled=False) was called), avoiding unnecessary work.

Returns
float | NoneA high-resolution monotonic timestamp from time.perf_counter(), or None if output is disabled.
async def stop(self): (source)

Drain remaining output and stop the background worker.

Waits for every queued line to be written before cancelling the worker task. Safe to call even if start() was never invoked.

Returns
NoneThis method does not return a value.