KeyValueStoreClient
Index
Methods
create_keys_public_url
Generate a URL that can be used to access key-value store keys.
If the client has permission to access the key-value store's URL signing key, the URL will include a signature to verify its authenticity.
You can optionally control how long the signed URL should be valid using the
expires_in_secsoption. This value sets the expiration duration in seconds from the time the URL is generated. If not provided, the URL will not expire.Any other options (like
limitorprefix) will be included as query parameters in the URL.Parameters
keyword-onlylimit: int | None = None
keyword-onlyexclusive_start_key: str | None = None
keyword-onlycollection: str | None = None
keyword-onlyprefix: str | None = None
keyword-onlyexpires_in_secs: int | None = None
Returns str
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
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
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
signature: str | None = None
Returns dict | None
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
signature: str | None = None
Returns dict | None
get_record_public_url
Generate a URL that can be used to access key-value store record.
If the client has permission to access the key-value store's URL signing key, the URL will include a signature to verify its authenticity.
Parameters
key: str
Returns str
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
keyword-onlylimit: int | None = None
keyword-onlyexclusive_start_key: str | None = None
keyword-onlycollection: str | None = None
keyword-onlyprefix: str | None = None
keyword-onlysignature: str | None = None
Returns dict
record_exists
Check if given record is present in the key-value store.
Parameters
key: str
Returns bool
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
value: Any
content_type: str | None = None
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
signature: str | None = None
Returns Iterator[dict | 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
keyword-onlyname: str | None = None
keyword-onlygeneral_access: StorageGeneralAccess | None = None
Returns dict
Sub-client for manipulating a single key-value store.