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

class _EventStreamIterator: (source)

Constructor: _EventStreamIterator(source)

View In Hierarchy

Encode an owned event source without prefetching or buffering events.

Method __aiter__ Return this single-use byte iterator.
Async Method __anext__ Pull and encode exactly one event when the transport is ready.
Method __init__ Retain a source without starting its iterator.
Method _startClose Release source references and schedule its asynchronous finalizer.
Async Method aclose Close the owned iterator once and release its source references.
Class Variable __slots__ Undocumented
Instance Variable _asynchronous Undocumented
Instance Variable _close_task Undocumented
Instance Variable _iterator Undocumented
Instance Variable _source Undocumented
def __aiter__(self) -> Self: (source)

Return this single-use byte iterator.

Returns
SelfThe wrapper without starting the producer.
async def __anext__(self) -> bytes: (source)

Pull and encode exactly one event when the transport is ready.

Returns
bytesOne encoded SSE frame.
Raises
StopAsyncIterationIf the source is exhausted or has been closed.
TypeErrorIf the next item is neither text nor a ServerSentEvent.

Retain a source without starting its iterator.

Parameters
source:AsyncIterable[ServerSentEvent | str] | Iterable[ServerSentEvent | str]Event source owned until the response adapter closes this wrapper.
Returns
NoneRetain the source without allocating tasks or calling its iterator.
Raises
TypeErrorIf the source does not support synchronous or asynchronous iteration.
def _startClose(self) -> Future[None] | None: (source)

Release source references and schedule its asynchronous finalizer.

Returns
Future[None] | NoneOwned asynchronous cleanup, or None after synchronous/no cleanup.
async def aclose(self): (source)

Close the owned iterator once and release its source references.

An unstarted response closes its source without invoking __aiter__. Synchronous generators use close() when aclose() is unavailable. Asynchronous cleanup completes before propagating cancellation.

Returns
NoneProducer cleanup completes or its exception propagates.
__slots__: tuple[str, ...] = (source)

Undocumented

_asynchronous = (source)

Undocumented

_close_task: Future[None] | None = (source)

Undocumented