title: SQLAlchemy - Is there a way to see what is currently in the session?
body: <p>I'm curious if there's a way to show what is currently in the session? </p>
  
  <p>Or perhaps a way to check if the session is empty or not so that I can do something like the below. </p>
  
  <pre><code>if db.session:
      db.session.commit()
  </code></pre>
  
  <p>This way it will only commit if there's actually something in the session waiting to be committed. </p>