Even though we’re currently rocking and rolling with MongoDB for our group’s social media projects at work, I still like to keep tabs on one of my favorite Python libraries: SQLAlchemy. SQLAlchemy is an open source SQL toolkit and object-relational mapper for the Python programming language released under the MIT License.
It looks like a new version of SQLAlchemy was released on April 18th. According to the website, this release is the culmination of well over a year of effort towards restructuring and enhancements including:
- Support for Python 2.4+, Python 3, and Jython.
- Decouping of DBAPI adapters and database dialects allow any number of DBAPIs to be cleanly supported.
- Support for Sybase, mxODBC, pg8000, py-postgresql, OurSQL, MySQL-Connector-Python, zxjdbc is added, including new options and capabilities for many dialects (see the compatibility chart).
- Enhancements to “eager loading”, including a new “subquery” eager load that loads all collections using a maximally efficient query-per-relationship scheme.
- An entirely new unit of work system which runs more effectively and simply, using less memory and CPU.
- A flexible SQL compiler and execution system, now supporting RETURNING clauses when available, clause constructs for DDL elements (i.e. CREATE TABLE) and type objects, stricter SQL standard compliance where needed, and an extension system allowing the creation of new SQL constructs and open-ended extension to those provided.
- Query result caching capability, including an example illustrating integration with Beaker.
The full list of what’s been updated can be found here. According to the website, SQLAlchemy 0.6 has already seen production usage for several months and has been tested by hundreds, so go check it out.