SQLAlchemy 1.2.16 發布,Python ORM 框架

2020-12-16 開源中國

SQLAlchemy 1.2.16 發布了,SQLAlchemy 是一個 Python 的 SQL 工具包以及資料庫對象關係映射框架。它包含整套企業級持久化模式,專門用於高效和高性能的資料庫訪問。

此版本更新包含了一系列 dialect 和引擎級的修復,以及包含非 ascii 字符的 DBAPI 異常消息的 Unicode 解碼的1.2回滾。具體更新如下:

engine

  • engine Fixed a regression introduced in version 1.2 where a refactor of the SQLAlchemyError base exception class introduced an inappropriate coercion of a plain string message into Unicode under python 2k, which is not handled by the Python interpreter for characters outside of the platform’s encoding (typically ascii). The SQLAlchemyError class now passes a bytestring through under Py2K for __str__() as is the behavior of exception objects in general under Py2K, does a safe coercion to unicode utf-8 with backslash fallback for __unicode__(). For Py3K the message is typically unicode already, but if not is again safe-coerced with utf-8 with backslash fallback for the __str__() method.

    References: #4429

sql

postgreql

  • postgresql Fixed issue where a postgresql.ENUM or a custom domain present in a remote schema would not be recognized within column reflection if the name of the enum/domain or the name of the schema required quoting. A new parsing scheme now fully parses out quoted or non-quoted tokens including support for SQL-escaped quotes.

    References: #4416

  • postgresql Fixed issue where multiple postgresql.ENUM objects referred to by the same MetaData object would fail to be created if multiple objects had the same name under different schema names. The internal memoization the PostgreSQL dialect uses to track if it has created a particular postgresql.ENUM in the database during a DDL creation sequence now takes schema name into account.

sqlite

  • sqlite Reflection of an index based on SQL expressions are now skipped with a warning, in the same way as that of the Postgresql dialect, where we currently do not support reflecting indexes that have SQL expressions within them. Previously, an index with columns of None were produced which would break tools like Alembic.

    References: #4431

misc

發布公告

下載地址

