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
Define the contract for an asynchronous binary stream handle.
Implementations wrap an underlying binary handle (local file, in-memory buffer, remote object) and expose non-blocking read, write, and seek operations. Streams are async context managers:
async with file.open("rb") as stream:
chunk = await stream.read(65536)
| Async Method | __aenter__ |
Open the underlying handle and return the stream. |
| Async Method | __aexit__ |
Close the stream when leaving the async context. |
| Async Method | chunks |
Yield bounded reads; native streams may batch within the buffer budget. |
| Async Method | close |
Flush pending data and release the underlying handle. |
| Async Method | read |
Read up to size bytes from the stream. |
| Async Method | seek |
Move the stream position to offset. |
| Async Method | write |
Write data to the stream at the current position. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
overridden in
orionis.storage.AsyncStreamOpen the underlying handle and return the stream.
| Returns | |
orionis.storage.contracts.IStorageStream | The stream itself, ready for I/O operations. |
@abstractmethod
async def __aexit__(self: Self, exc_type: type[ BaseException] | None, exc: BaseException | None, traceback: TracebackType | None):
(source)
¶
overridden in
orionis.storage.AsyncStreamClose the stream when leaving the async context.
| Parameters | |
exctype[BaseException] | None | Exception class raised inside the context, if any. |
exc:BaseException | None | Exception instance raised inside the context, if any. |
traceback:types.TracebackType | None | Traceback of the raised exception, if any. |
| Returns | |
None | No return value. |
async def chunks(self:
Self, size: int = 65536, *, buffer_size: int = 1024 * 1024) -> AsyncIterator[ bytes]:
(source)
¶
overridden in
orionis.storage.AsyncStreamoverridden in
orionis.storage.AsyncStreamFlush pending data and release the underlying handle.
| Returns | |
None | No return value. |
overridden in
orionis.storage.AsyncStreamDeclare that this class introduces no additional instance slots.