Skip to main content
Version: Next

KeyValueStoreCollectionClientAsync

Sub-client for the key-value store collection.

Provides methods to manage the key-value store collection, e.g. list or create key-value stores. Obtain an instance via an appropriate method on the ApifyClientAsync class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClientAsync

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistryAsync

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

get_or_create

iterate

  • iterate(*, unnamed, limit, offset, desc, ownership, timeout): AsyncIterator[KeyValueStore]
  • Iterate over the available key-value stores.

    Simple list does only one API call, possibly not listing all items matching the criteria. This method returns an iterator that is capable of making multiple API calls to retrieve all items matching the criteria.

    https://docs.apify.com/api/v2#/reference/key-value-stores/store-collection/get-list-of-key-value-stores


    Parameters

    • optionalkeyword-onlyunnamed: bool | None = None

      Whether to include unnamed key-value stores in the list.

    • optionalkeyword-onlylimit: int | None = None

      How many key-value stores to retrieve.

    • optionalkeyword-onlyoffset: int | None = None

      What key-value store to include as first when retrieving the list.

    • optionalkeyword-onlydesc: bool | None = None

      Whether to sort the key-value stores in descending order based on their modification date.

    • optionalkeyword-onlyownership: StorageOwnership | None = None

      Filter by ownership. 'ownedByMe' returns only user's own key-value stores, 'sharedWithMe' returns only key-value stores shared with the user.

    • optionalkeyword-onlytimeout: Timeout = 'medium'

      Timeout for the API HTTP request.

    Returns AsyncIterator[KeyValueStore]

list


  • Parameters

    • optionalkeyword-onlyunnamed: bool | None = None

      Whether to include unnamed key-value stores in the list.

    • optionalkeyword-onlylimit: int | None = None

      How many key-value stores to retrieve.

    • optionalkeyword-onlyoffset: int | None = None

      What key-value store to include as first when retrieving the list.

    • optionalkeyword-onlydesc: bool | None = None

      Whether to sort the key-value stores in descending order based on their modification date.

    • optionalkeyword-onlyownership: StorageOwnership | None = None

      Filter by ownership. 'ownedByMe' returns only user's own key-value stores, 'sharedWithMe' returns only key-value stores shared with the user.

    • optionalkeyword-onlytimeout: Timeout = 'medium'

      Timeout for the API HTTP request.

    Returns ListOfKeyValueStores

    The list of available key-value stores matching the specified filters.

Properties

resource_id

resource_id: str | None

Get the resource ID.