V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  louisganlu  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2018-05-30 16:09:39 +08:00
回复了 chenqh 创建的主题 Python 有使用过 Python tinydb 这个库的吗,求助
http://tinydb.readthedocs.io/en/latest/usage.html
The second, traditional way of constructing queries is as follows:

>>> from tinydb import where
>>> db.search(where('field') == 'value')
Using where('field') is a shorthand for the following code:

>>> db.search(Query()['field'] == 'value')
Accessing nested fields with this syntax can be achieved like this:

>>> db.search(where('birthday').year == 1900)
>>> db.search(where('birthday')['year'] == 1900)
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2785 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 12:48 · PVG 20:48 · LAX 04:48 · JFK 07:48
Developed with CodeLauncher
♥ Do have faith in what you're doing.