Skip to main content

KeyValueStoreClient

Key-value store resource client implementation based on the Apify platform storage.

Index

Methods

__init__

  • __init__(*, apify_key_value_store_client, api_public_base_url): None
  • Parameters

    • optionalkeyword-onlyapify_key_value_store_client: KeyValueStoreClientAsync
    • optionalkeyword-onlyapi_public_base_url: str

    Returns None

delete

  • async delete(): None
  • Returns None

delete_record

  • async delete_record(*, key): None
  • Parameters

    • optionalkeyword-onlykey: str

    Returns None

get

  • async get(): KeyValueStoreMetadata | None
  • Returns KeyValueStoreMetadata | None

get_public_url

  • async get_public_url(*, key): str
  • Get a URL for the given key that may be used to publicly access the value in the remote key-value store.


    Parameters

    • optionalkeyword-onlykey: str

      The key for which the URL should be generated.

    Returns str

get_record

  • async get_record(*, key): KeyValueStoreRecord | None
  • Parameters

    • optionalkeyword-onlykey: str

    Returns KeyValueStoreRecord | None

get_record_as_bytes

  • async get_record_as_bytes(*, key): KeyValueStoreRecord | None
  • Parameters

    • optionalkeyword-onlykey: str

    Returns KeyValueStoreRecord | None

list_keys

  • async list_keys(*, limit, exclusive_start_key): KeyValueStoreListKeysPage
  • Parameters

    • optionalkeyword-onlylimit: int = 1000
    • optionalkeyword-onlyexclusive_start_key: str | None = None

    Returns KeyValueStoreListKeysPage

set_record

  • async set_record(*, key, value, content_type): None
  • Parameters

    • optionalkeyword-onlykey: str
    • optionalkeyword-onlyvalue: Any
    • optionalkeyword-onlycontent_type: str | None = None

    Returns None

stream_record

  • async stream_record(*, key): AbstractAsyncContextManager[KeyValueStoreRecord[Response] | None]
  • Parameters

    • optionalkeyword-onlykey: str

    Returns AbstractAsyncContextManager[KeyValueStoreRecord[Response] | None]

update

  • async update(*, name): KeyValueStoreMetadata
  • Parameters

    • optionalkeyword-onlyname: str | None = None

    Returns KeyValueStoreMetadata