相關焦點

  • SQLAlchemy 1.3.8 發布,Python ORM 框架
    SQLAlchemy 1.3.8 發布了。SQLAlchemy 是一個 Python 的 SQL 工具包以及資料庫對象映射(ORM)框架。
  • Python資料庫ORM工具sqlalchemy的學習筆記
    ()[0]     print "Data: %s" % data  與python自帶的sqlite不同,這裡不需要Cursor光標,執行sql語句不需要commit 2. connection事務 使用事務可以進行批量提交和回滾 from sqlalchemy import create_engine  # 資料庫連接字符串 DB_CONNECT_STRING
  • SQLAlchemy連接與搭建
    ORM(Object Relational Mapping,對象關係映射)可以繞過SQL語言,通過映射關係操作資料庫,SQLAlchemy包就是ORM框架之一。ORM把表映射為類,把行映射為實例,把欄位映射為屬性,最終在執行對象操作時把對象的操作轉換為資料庫的原生語句。簡言之就是藉助映射平臺將python語言轉換為sql語言。
  • Python數據科學實踐 | 資料庫1
    本章運行環境為:Python3.5.2,SQLAlchemy1.2.16SQLAlchemy支持多種主流的SQL,如PostgreSQL、MySQL、SQLite、Oracle、SQL Server。表9.1.1 需要用到的函數例9.1.1 示例代碼import osfrom sqlalchemy import create_enginefrom sqlalchemy.orm import sessionmakerfrom sqlalchemy.ext.declarative
  • sqlalchemy操作資料庫(二)
    sqlalchemy的基本操作表結構如下:from sqlalchemy import create_enginefrom
  • SQLAlchemy介紹
    Python部落(python.freelycode.com)組織翻譯,禁止轉載,歡迎轉發。
  • 【附答案】300+ 道 2020年 Python面試題 分享
    11、python遞歸的最大層數?12、求結果:v1 = 1 or 3v2 = 1 and 3v3 = 0 and 2 and 1v4 = 0 and 2 or 1v5 = 0 and 2 or 1 or 4v6 = 0 or Flase and 113、ascii、unicode、utf-8、gbk 區別?14、字節碼和機器碼的區別?
  • 7k Star 的 Python 測試框架入門指南
    Pytest 是一款 Python 測試框架及測試運行器。在本指南中,我們將會介紹 pytest 最有用和常見的配置和用法,以及幾個 pytest 插件和外部庫。儘管 Python 的標準庫中已經自帶了 unittest 模塊,並且也還有其他 Python 測試框架(例如 nose2 或 Ward),但 pytest 仍然是我的最愛。
  • 不吹不擂,你想要的Python面試都在這裡了【315+道題】
    11、python遞歸的最大層數?12、求結果:v1 = 1 or 3v2 = 1 and 3v3 = 0 and 2 and 1v4 = 0 and 2 or 1v5 = 0 and 2 or 1 or 4v6 = 0 or Flase and 113、ascii、unicode、utf-8、gbk 區別?
  • Hibernate ORM 5.4.0.CR1 發布,數據持久層框架
    Hibernate ORM 5.4.0 的第一個候選版本已發布。更新內容改進 EntityGraphJPA 的 EntityGraph 功能定義和使用起來很麻煩。
  • python web學習路線知識點分享!
    >結構python: 內置庫,爬蟲庫,web框架,資料庫接口等。markdown/sphinx/docstring/readthedoc等(使用vim的話推薦python-mode插件,或者直接用IDE工具pycharm)相關框架(庫):django/flask/tornado/requests/sqlalchemy/unittest/celery等等資料庫:
  • SQLObject 1.3.1 發布,Python的ORM框架 - OSCHINA - 中文開源技術...
    SQLObject 1.3.1 發布,該版本修復了 PostgreSQL 相關的一些小bug:VIEWs don't have PRIMARY KEYs; sqlmeta.idName
  • Python 資料庫騷操作 -- MySQL
    sqlalchemy import create_engine, Column, Integer, String, BIGINT, ForeignKey, UniqueConstraint, Index, and_, or_, inspectfrom sqlalchemy.orm import sessionmaker, relationship,contains_eager# echo
  • 你對Python裡的import一無所知
    中默認為 -1,表示同時支持 absolute import 和 relative import。如果大於 0,則表示相對導入的父目錄的級數,即 1 類似於 '.',2 類似於 '..'。示例如下:>>> with open("/usr/lib64/python2.7/os.py", "r") as f:...     exec(f.read())...
  • Python炫技操作:花式導包的八種方法
    中默認為 -1,表示同時支持 absolute import 和 relative import。如果大於 0,則表示相對導入的父目錄的級數,即 1 類似於 '.',2 類似於 '..'。示例如下:>>> with open("/usr/lib64/python2.7/os.py", "r") as f:...     exec(f.read())...
  • python久負盛名且成熟的web框架
    Django簡介發布於2005年,最負盛名且成熟的Python網絡框架:最初用來製作在線新聞的Web站點開源Web框架,遵守BSD對MVC和MTV框架的理解MVC框架與MTV框架可以理解為同一種框架,只是命名不一樣,前者是相對於java等程式語言命名的,後者是相對於python命名的。MVC框架(MTV框架)是一種 把業務邏輯、數據、界面顯示分離而設計創建的Web 應用程式的開發模式。
  • Java通用數據訪問層 Fastser-DAL 1.0.2 發布
    Fastser-DAL是Java通用數據訪問組件,基於mybatis、spring jdbc、hibernate等ORM框架開發
  • Python框架有哪些?區別是什麼?
    1、Django談到Python框架,我們第一個想到的應該就是Django。它與其他框架最大的區別就是,鮮明獨特的特性,支持orm,將資料庫的操作封裝成為Python,對於需要適用多種資料庫的應用來說是個比較好的特性。2、Flask相信大家都知道Flask是一個用Python編寫的輕量級Web應用框架。Flask也被稱為「microframework」,因為它使用簡單的核心,用extension增加其他功能。Flask沒有默認使用的資料庫、窗體驗證工具。
  • Python之UnitTest框架介紹
    UnitTest的介紹Python中相對比較流行的自動化測試框架UnitTest,早期主要時用於做單元測試,隨著自動化更新,能夠完善的結合Selenium/Appium/Requests等實現UI自動化與接口自動化。
  • Apache Gora 0.8 發布,NoSQL 的 ORM 框架
    Apache Gora 0.8 已發布,Gora 是一個應用於 NoSQL 資料庫的 ORM 框架。