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(e): bool
  • Check if the given error is retryable.


    Parameters

    • e: 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

    • is_secret: bool | None = Nonekeyword-only
    • name: str | None = Nonekeyword-only
    • value: str | None = Nonekeyword-only

    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): dict
  • Get dictionary representation of the Actor.


    Parameters

    • name: str | Nonekeyword-only
    • title: str | None = Nonekeyword-only
    • description: str | None = Nonekeyword-only
    • seo_title: str | None = Nonekeyword-only
    • seo_description: str | None = Nonekeyword-only
    • versions: list[dict] | None = Nonekeyword-only
    • restart_on_error: bool | None = Nonekeyword-only
    • is_public: bool | None = Nonekeyword-only
    • is_deprecated: bool | None = Nonekeyword-only
    • is_anonymously_runnable: bool | None = Nonekeyword-only
    • categories: list[str] | None = Nonekeyword-only
    • default_run_build: str | None = Nonekeyword-only
    • default_run_max_items: int | None = Nonekeyword-only
    • default_run_memory_mbytes: int | None = Nonekeyword-only
    • default_run_timeout_secs: int | None = Nonekeyword-only
    • example_run_input_body: Any = Nonekeyword-only
    • example_run_input_content_type: str | None = Nonekeyword-only

    Returns dict

get_task_representation

  • get_task_representation(actor_id, name, task_input, build, max_items, memory_mbytes, timeout_secs, title): 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

    Returns dict

get_webhook_representation

  • get_webhook_representation(*, event_types, request_url, payload_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

    • event_types: list[WebhookEventType] | None = Nonekeyword-only
    • request_url: str | None = Nonekeyword-only
    • payload_template: str | None = Nonekeyword-only
    • actor_id: str | None = Nonekeyword-only
    • actor_task_id: str | None = Nonekeyword-only
    • actor_run_id: str | None = Nonekeyword-only
    • ignore_ssl_errors: bool | None = Nonekeyword-only
    • do_not_retry: bool | None = Nonekeyword-only
    • idempotency_key: str | None = Nonekeyword-only
    • is_ad_hoc: bool | None = Nonekeyword-only

    Returns dict