Skip to main content

apify-client-python

Index

Main Clients

Resource Clients

Async Resource Clients

Helper Classes

Errors

Methods

Constants

Errors

is_retryable_error

  • is_retryable_error(exc): bool
  • Check if the given error is retryable.


    Parameters

    • exc: Exception

    Returns bool

Methods

encode_webhook_list_to_base64

  • encode_webhook_list_to_base64(webhooks): str
  • Encode a list of dictionaries representing webhooks to their base64-encoded representation for the API.


    Parameters

    • webhooks: list[dict]

    Returns str

get_actor_env_var_representation

  • get_actor_env_var_representation(*, is_secret, name, value): dict
  • Parameters

    • keyword-onlyis_secret: bool | None = None
    • keyword-onlyname: str | None = None
    • keyword-onlyvalue: str | None = None

    Returns dict

get_actor_representation

  • get_actor_representation(*, name, title, description, seo_title, seo_description, versions, restart_on_error, is_public, is_deprecated, is_anonymously_runnable, categories, default_run_build, default_run_max_items, default_run_memory_mbytes, default_run_timeout_secs, example_run_input_body, example_run_input_content_type, actor_standby_is_enabled, actor_standby_desired_requests_per_actor_run, actor_standby_max_requests_per_actor_run, actor_standby_idle_timeout_secs, actor_standby_build, actor_standby_memory_mbytes): dict
  • Get dictionary representation of the Actor.


    Parameters

    • keyword-onlyname: str | None
    • keyword-onlytitle: str | None = None
    • keyword-onlydescription: str | None = None
    • keyword-onlyseo_title: str | None = None
    • keyword-onlyseo_description: str | None = None
    • keyword-onlyversions: list[dict] | None = None
    • keyword-onlyrestart_on_error: bool | None = None
    • keyword-onlyis_public: bool | None = None
    • keyword-onlyis_deprecated: bool | None = None
    • keyword-onlyis_anonymously_runnable: bool | None = None
    • keyword-onlycategories: list[str] | None = None
    • keyword-onlydefault_run_build: str | None = None
    • keyword-onlydefault_run_max_items: int | None = None
    • keyword-onlydefault_run_memory_mbytes: int | None = None
    • keyword-onlydefault_run_timeout_secs: int | None = None
    • keyword-onlyexample_run_input_body: Any = None
    • keyword-onlyexample_run_input_content_type: str | None = None
    • keyword-onlyactor_standby_is_enabled: bool | None = None
    • keyword-onlyactor_standby_desired_requests_per_actor_run: int | None = None
    • keyword-onlyactor_standby_max_requests_per_actor_run: int | None = None
    • keyword-onlyactor_standby_idle_timeout_secs: int | None = None
    • keyword-onlyactor_standby_build: str | None = None
    • keyword-onlyactor_standby_memory_mbytes: int | None = None

    Returns dict

get_task_representation

  • get_task_representation(actor_id, name, task_input, build, max_items, memory_mbytes, timeout_secs, title, actor_standby_desired_requests_per_actor_run, actor_standby_max_requests_per_actor_run, actor_standby_idle_timeout_secs, actor_standby_build, actor_standby_memory_mbytes): dict
  • Get the dictionary representation of a task.


    Parameters

    • actor_id: str | None = None
    • name: str | None = None
    • task_input: dict | None = None
    • build: str | None = None
    • max_items: int | None = None
    • memory_mbytes: int | None = None
    • timeout_secs: int | None = None
    • title: str | None = None
    • actor_standby_desired_requests_per_actor_run: int | None = None
    • actor_standby_max_requests_per_actor_run: int | None = None
    • actor_standby_idle_timeout_secs: int | None = None
    • actor_standby_build: str | None = None
    • actor_standby_memory_mbytes: int | None = None

    Returns dict

get_webhook_representation

  • get_webhook_representation(*, event_types, request_url, payload_template, headers_template, actor_id, actor_task_id, actor_run_id, ignore_ssl_errors, do_not_retry, idempotency_key, is_ad_hoc): dict
  • Prepare webhook dictionary representation for clients.


    Parameters

    • keyword-onlyevent_types: list[WebhookEventType] | None = None
    • keyword-onlyrequest_url: str | None = None
    • keyword-onlypayload_template: str | None = None
    • keyword-onlyheaders_template: str | None = None
    • keyword-onlyactor_id: str | None = None
    • keyword-onlyactor_task_id: str | None = None
    • keyword-onlyactor_run_id: str | None = None
    • keyword-onlyignore_ssl_errors: bool | None = None
    • keyword-onlydo_not_retry: bool | None = None
    • keyword-onlyidempotency_key: str | None = None
    • keyword-onlyis_ad_hoc: bool | None = None

    Returns dict