Flexible immutable entity database
pip install savior==0.2.3
Embedded schema-less database library backed by LMDB.
Currently in development and not stable yet. The interface and disk format may change in future versions without notice. You probably shouldn't use it to store important data.
Permissively licensed with the ISC License.
There are three actions you can perform on entities in a transaction:
An entity is conceptually like a dictionary with attributes and values.
A table is an isolated section of the database for storing entities, usually with a similar set of attributes.
All entities of the same type are stored in one inner LMDB database There is no guarantee that entities have a consistent schema.
Entities are stored on disk as a series of timestamped attribute changes.
(uuid, timestamp, attribute) -> value
uuid
is an auto-generated entity IDtimestamp
is an auto-generated timestamp of when the entry was appendedattribute
and value
are the updated entity key value entriesData is not modified for updates, only appended to indicate the entity changed.
The storage format version is stored as an integer in a special inner database
named _metadata
, at a key named version
.
The _metadata
table's keys and values are also encoded with MessagePack.
You can access the storage format version via Database.VERSION
.