+
Skip to content

File API for streamed Response ? #114

@yohanboniface

Description

@yohanboniface

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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载