Skip to main content

LogClient

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 ApifyClient 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

get

  • get(*, raw): str | None

get_as_bytes

  • 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

Properties

resource_id

resource_id: str | None

Get the resource ID.