This is a basic Key-Value store library.
It uses folders as a hash, files as keys and files contents as values.
cat 'some#/hash#/path#/mykeyK'
>> this is the value of mykey
Hashes are systematically appended the ‘#’ character. Keys are systematically appended the ‘K’ character.
- be able to remove keys/hashes
This is done using the configure
function.
This will add the key myKey
to the hash this/is/a/hash
under the folder /tmp/test
.
It sets the myKey
’s value to some value
kv.configure('/tmp/test', 'this/is/a/hash', 'myKey', 'some value')
get_config
function.
kv.get_config('/tmp/test', 'this/is/a/hash', 'myKey')
>>> 'some value'