pdstools.infinity.client

Classes

Infinity

The Pega Infinity DX API client.

AsyncInfinity

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.SyncAPIClient

The Pega Infinity DX API client.

Prefer one of the from_basic_auth(), from_client_credentials(), or 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 :pyattr:`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.

Parameters:
  • base_url (str | httpx.URL)

  • auth (httpx.Auth | PegaOAuth)

  • application_name (str | None)

  • verify (bool)

  • pega_version (str | None)

  • timeout (float)

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

Return type:

str | None

__getattr__(name: str)
Parameters:

name (str)

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.AsyncAPIClient

The async Pega Infinity DX API client.

Provides the same functionality as Infinity but with native async/await support. Resources expose async def methods that can be awaited directly.

Prefer one of the from_basic_auth(), from_client_credentials(), or from_client_id_and_secret() constructors over calling AsyncInfinity(...) 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 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.

Parameters:
  • base_url (str | httpx.URL)

  • auth (httpx.Auth | PegaOAuth)

  • application_name (str | None)

  • verify (bool)

  • pega_version (str | None)

  • timeout (float)

knowledge_buddy
property version: str | None

The Pega platform version (e.g. "24.2").

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.

Return type:

str | None

__getattr__(name: str)
Parameters:

name (str)