Skip to main content
Version: Next

ApifyFileSystemKeyValueStoreClient

Apify-specific implementation of the FileSystemKeyValueStoreClient.

The only difference is that it overrides the purge method to delete all files in the key-value store directory, except for the metadata file and the INPUT.json file.

Index

Methods

__init__

  • __init__(*, metadata, path_to_kvs, lock): None
  • Parameters

    • keyword-onlymetadata: KeyValueStoreMetadata
    • keyword-onlypath_to_kvs: Path
    • keyword-onlylock: asyncio.Lock

    Returns None

delete_value

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

    • keyword-onlykey: str

    Returns None

get_public_url

  • async get_public_url(*, key): str
  • Parameters

    • keyword-onlykey: str

    Returns str

get_value

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

    • keyword-onlykey: str

    Returns KeyValueStoreRecord | None

open

  • async open(*, id, name, alias, configuration): Self
  • Parameters

    • keyword-onlyid: str | None
    • keyword-onlyname: str | None
    • keyword-onlyalias: str | None
    • keyword-onlyconfiguration: CrawleeConfiguration

    Returns Self

purge

  • async purge(): None
  • Purges the key-value store by deleting all its contents.

    It deletes all files in the key-value store directory, except for the metadata file and the input related file and its metadata.


    Returns None

record_exists

  • async record_exists(*, key): bool
  • Parameters

    • keyword-onlykey: str

    Returns bool

set_value

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

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

    Returns None