Source code for pihole_lib.base

"""Base classes for Pi-hole API clients."""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from pihole_lib.client import PiHoleClient


[docs] class BasePiHoleAPIClient: """Base class for Pi-hole API clients. Provides common functionality for all API client classes. """ __slots__ = ("_client",) # Subclasses should override this BASE_URL: str = ""
[docs] def __init__(self, client: "PiHoleClient") -> None: """Initialize the API client. Args: client: PiHoleClient instance to use for requests. """ self._client = client