KeyValueStoreClient
Hierarchy
- ResourceClient
- KeyValueStoreClient
Index
Methods
__init__
Initialize the KeyValueStoreClient.
Parameters
args: Any
kwargs: Any
Returns None
delete
Delete the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/delete-store
Returns None
delete_record
Delete the specified record from the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/record/delete-record
Parameters
key: str
The key of the record which to delete
Returns None
get
Retrieve the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/get-store
Returns Optional[Dict]
dict, optional: The retrieved key-value store, or None if it does not exist
get_record
Retrieve the given record from the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/record/get-record
Parameters
key: str
Key of the record to retrieve
optionalkeyword-onlyas_bytes: bool = False
Whether to retrieve the record as unparsed bytes, default False
optionalkeyword-onlyas_file: bool = False
Whether to retrieve the record as a file-like object, default False
Returns Optional[Dict]
dict, optional: The requested record, or None, if the record does not exist
list_keys
List the keys in the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/key-collection/get-list-of-keys
Parameters
optionalkeyword-onlylimit: Optional[int] = None
Number of keys to be returned. Maximum value is 1000
optionalkeyword-onlyexclusive_start_key: Optional[str] = None
All keys up to this one (including) are skipped from the result
Returns Dict
dict: The list of keys in the key-value store matching the given arguments
set_record
Set a value to the given record in the key-value store.
https://docs.apify.com/api/v2#/reference/key-value-stores/record/put-record
Parameters
key: str
The key of the record to save the value to
value: Any
The value to save into the record
optionalcontent_type: Optional[str] = None
The content type of the saved value
Returns None
update
Update the key-value store with specified fields.
https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/update-store
Parameters
optionalkeyword-onlyname: Optional[str] = None
The new name for key-value store
Returns Dict
dict: The updated key-value store
Sub-client for manipulating a single key-value store.