title: How to run multiple queries in sqlalchemy as atomic operation?
body: <p>My current solution involves using the execute() method on sqlalchemy each time when I want to run multiple queries.
  for eg.</p>
  <pre><code>connection.connect().execute(&quot;query1&quot;)
  connection.connect().execute(&quot;query2&quot;)
  connection.connect().execute(&quot;query3&quot;)
  </code></pre>
  <p>This will execute the queries one by one, however it is possible that &quot;query2&quot; execution failed but the &quot;query1&quot; would have ran.
  how to revert back to original state in case any intermediary queries fail. Like if &quot;query1&quot; and &quot;query2&quot; ran but &quot;query3&quot; failed, then how do I make it rollback to original state</p>