SmartApifyStorageClient
Index
Methods
__init__
Initialize the Apify storage client.
Parameters
optionalkeyword-onlycloud_storage_client: ApifyStorageClient | None = None
Client used to communicate with the Apify platform storage. Either through
force_cloud
argument when opening storages or automatically when running on the Apify platform.optionalkeyword-onlylocal_storage_client: StorageClient | None = None
Client used to communicate with the storage when not running on the Apify platform and not using
force_cloud
argument when opening storages.
Returns None
__str__
Returns str
create_dataset_client
Parameters
optionalkeyword-onlyid: str | None = None
optionalkeyword-onlyname: str | None = None
optionalkeyword-onlyalias: str | None = None
optionalkeyword-onlyconfiguration: CrawleeConfiguration | None = None
Returns DatasetClient
create_kvs_client
Parameters
optionalkeyword-onlyid: str | None = None
optionalkeyword-onlyname: str | None = None
optionalkeyword-onlyalias: str | None = None
optionalkeyword-onlyconfiguration: CrawleeConfiguration | None = None
Returns KeyValueStoreClient
create_rq_client
Parameters
optionalkeyword-onlyid: str | None = None
optionalkeyword-onlyname: str | None = None
optionalkeyword-onlyalias: str | None = None
optionalkeyword-onlyconfiguration: CrawleeConfiguration | None = None
Returns RequestQueueClient
get_storage_client_cache_key
Parameters
configuration: CrawleeConfiguration
Returns Hashable
get_suitable_storage_client
Get a suitable storage client based on the global configuration and the value of the force_cloud flag.
Parameters
optionalkeyword-onlyforce_cloud: bool = False
If True, return
cloud_storage_client
.
Returns StorageClient
SmartApifyStorageClient that delegates to cloud_storage_client or local_storage_client.
When running on Apify platform use cloud_storage_client, else use local_storage_client. This storage client is designed to work specifically in Actor context.