SQLAlchemy 1.0.0b1 發布,Python的ORM框架
SQLAlchemy 在構建在 WSGI 規范上的下一代 Python Web 框架中得到了廣泛應用,它是由 Mike Bayer 和他的核心開發人員團隊開發的一個單獨的項目。使用 ORM 等獨立 SQLAlchemy 的一個優勢就是它允許開發人員首先考慮數據模型,并能決定稍后可視化數據的方式(采用命令行工具、Web 框架還是 GUI 框架)。這與先決定使用 Web 框架或 GUI 框架,然后再決定如何在框架允許的范圍內使用數據模型的開發方法極為不同。
SQLAlchemy 的一個目標是提供能兼容眾多數據庫(如
SQLite、MySQL、Postgres、Oracle、MS-SQL、SQLServer 和
Firebird)的企業級持久性模型。
This is the first beta release in the new 1.0 series of SQLAlchemy. Users
are encouraged to ensure that their pip installations are up-to-date, so
that version 1.0.0b1 will only install if explcitly specified using the --pre flag.
Release 1.0.0b1 features a large degree of internal rearchitecture, new features, and bug fixes. Key highlights include:
- 性能改進 - Function call counts are reduced in many areas across the library, including Core execution and result set formulation, ORM query construction, ORM result set fetching, mass object expiration, and ORM persistence. The memory footprint of an ORM application is also greatly reduced by rolling out the use of __slots__ across a wide array of internal structures.
- 新的性能特性 - for even more performance gains, new APIs are introduced to the ORM which can dramatically improve the performance of certain operations. See features such as Baked Queries and Bulk Insert/Update API. New documentation and examples regarding performance are added as well, including the new example performance suite.
- New Dialect Features - In particular, the Postgresql, MySQL, and SQLite dialects have significant changes, in particular regarding improved datatype support and improved database reflection.
- Dozens of other improvements - Small but useful improvements like removing the need for use_alter and autoload_with implies autoload=True are part of a long list of changes which can be seen in the What's new in 1.0? document.
Users should carefully review the migration document as well as the Changelog to note which behaviors and issues are affected. We'd like to thank the many contributors who helped with this release.
SQLAlchemy 1.0.0b1 is available on the Download Page.