Glossary coding Term Page

StreamingResponse

Response class that sends iterable or async-iterable output chunk by chunk instead of buffering everything.

streamingresponse #fastapi#streaming
Korean version

Aliases

StreamingResponsestreaming-response

Related Concepts

Core Idea

StreamingResponse is Starlette's streaming response class, exposed by FastAPI, that turns an iterable or async iterable into an HTTP stream so the client receives data as soon as each chunk is yielded. It keeps the connection open, sets the proper media type (for example text/event-stream for Server-Sent Events), and avoids buffering the full body before sending it.

Why It Matters Here

Mathbong uses StreamingResponse to show how long-running jobs can still provide immediate feedback. By combining it with BackgroundTasks and tuning the keep-alive timeout, the FastAPI series demonstrates how to drip progress updates while heavy work finishes off the main request path.

Posts Mentioning This Concept