Skip to main content

TaskCollectionClientAsync

Async sub-client for manipulating tasks.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, root_client, http_client, resource_id, resource_path, params): None
  • Initialize a new instance.


    Parameters

    • keyword-onlybase_url: str

      Base URL of the API server.

    • keyword-onlyroot_client: ApifyClientAsync

      The ApifyClientAsync instance under which this resource client exists.

    • keyword-onlyhttp_client: HTTPClientAsync

      The HTTPClientAsync instance to be used in this client.

    • optionalkeyword-onlyresource_id: str | None = None

      ID of the manipulated resource, in case of a single-resource client.

    • keyword-onlyresource_path: str

      Path to the resource's endpoint on the API server.

    • optionalkeyword-onlyparams: dict | None = None

      Parameters to include in all requests from this client.

    Returns None

create

  • async create(*, actor_id, name, build, timeout_secs, memory_mbytes, max_items, task_input, 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

  • Parameters

    • keyword-onlyactor_id: str

      Id of the Actor that should be run.

    • keyword-onlyname: str

      Name of the task.

    • optionalkeyword-onlybuild: str | None = None

      Actor build to run. It can be either a build tag or build number. By default, the run uses the build specified in the task settings (typically latest).

    • optionalkeyword-onlytimeout_secs: int | None = None

      Optional timeout for the run, in seconds. By default, the run uses timeout specified in the task settings.

    • optionalkeyword-onlymemory_mbytes: int | None = None

      Memory limit for the run, in megabytes. By default, the run uses a memory limit specified in the task settings.

    • optionalkeyword-onlymax_items: int | None = None

      Maximum number of results that will be returned by runs of this task. If the Actor of this task is charged per result, you will not be charged for more results than the given limit.

    • optionalkeyword-onlytask_input: dict | None = None

      Task input object.

    • optionalkeyword-onlytitle: str | None = None

      A human-friendly equivalent of the name.

    • optionalkeyword-onlyactor_standby_desired_requests_per_actor_run: int | None = None

      The desired number of concurrent HTTP requests for a single Actor Standby run.

    • optionalkeyword-onlyactor_standby_max_requests_per_actor_run: int | None = None

      The maximum number of concurrent HTTP requests for a single Actor Standby run.

    • optionalkeyword-onlyactor_standby_idle_timeout_secs: int | None = None

      If the Actor run does not receive any requests for this time, it will be shut down.

    • optionalkeyword-onlyactor_standby_build: str | None = None

      The build tag or number to run when the Actor is in Standby mode.

    • optionalkeyword-onlyactor_standby_memory_mbytes: int | None = None

      The memory in megabytes to use when the Actor is in Standby mode.

    Returns dict

list

  • async list(*, limit, offset, desc): ListPage[dict]

Properties

http_client

params

params: dict

resource_id

resource_id: str | None

root_client

url

url: str