Skip to main content
Version: 0.6

KeyValueStoreClient

Sub-client for manipulating a single key-value store.

Hierarchy

Index

Methods

__init__

  • __init__(args, kwargs): None

delete

  • delete(): None

delete_record

  • delete_record(key): None

get

  • get(): Optional[Dict]

get_record

  • get_record(key, *, as_bytes, as_file): Optional[Dict]
  • 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_keys(*, limit, exclusive_start_key): Dict

  • 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_record(key, value, content_type): None

update

  • update(*, name): Dict