pdstools.infinity.client ======================== .. py:module:: pdstools.infinity.client Classes ------- .. autoapisummary:: pdstools.infinity.client.Infinity pdstools.infinity.client.AsyncInfinity Module Contents --------------- .. py:class:: Infinity(*, base_url: str | httpx.URL, auth: httpx.Auth | PegaOAuth, application_name: str | None = None, verify: bool = False, pega_version: str | None = None, timeout: float = 90) Bases: :py:obj:`pdstools.infinity.internal._base_client.SyncAPIClient` The Pega Infinity DX API client. Prefer one of the :py:meth:`from_basic_auth`, :py:meth:`from_client_credentials`, or :py:meth:`from_client_id_and_secret` constructors over calling ``Infinity(...)`` directly — they handle auth construction for you. The Pega version is resolved lazily on first access of ``version``. When ``pega_version=`` is passed explicitly, no HTTP request is ever made; otherwise the first read of ``client.version`` (or any version-dependent resource such as ``client.prediction_studio``) issues a single ``GET /prweb/api/PredictionStudio/v3/predictions/repository`` and caches the result on the instance. .. py:attribute:: knowledge_buddy .. py:property:: version :type: str | None The Pega platform version (e.g. ``"26.1"``). Resolved lazily on first access by calling the prediction-studio repository endpoint. Returns ``None`` if the version could not be inferred (e.g. the host is unreachable). Pass ``pega_version=`` to the constructor or any ``from_*`` classmethod to skip the round-trip entirely. .. py:method:: __getattr__(name: str) .. py:class:: AsyncInfinity(*, base_url: str | httpx.URL, auth: httpx.Auth | PegaOAuth, application_name: str | None = None, verify: bool = False, pega_version: str | None = None, timeout: float = 90) Bases: :py:obj:`pdstools.infinity.internal._base_client.AsyncAPIClient` The async Pega Infinity DX API client. Provides the same functionality as :class:`Infinity` but with native ``async``/``await`` support. Resources expose ``async def`` methods that can be awaited directly. Prefer one of the :py:meth:`from_basic_auth`, :py:meth:`from_client_credentials`, or :py:meth:`from_client_id_and_secret` constructors over calling ``AsyncInfinity(...)`` directly. The Pega version is resolved lazily on first access of ``version``. When ``pega_version=`` is passed explicitly, no HTTP request is ever made; otherwise the first read of ``client.version`` (or any version-dependent resource such as ``client.prediction_studio``) issues a single HTTP probe and caches the result on the instance. .. py:attribute:: knowledge_buddy .. py:property:: version :type: str | None The Pega platform version (e.g. ``"26.1"``). Resolved lazily on first access. The underlying ``_infer_version`` helper bridges to the async HTTP client via a blocking portal, so reading ``client.version`` from synchronous code is supported. Pass ``pega_version=`` to the constructor or any ``from_*`` classmethod to skip the round-trip entirely. .. py:method:: __getattr__(name: str)