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
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 | _start |
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 |
Undocumented |
| Instance Variable | _iterator |
Undocumented |
| Instance Variable | _source |
Undocumented |
Pull and encode exactly one event when the transport is ready.
| Returns | |
bytes | One encoded SSE frame. |
| Raises | |
StopAsyncIteration | If the source is exhausted or has been closed. |
TypeError | If the next item is neither text nor a ServerSentEvent. |
def __init__(self, source:
AsyncIterable[ ServerSentEvent | str] | Iterable[ ServerSentEvent | str]):
(source)
¶
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 | |
None | Retain the source without allocating tasks or calling its iterator. |
| Raises | |
TypeError | If the source does not support synchronous or asynchronous iteration. |
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 | |
None | Producer cleanup completes or its exception propagates. |
_iterator:
AsyncIterator[ ServerSentEvent | str] | Iterator[ ServerSentEvent | str] | None =
(source)
¶
Undocumented