Start here. This is the direct spoken answer to practice first.
Overview
Streaming saves memory only when every layer avoids rebuilding the whole body and the producer stops when the client leaves.
I return a StreamingResponse backed by an iterator or async iterator that produces bounded chunks instead of materializing the entire result. An async producer should await async I/O, while a synchronous iterator can be consumed through Starlette's thread-pool support. The iterator owns or is given resources that remain valid until iteration ends and closes them in finally. The response also sets the correct media type and any safe length or disposition headers the client needs.