https://pypi.org/project/json-repository/ pip install json-repository
You can also go to tests to check a good how-to!
class Foo(object):
foo = None
bar = None
id = None
class FoobarRepository(BaseJsonRepository):
def __init__(self):
super(FoobarRepository, self).__init__(Foo)
with FoobarRepository() as repo:
for entity in repo.get_all():
repo.delete(entity)
repo.context.commit()