title: Mixing SQLAlchemy and Django in Python code base and maintain transaction integrity
body: <p>I have a project where I would want to (need to?) mix SQLAlchemy models, Django models and respective ORMs in the same web codebase. I'd like to have atomic requests by default and tie SQLAlchemy transaction lifecycle to Django request and Django transaction manager.</p>
  
  <p>Does there exist prior art how to make SQLAlchemy to use Django/connections and transaction machinery or vice versa?</p>
  
  <p>What would be good starting point for such integration work? What limitations there are e.g. if you try to reuse the same database connection?</p>
  
  <p>To narrow down the problem:</p>
  
  <ul>
  <li><p>Django ORM and SQLAlchemy ORM won't touch the same tables</p></li>
  <li><p>At the first step, all I care is that when the HTTP request ends both transaction managers commit in somewhat coherent manner e.g. if Django commits the transaction SQLAlchemy does also</p></li>
  <li><p>How can I I say SQLAlchemy to use the database connection configured for Django? </p></li>
  <li><p>Can I bind  SQLAlchemy session to Django transaction manager? When Django opens the database connection I could open a new SQLAlchemy session and bind it to opened Django transactions? When Django commits I could signal SQLAlchemy to flush its stuff so it goes along the same cmmit. Django 1.6 introduced new semantics on atomic transactions, so this might help.</p></li>
  </ul>