Skip to main content

LogClientAsync

Sub-client for managing a specific log.

Provides methods to manage logs, e.g. get or stream them. Obtain an instance via an appropriate method on the ApifyClientAsync 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: HttpClientAsync

      HTTP client for making requests.

    • keyword-onlyresource_path: str

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

    • keyword-onlyclient_registry: ClientRegistryAsync

      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

get

  • async get(*, raw): str | None

get_as_bytes

  • async get_as_bytes(*, raw): bytes | None

  • Parameters

    • optionalkeyword-onlyraw: bool = False

      If true, the log will include formatting. For example, coloring character sequences.

    Returns bytes | None

    The retrieved log as raw bytes, or None, if it does not exist.

stream


  • Parameters

    • optionalkeyword-onlyraw: bool = False

      If true, the log will include formatting. For example, coloring character sequences.

    Returns AsyncIterator[HttpResponse | None]

    The retrieved log as a context-managed streaming Response, or None, if it does not exist.

Properties

resource_id

resource_id: str | None

Get the resource ID.