title: Flask Stream Output Of Function To Browser
body: <p>Reading this page <a href="http://flask.pocoo.org/docs/patterns/streaming/" rel="noreferrer">http://flask.pocoo.org/docs/patterns/streaming/</a> it seems like I might be able to do what I want, I have a simple url route that sends the output to json but I rather is stream the output:</p>
  
  <pre><code>@app.route('/')
  def aws_api_route_puppet_apply(ip=None):
      output = somemethod(var1,var2,var3)
      return Response(json.dumps(output), mimetype='application/json') 
  </code></pre>
  
  <p>Is there a way to stream the somemethod to the browser using just flask and HTML or do I need to use javascript?</p>