Skip to main content

load

async def load(name: str) -> int
ParamDescription
nameThe 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

  • ResponseError
  • ValueError
    • name is empty

Examples

Assuming a previous call to save('my_data'):

Load keys
count = await kv.load('my_data')
print(f'Loaded {count} keys')