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

Serialize bounded queued output without blocking async cancellation.

Method __init__ Start a daemon writer with a single-slot queue on the running loop.
Method _write Write queued bytes and settle acknowledgements after flushing.
Method _writeFrame Complete partial raw-stream writes before flushing one frame.
Method close Stop queued output without waiting for a blocked operating-system write.
Async Method write Queue unchanged bytes and wait for the output stream to flush them.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _closed Whether this resource has completed its close lifecycle.
Instance Variable _loop Loop produced by asyncio.get_running_loop.
Instance Variable _pending Work that has been admitted and is awaiting completion.
Instance Variable _queue Name of the queue receiving or storing the job.
Instance Variable _runtime Runtime retained for errors after output waiters are cancelled.
Instance Variable _stream Value supplied for stream.
def __init__(self, stream: BinaryIO, *, runtime: FailureRuntime | None = None): (source)

Start a daemon writer with a single-slot queue on the running loop.

Parameters
stream:typing.BinaryIOBinary output stream receiving unchanged queued bytes.
runtime:orionis.failure.runtime.FailureRuntime or None, optionalRuntime retained for late write failures; use the current runtime if None.
Returns
NoneCapture the running loop and start the writer's daemon thread.
Raises
RuntimeErrorIf no event loop is running in the calling thread.
def _write(self): (source)

Write queued bytes and settle acknowledgements after flushing.

Skip acknowledgements cancelled before writing. Deliver stream errors through the owning loop, observing failures whose caller no longer waits.

Returns
NoneExit on shutdown, queue-wait cancellation, or event-loop closure.
def _writeFrame(self, data: bytes): (source)

Complete partial raw-stream writes before flushing one frame.

Parameters
data:bytesEntire frame owned by the writer daemon.
Returns
NoneNo return value.
Raises
OSErrorIf the stream makes no progress or returns an invalid byte count.
def close(self): (source)

Stop queued output without waiting for a blocked operating-system write.

Do not close the output stream or join the daemon thread.

Returns
NoneMark the writer closed and cancel a pending queue get without draining queued output.
async def write(self, data: bytes): (source)

Queue unchanged bytes and wait for the output stream to flush them.

Cancellation does not interrupt an operating-system write already in progress.

Parameters
data:bytesProtocol bytes to write, including any required frame delimiter.
Returns
NoneComplete after the daemon's write and flush calls succeed.
Raises
ExceptionIf the output stream's write or flush operation fails.
asyncio.CancelledErrorIf the caller is cancelled while enqueueing or awaiting delivery.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Whether this resource has completed its close lifecycle.

Loop produced by asyncio.get_running_loop.

Work that has been admitted and is awaiting completion.

Name of the queue receiving or storing the job.

_runtime = (source)

Runtime retained for errors after output waiters are cancelled.

Value supplied for stream.