| 156 | ) -> None: |
| 157 | async def app(scope: Scope, receive: Receive, send: Send) -> None: |
| 158 | class CustomAsyncIterable: |
| 159 | async def __aiter__(self) -> AsyncIterator[str | bytes]: |
| 160 | for i in range(5): |
| 161 | yield str(i + 1) |
| 162 | |
| 163 | response = StreamingResponse(CustomAsyncIterable(), media_type="text/plain") |
| 164 | await response(scope, receive, send) |