SQLAlchemy 1.0.0b1 發布,Python的ORM框架

jopen 10年前發布 | 12K 次閱讀 SQLAlchemy

SQLAlchemy 在構建在 WSGI 規范上的下一代 Python Web 框架中得到了廣泛應用,它是由 Mike Bayer 和他的核心開發人員團隊開發的一個單獨的項目。使用 ORM 等獨立 SQLAlchemy 的一個優勢就是它允許開發人員首先考慮數據模型,并能決定稍后可視化數據的方式(采用命令行工具、Web 框架還是 GUI 框架)。這與先決定使用 Web 框架或 GUI 框架,然后再決定如何在框架允許的范圍內使用數據模型的開發方法極為不同。

什么是 WSGI?

WSGI 是下一代 Python Web 框架、應用程序和服務器應該遵循的規范。WSGI 中 一個有趣的方面是創建 Python 中間件,并在使用 Python 或任何語言創建的 Web 應用程序中使用。 

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.

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!