load
async def load(name: str) -> int
| Param | Description |
|---|---|
| name | The name of the dataset. The name was used previously with save() |
Restores keys that were previously persisted with save().
note
- Persistance does not have to be enabled for this command
- You can also load at startup, using
--loadName
Returns
The number of keys loaded.
Raises
ResponseErrorValueErrornameis empty
Examples
Assuming a previous call to save('my_data'):
Load keys
count = await kv.load('my_data')
print(f'Loaded {count} keys')