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 IBodyStream(ABC): (source)
Known subclasses: orionis.http.payload.body.BodyStream
Define the minimal contract for reading an HTTP request body.
Notes
Both stream() and read() must be safe to call multiple times once the body has been fully buffered.
| Async Method | read |
Buffer and return the full request body. Idempotent. |
| Async Method | stream |
Yield successive byte chunks from the request body. |
| Class Variable | __slots__ |
Undocumented |
| Property | is |
Return True when the full body has been cached by read(). |
| Property | is |
Return True when the raw transport stream has been consumed. |
orionis.http.payload.body.BodyStreamBuffer and return the full request body. Idempotent.
Implementations must cache the result so repeated calls return the same bytes object without re-reading the transport.
| Returns | |
bytes | Complete body as a contiguous bytes object. |
orionis.http.payload.body.BodyStreamYield successive byte chunks from the request body.
Implementations must replay from the internal buffer when read() was called first, so streaming consumers (e.g. multipart parsers) still work after a plain body() call.
| Yields | |
bytes | A chunk of the raw request body. |
| Raises | |
RuntimeError | If the stream was consumed by a streaming consumer before the body was buffered. |
PayloadTooLargeException | If incoming data exceeds the configured body-size limit. |
orionis.http.payload.body.BodyStreamReturn True when the full body has been cached by read().
| Returns | |
bool | True if the body has been fully buffered, False otherwise. |
orionis.http.payload.body.BodyStreamReturn True when the raw transport stream has been consumed.
| Returns | |
bool | True if the transport stream has been iterated, False otherwise. |