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.

module documentation

Provide storage operations.

Includes read_chunks, iterate_chunks, spool_stream.

Async Function iterate_chunks Batch SDK iterator advances with bounded read-ahead and deterministic close.
Async Function read_chunks Read bounded batches while preserving logical chunks and first-byte latency.
Async Function spool_stream Buffer an async upload once for the cloud drivers.
Constant READ_BUFFER_SIZE Read buffer size used by buffering.
async def iterate_chunks(opener: Callable[[], Iterator[bytes]]) -> AsyncIterator[bytes]: (source)

Batch SDK iterator advances with bounded read-ahead and deterministic close.

Parameters
opener:collections.abc.Callable[[], collections.abc.Iterator[bytes]]Synchronous factory for a request-owned SDK iterator.
Yields
bytesOriginal SDK chunks. A batch holds at most sixteen chunks and stops when it reaches 1 MiB, so memory is bounded by 1 MiB plus one SDK chunk.
async def read_chunks(opener: Callable[[], BinaryIO], chunk_size: int, *, buffer_size: int = READ_BUFFER_SIZE) -> AsyncIterator[bytes]: (source)

Read bounded batches while preserving logical chunks and first-byte latency.

Parameters
opener:collections.abc.Callable[[], typing.BinaryIO]Factory for a handle owned exclusively by this iterator.
chunk_size:intMaximum bytes yielded per logical chunk.
buffer_size:intRead-ahead budget, rounded down to a whole number of logical chunks. At least one chunk is read. No producer runs while the consumer pauses.
Yields
bytesFile content in order. Cancellation drains the current read before close.
async def spool_stream(stream: AsyncIterable[bytes], *, max_size: int) -> BinaryIO: (source)

Buffer an async upload once for the cloud drivers.

Parameters
stream:collections.abc.AsyncIterable[bytes]Asynchronous byte-chunk producer.
max_size:intMaximum in-memory bytes before the buffer spills to disk.
Returns
typing.BinaryIORewound temporary buffer owned and closed by the uploading driver.
READ_BUFFER_SIZE = (source)

Read buffer size used by buffering.

Value
1024 * 1024