A uniform, immutable data store, addressable by its contents, with consistent properties and types.
An Entry is a set of fields, addressable by a hash of its contents.
A Field is a named value, where name used for a field is globally unique, intended to be used consistently across all instances of entries.
Where possible the name used for a field matches, or can be mapped onto properties example a field with a name of post-code will always indicate the postal code, regardless of where it appears.
An Entry may be addressed using a unique identifier hash
generated from the git-hash value for the canonical JSON serialization of its contents.
Each field has a defined Datatype
which may be used to constrain the field value, for example string
, text
, date-time
, curie
, etc.
When defining a field, the datatype may be qualified by a single suffix character:
*
— the field is a list of values
The canonical format for a single Entry is sorted JSON with whitespaces removed, but other representations can hold a list of Entries with fidelity:
- .yaml - a YAML serialisation of the JSON jsontoyaml
- .txt - a plain text version compatible with TiddlyWeb
Entries and Openregister data models are independent of how they may be stored, but are intended to easily map to git, key-stores such as mongodb, and redis, relational database tables, and conventional filesystems.
Requires Python 3.4:
$ mkvirtualenv openregister
$ workon openregister
(openregister) make init
(openregister) make
The MongoDB tests require mongo to be running:
$ mongod