Python library for storing and querying JSON-like documents.
# Source: https://github.com/msiemens/tinydb | License: MIT | Copyright 2013 Markus Siemens <markus@m-siemens.de>
# Provided via justclaw.it.com; keep this notice with the code.
"""
TinyDB is a tiny, document oriented database optimized for your happiness :)
TinyDB stores different types of Python data types using a configurable
storage mechanism. It comes with a syntax for querying data and storing
data in multiple tables.
.. codeauthor:: Markus Siemens <markus@m-siemens.de>
Usage example:
>>> from tinydb import TinyDB, where
>>> from tinydb.storages import MemoryStorage
>>> db = TinyDB(storage=MemoryStorage)
>>> db.insert({'data': 5}) # Insert into '_default' table
>>> db.search(where('data') == 5)
[{'data': 5}]
>>> # Document IDs are available via Document.doc_id, not an ``_id`` fi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key