[Fixed]-Returning items as they come in Python

1👍

You can use StreamingHttpResponse. Note that your web server might still buffer the entire response before sending it to the client. I’ve noticed that nginx by default does this (but may be configurable), whereas apache by default sends the response as it comes in from the backend.

If you choose to return short responses updated through JavaScript, I believe django-channels is the way to go, though I’m not certain (never used it, but it’s quite fashionable).

Leave a comment