Python collections over any storage.
Dicts, lists, sets, and trees that feel native to Python but live in RocksDB, LMDB, or memory.
What it is.
The KV foundation under nu.kv. Standalone, dependency-light, usable on its own.
Native feel. Flat KV under.
Point a variable at storage. Read and write like a dict or a list. Nothing materializes until you touch it.
Views compose data-structure logic over flat tuple-key storage. Any store that implements the storage protocol gets every collection for free.
What you get.
SQLAlchemy-shaped ergonomics without the SQL. No ORM, no schema, no server process to run.
Every collection carries the same four properties, backend to backend. The API you learn on an in-memory store is the API you keep on RocksDB.
Backend-agnostic.
RocksDB, LMDB, in-memory. Bring your own.
Transactional.
Full ACID when the backend supports it.
Observable.
Watch changes at any level of the hierarchy.
Lazy.
Nothing loads until you access it.
Sixty seconds of code.
Open a root. Assign nested dicts. Open a list underneath. Commit.
Swap InMemoryStorage for RocksDBStorage and the same lines write to disk.
Powers Nu.
virtuals is the substrate. nu.kv wraps it in Refs so state reads and writes look like plain Python.
Like what you see?
The project is young. Star it, join the room, watch what we ship next.