KVStore
KVStore class representing a key-value object storage engine. This class allows serializing/deserializing huge objects on store.
Functions
Initialize self. See help(type(self)) for accurate signature.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
full_file_path | str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
key | str |
Return type:
bool |
Generate a new eloty file in the directory of the kvstore
Return type:
Path |
Return the value for key if key is in the dictionary, else default.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
key | Any | ||
default | Any |
Return type:
str |
Lock the kv store, it can no longer be modified. If a modification happens, it copies the file before updating the data, To copy the file is uses the _lock_copy_name
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
_lock_copy_file_path | str |
Remove the store
Create an new kv store and generate the file name automatically
Return type:
KVStore |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_name | str |
Return type:
KVStore |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
file_name | str | ||
with_extension | bool | True |
Return type:
str |