Peewee 3.2.5 发布,轻量级 Python ORM 库

栏目: 软件资讯 · 发布时间: 7年前

内容简介:Peewee 3.2.5 已发布,Peewee 是一个轻量级的 python ORM 库,内置对 SQLite、MySQL 和 PostgreSQL 的支持。支持 Python 2.7+ 和 Python 3.4+。 更新内容: 新增 ValuesList ,示例如下: data = [(1, 'fi...

Peewee 3.2.5 已发布,Peewee 是一个轻量级的 python ORM 库,内置对 SQLiteMySQL 和 PostgreSQL 的支持。支持 Python 2.7+ 和 Python 3.4+。

更新内容:

  • 新增 ValuesList ,示例如下:

data = [(1, 'first'), (2, 'second')]
vl = ValuesList(data, columns=('idx', 'name'))

query = (vl
         .select(vl.c.idx, vl.c.name)
         .order_by(vl.c.idx))
# Yields:
# SELECT t1.idx, t1.name
# FROM (VALUES (1, 'first'), (2, 'second')) AS t1(idx, name)
# ORDER BY t1.idx
  • DateTimeField、 DateField 和 TimeField 会在发送至数据库之前解析格式化字符串(formatted-string)。

了解更多详情可查阅更新日志

源码下载:


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上所述就是小编给大家介绍的《Peewee 3.2.5 发布,轻量级 Python ORM 库》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Weaving the Web

Weaving the Web

Tim Berners-Lee / Harper Paperbacks / 2000-11-01 / USD 15.00

Named one of the greatest minds of the 20th century by Time , Tim Berners-Lee is responsible for one of that century's most important advancements: the world wide web. Now, this low-profile genius-wh......一起来看看 《Weaving the Web》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具