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.
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 | _write |
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. |
Start a daemon writer with a single-slot queue on the running loop.
| Parameters | |
stream:typing.BinaryIO | Binary output stream receiving unchanged queued bytes. |
runtime:orionis.failure.runtime.FailureRuntime or None, optional | Runtime retained for late write failures; use the current runtime if None. |
| Returns | |
None | Capture the running loop and start the writer's daemon thread. |
| Raises | |
RuntimeError | If no event loop is running in the calling thread. |
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 | |
None | Exit on shutdown, queue-wait cancellation, or event-loop closure. |
Stop queued output without waiting for a blocked operating-system write.
Do not close the output stream or join the daemon thread.
| Returns | |
None | Mark the writer closed and cancel a pending queue get without draining queued output. |
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:bytes | Protocol bytes to write, including any required frame delimiter. |
| Returns | |
None | Complete after the daemon's write and flush calls succeed. |
| Raises | |
Exception | If the output stream's write or flush operation fails. |
asyncio.CancelledError | If the caller is cancelled while enqueueing or awaiting delivery. |