tinyjsondb
tinyjsondb is a tiny, JSON-backed, embedded database with an ORM-like API.
It stores each model in a single .json
file and provides CRUD operations through familiar Django-style managers.
Requirements
- Python ≥ 3.8
- portalocker (for cross-platform file locking)
Installation
install latest commit from GitHub
pip install git+https://github.com/Waland2/tinyjsondb.git
Quick start
from tinyjsondb import Model, IntegerField, StringField
class User(Model):
path_to_file = "users.json"
age = IntegerField()
name = StringField(default="Anonymous")
User.sync()
alice = User.objects.create(age=24, name="Alice")
bob = User.objects.get(age=24)
bob.update(name="Bob")
bob.delete()
License
MIT © 2025 Waland2