kms - a tiny side project tuned into a library.
JSON storage wrapper and editor. Created with love by Boss_1s.
Once upon a time, this was just a small project to solve a problem: the over-steep learning curve for scratchattach's database functionality. Now, I have decided to make it a library, something with humble beginnings with big hopes in its future.
This is, after all, the greatest piece of a CPython progam I have made. ;)
Install with pip:
pip install -U key-multivalue-storageOr, download the latest version of the .whl file in the releases page
You can also choose to download the development environment alongside the package:
pip install -U key-multivalue-storage[dev]- Create a Storage object to prepare the data to be stored:
from key_multivalue_storage import Storage
my-db = Storage("my_top_level_key", mysubkey="myvalue", myothersk="anotherval")- To store the object, use
Storage.store().
my-db.store("database.json")- You can change certain global settings for each
Storageinstance.
Storage.indent = 4 #indent size of JSON files
Storage.encode = True # Whether to encode stored values
Storage.auto_delete_self = True
# Whether to automatically release the object
# from memory after certain operations i.e.
# Storage.store()