Skip to main content
Version: Next

ActorEnvVarCollectionClient

Sub-client for the Actor environment variable collection.

Provides methods to manage Actor environment variables, e.g. list or create them. Obtain an instance via an appropriate method on the ActorVersionClient class.

Hierarchy

Index

Methods

__init__

  • __init__(*, base_url, public_base_url, http_client, resource_path, client_registry, resource_id, params): None
  • Initialize the resource client.


    Parameters

    • keyword-onlybase_url: str

      API base URL.

    • keyword-onlypublic_base_url: str

      Public CDN base URL.

    • keyword-onlyhttp_client: HttpClient

      HTTP client for making requests.

    • keyword-onlyresource_path: str

      Resource endpoint path (e.g., 'actors', 'datasets').

    • keyword-onlyclient_registry: ClientRegistry

      Bundle of client classes for dependency injection.

    • optionalkeyword-onlyresource_id: str | None = None

      Optional resource ID for single-resource clients.

    • optionalkeyword-onlyparams: dict | None = None

      Optional default parameters for all requests.

    Returns None

create

  • create(*, is_secret, name, value, timeout): EnvVar

iterate

  • iterate(*, timeout): Iterator[EnvVar]
  • Iterate over the available Actor environment variables.

    The underlying API endpoint does not support pagination, so this method performs a single API call and yields the items from its response. If the endpoint returns more items than fit in one response (the API caps the page size), the rest are not returned. In practice this is rarely a concern — Actors are not expected to define more environment variables than the cap.

    https://docs.apify.com/api/v2#/reference/actors/environment-variable-collection/get-list-of-environment-variables


    Parameters

    • optionalkeyword-onlytimeout: Timeout = 'short'

      Timeout for the API HTTP request.

    Returns Iterator[EnvVar]

list

Properties

resource_id

resource_id: str | None

Get the resource ID.