JawaDB
A simple persistent JSON database for Python that acts like a regular dictionary or list.
Installation
pip install jawadb
Usage
import jawadb
db = jawadb.load("mydata.json")
db["key"] = "value"
db["nested"] = {"foo": "bar"}
db = jawadb.load("mylist.json")
db += ["item1", "item2"]
db.append("item3")
Features
- Automatic persistence to JSON file
- Use as either dictionary or list (type is determined by first operation)
- Handles nested structures
- Atomic file writes
- Saves on program exit, Ctrl-C, and garbage collection
- Type hints included
License
MIT License