Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File API for streamed Response ? #114

Open
yohanboniface opened this issue Mar 10, 2020 · 0 comments
Open

File API for streamed Response ? #114

yohanboniface opened this issue Mar 10, 2020 · 0 comments

Comments

@yohanboniface
Copy link
Member

I was thinking this morning while working on a project that outputs a lot of CSV that that would be very handy if Response would obey to the file API, so one would do something like:

import csv

@app.route('/')
async def my_view(request, response):
    writer = csv.writer(response)
    writer.writerow(xxxx)

Meaning that at first response.write call, the Response would send the headers and first chunk, and then stream chunks at each later calls.

I remember we did discuss this some time ago, but can't remember the conclusion, so just put here a reminder to either implement this, or explain it would not be a good idea. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant