Streaming responses¶
Async streaming responses for endpoints that produce large or open-ended payloads. See the Responses guide for buffering, encoder customisation, and SSE reconnection notes.
StreamingJSONListResponse ¶
Bases: StreamingHttpResponse
Streams a JSON array one element at a time from an async iterable. Useful for endpoints that return a long list without buffering the whole response in memory.
NDJSONResponse ¶
Bases: StreamingHttpResponse
Streams newline-delimited JSON, one object per line, from an async iterable. Useful for log-style endpoints and clients that consume incremental updates.
SSEResponse ¶
Bases: StreamingHttpResponse
Streams Server-Sent Events from an async iterable. Items may be strings or dicts.