KeyValueStoreClientAsync
apify_client.clients.KeyValueStoreClientAsync
Index
Methods
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 dict | None
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
Returns dict | None
The requested record, or None, if the record does not exist
get_record_as_bytes
Retrieve the given record from the key-value store, without parsing it.
https://docs.apify.com/api/v2#/reference/key-value-stores/record/get-record
Parameters
key: str
Key of the record to retrieve
Returns dict | None
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
limit: int | None = Nonekeyword-only
Number of keys to be returned. Maximum value is 1000
exclusive_start_key: str | None = Nonekeyword-only
All keys up to this one (including) are skipped from the result
Returns 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
content_type: str | None = None
The content type of the saved value
Returns None
stream_record
Retrieve the given record from the key-value store, as a stream.
https://docs.apify.com/api/v2#/reference/key-value-stores/record/get-record
Parameters
key: str
Key of the record to retrieve
Returns AsyncIterator[dict | None]
The requested record as a context-managed streaming Response, or None, if the record does not exist
update
Update the key-value store with specified fields.
https://docs.apify.com/api/v2#/reference/key-value-stores/store-object/update-store
Parameters
name: str | None = Nonekeyword-only
The new name for key-value store
Returns dict
The updated key-value store
Async sub-client for manipulating a single key-value store.