Last active
February 18, 2019 20:41
-
-
Save circa10a/dee52947e873dd49f80ed964500f7b68 to your computer and use it in GitHub Desktop.
tinydb python usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tinydb import TinyDB, Query | |
db = TinyDB('./test.db') | |
query = Query() | |
usersObj = [ | |
{ | |
'name':'jim', | |
'age': 24 | |
}, | |
{ | |
'name':'jam', | |
'age': 23 | |
} | |
] | |
#db.insert_multiple(usersObj) | |
print(db.search(query.name.matches('^ja'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great, good example.