from src.jays_tools.json_database.factory import JsonDatabase
from pydantic import BaseModel

class TestModel(BaseModel):
    name: str
    value: int 

with JsonDatabase("test_db.json", TestModel, backup_on_validation_error=False, auto_init=True) as db:
    if db is None:
        ...