Learn to Code ยท zero-dependency ยท MIT

larzstore

A tiny persistent document store.

Between a plain JSON file and a real database there's a sweet spot: a small store that keeps records, gives each an id, and saves itself to disk - so your app remembers things between runs without the weight of a database. insert/find/update/delete, autosaving to JSON.

larzscript pkg install store
View on GitHub →Learn the stack

What you get

Try it

import "store" as store
let s = store.open(nil)
let id = store.insert(s, {"name": "Ada"})
print(store.get(s, id))
store.update(s, id, {"name": "Ada Lovelace"})
print(store.find(s, fn(r) { return r["name"].find("Ada") >= 0 }))
Output
{name: Ada}
[{name: Ada Lovelace}]

Why it's in the Larz Stack

larzstore is a real Larzscript package (larzscript pkg install store) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.