Skip to content

Instantly share code, notes, and snippets.

@circa10a
Last active February 18, 2019 20:41
Show Gist options
  • Save circa10a/dee52947e873dd49f80ed964500f7b68 to your computer and use it in GitHub Desktop.
Save circa10a/dee52947e873dd49f80ed964500f7b68 to your computer and use it in GitHub Desktop.
tinydb python usage
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')))
@sparamas
Copy link

Great, good example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment