title: Show the SQL generated by Flask-SQLAlchemy
body: <p>I want to get the SQL issued by Flask-SQLAlchemy queries.  In Django, I can print the <code>query</code> attribute to get SQL.  How can I get something similar in Flask?</p>
  
  <pre><code># django
  &gt;&gt;&gt; queryset = MyModel.objects.all()
  &gt;&gt;&gt; print queryset.query
  SELECT "myapp_mymodel"."id", ... FROM "myapp_mymodel"
  </code></pre>