 <p>There's a central confusion here over the word "session". I'm not sure here, but it appears like you may be confusing the <a href="http://docs.sqlalchemy.org/en/latest/orm/session.html">SQLAlchemy Session</a> with a <a href="https://dev.mysql.com/doc/refman/5.1/en/set-statement.html">MySQL @@session</a>, which refers to the scope of when you first make a connection to MySQL and when you disconnect.</p> <p>These two concepts are <strong>not the same</strong>. A SQLAlchemy Session generally represents the scope of <strong>one or more transactions</strong>, upon a particular database connection.</p> <p>Therefore, the answer to your question as literally asked, is to call <code>session.close()</code>, that is, "how to properly close a SQLAlchemy session".</p> <p>However, the rest of your question indicates you'd like some functionality whereby when a particular <code>Session</code> is closed, you'd like the actual DBAPI connection to be closed as well.</p> <p>What this basically means is that you wish to disable <a href="http://docs.sqlalchemy.org/en/latest/core/pooling.html">connection pooling</a>. Which as other answers mention, easy enough, <a href="http://docs.sqlalchemy.org/en/latest/core/pooling.html#switching-pool-implementations">use NullPool</a>.</p>