pdstools.infinity.client¶
Classes¶
The Pega Infinity DX API client. |
|
The async Pega Infinity DX API client. |
Module Contents¶
- 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:
pdstools.infinity.internal._base_client.SyncAPIClientThe Pega Infinity DX API client.
Prefer one of the
from_basic_auth(),from_client_credentials(), orfrom_client_id_and_secret()constructors over callingInfinity(...)directly — they handle auth construction for you.The Pega version is resolved lazily on first access of :pyattr:`version`. When
pega_version=is passed explicitly, no HTTP request is ever made; otherwise the first read ofclient.version(or any version-dependent resource such asclient.prediction_studio) issues a singleGET /prweb/api/PredictionStudio/v3/predictions/repositoryand caches the result on the instance.- Parameters:
- knowledge_buddy¶
- property version: str | None¶
The Pega platform version (e.g.
"24.2").Resolved lazily on first access by calling the prediction-studio repository endpoint. Returns
Noneif the version could not be inferred (e.g. the host is unreachable). Passpega_version=to the constructor or anyfrom_*classmethod to skip the round-trip entirely.- Return type:
str | None
- 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:
pdstools.infinity.internal._base_client.AsyncAPIClientThe async Pega Infinity DX API client.
Provides the same functionality as
Infinitybut with nativeasync/awaitsupport. Resources exposeasync defmethods that can be awaited directly.Prefer one of the
from_basic_auth(),from_client_credentials(), orfrom_client_id_and_secret()constructors over callingAsyncInfinity(...)directly.The Pega version is resolved lazily on first access of :pyattr:`version`. When
pega_version=is passed explicitly, no HTTP request is ever made; otherwise the first read ofclient.version(or any version-dependent resource such asclient.prediction_studio) issues a single HTTP probe and caches the result on the instance.- Parameters:
- knowledge_buddy¶
- property version: str | None¶
The Pega platform version (e.g.
"24.2").Resolved lazily on first access. The underlying
_infer_versionhelper bridges to the async HTTP client via a blocking portal, so readingclient.versionfrom synchronous code is supported. Passpega_version=to the constructor or anyfrom_*classmethod to skip the round-trip entirely.- Return type:
str | None