2024-08-02 04:27:56 +00:00
|
|
|
|
<a id="store-daisy-key-value-store"></a>
|
|
|
|
|
|
|
|
|
|
# Store: Daisy key value store
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
|
### *class* Daisy.Store.Store(store: str, path: str, nodeNickname: str, daisyCryptography)
|
2024-08-01 22:03:59 +00:00
|
|
|
|
|
|
|
|
|
Key value store
|
|
|
|
|
|
|
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/Daisy/Store.py)
|
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
|
#### epehemeral
|
2024-08-01 22:03:59 +00:00
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
|
Memory only records
|
|
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
|
dict
|
|
|
|
|
|
|
|
|
|
#### createEmpty(key: str)
|
|
|
|
|
|
|
|
|
|
* **Parameters:**
|
|
|
|
|
* **key** (*str*)
|
|
|
|
|
* **key** – Key to create empty record at
|
|
|
|
|
|
|
|
|
|
#### getRecord(key: str, ephemeral=False)
|
|
|
|
|
|
|
|
|
|
Get record at key
|
|
|
|
|
|
|
|
|
|
* **Parameters:**
|
|
|
|
|
* **key** (*str*)
|
|
|
|
|
* **ephemeral** (*bool*) – Whether key is only in memory, used for session cryptography credentials currently
|
|
|
|
|
|
|
|
|
|
#### update(entry: str, data, recur: bool = True, write=True)
|
|
|
|
|
|
|
|
|
|
Update given record
|
|
|
|
|
|
|
|
|
|
* **Parameters:**
|
|
|
|
|
* **entry** (*str*) – Key to update record of
|
|
|
|
|
* **data** – Data to update record with
|
|
|
|
|
* **recur** (*bool*) – Whether to iterate over data
|
|
|
|
|
* **write** (*bool*) – Whether record is ephemeral
|