Note
To use this library, you must have Python installed on your device.
Don’t have Python? Install it here: https://python.org/downloads
You can install kms with pip:
pip install key-multivalue-storage
Or, install it with uv:
uv add key-multivalue-storage
You can also install the dev extra. This extra provides Pylint on the side, allowing for easier development and testing.
pip install key-multivalue-storage[dev]
Warning
This extra is only available on versions later than kms-v1.2.2/2026.05.06b.
Note
From kms-semver1.3.0 onwards, this extra will also include griffe and kms-testing.
Tip
No pip or uv? Install the wheel here:
https://pypi.org/project/key-multivalue-storage/#files
Tip
When importing just logic related to Storage (i.e. Storage, Load, Edit, Delete), the recommended import statement is:
from key_multivalue_storage import Storage # note the module name!
Otherwise, the main recommended import statement stands as:
import key_multivalue_storage as kms # note the module name!
from key_multivalue_storage import Storage # note the module name!
my-db = Storage("my_top_level_key", mysubkey="myvalue", myothersk="anotherval")
Storage.store().
my-db.store("database.json")
my-db = Storage.Load.by_key("my_top_level_key")
print(my-db)
Output: ```json { “my_top_level_key”: { “mysubkey”: “myvalue”, “myothersk”: “anotherval” } }
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
StorageThe Storage class is the main class in this library, in which all operations revolve around. It is (so far) the only class in the library that can be instantiated.
Storage.store(file_path: str)Storage.LoadStorage.Load.by_key(file_path: str, top_lv_key: Any)Storage.EditStorage.DeleteWarning
In kms-semver1.3.0, these warnings and exceptions will no longer fall under kms.Storage but rather just kms.