Coverage for docs_src / custom_response / tutorial007_py310.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-02-12 18:15 +0000

1from fastapi import FastAPI 1abcd

2from fastapi.responses import StreamingResponse 1abcd

3 

4app = FastAPI() 1abcd

5 

6 

7async def fake_video_streamer(): 1abcd

8 for i in range(10): 1efg

9 yield b"some fake video bytes" 1efg

10 

11 

12@app.get("/") 1abcd

13async def main(): 1abcd

14 return StreamingResponse(fake_video_streamer()) 1efg