Skip to content

EN Reference SDK Types

Cavanshirpro edited this page Sep 19, 2026 · 1 revision

SDK: models, errors, retry policy and integrations

English · Türkçe · Languages / Diller

Scope: JSON API Forge 0.5.1 · Source review: 17 September 2026 · Language: English

Signatures are extracted from source Python AST and are reference declarations, not a runnable program. Do not pass self explicitly when calling an instance. Arguments after * are keyword-only. Await async def methods. Dataclass fields also describe constructor parameters.

Errors/retries, DDM/YoungLion.

Source module: json_api_forge/models.py

ForgeResponse

Field Type Default
data T Required
status_code int Required
request_id str | None Required
idempotent_replay bool False
cache_status str | None None

RequestAttempt

Field Type Default
method str Required
path str Required
attempt int Required
elapsed_seconds float Required
status_code int | None Required
request_id str | None Required
error str | None Required

Source module: json_api_forge/errors.py

ForgeError

Inherits behavior from its base class; see the source and error guide.

ForgeTransportError

Inherits behavior from its base class; see the source and error guide.

ForgeResponseTooLarge

Inherits behavior from its base class; see the source and error guide.

ForgeClusterUnavailable

Inherits behavior from its base class; see the source and error guide.

ForgeIntegrationError

Inherits behavior from its base class; see the source and error guide.

ForgeSessionError

Inherits behavior from its base class; see the source and error guide.

ForgeHTTPError

Field Type Default
status_code int Required
detail Any Required
request_id str | None None
retry_after str | None None

Source module: json_api_forge/options.py

RetryPolicy

Field Type Default
max_attempts int 3
backoff_seconds float 0.2
max_backoff_seconds float 2.0
multiplier float 2.0
jitter_ratio float 0.15
retry_statuses frozenset[int] field(default_factory=lambda: frozenset({408, 425, 429, 502, 503, 504}))

RetryPolicy.permits

def permits(self, method: str, *, idempotency_key: str | None) -> bool: ...

RetryPolicy.delay

def delay(self, failed_attempt: int, *, retry_after: str | None=None) -> float: ...

Source module: json_api_forge/integrations/ddm.py

DDMForgeClient

DDMForgeClient.init

def __init__(self, client: ForgeClient): ...

DDMForgeClient.request

def request(self, method: str, path: str, **kwargs: Any) -> ForgeResponse[Any]: ...

DDMForgeClient.call_operation

def call_operation(self, project: str, operation: str, payload: Any, *, idempotency_key: str | None=None): ...

DDMForgeClient.close

def close(self) -> None: ...

DDMForgeClient.enter

def __enter__(self) -> DDMForgeClient: ...

DDMForgeClient.exit

def __exit__(self, *_args: Any) -> None: ...

AsyncDDMForgeClient

AsyncDDMForgeClient.init

def __init__(self, client: AsyncForgeClient): ...

AsyncDDMForgeClient.request

async def request(self, method: str, path: str, **kwargs: Any) -> ForgeResponse[Any]: ...

AsyncDDMForgeClient.call_operation

async def call_operation(self, project: str, operation: str, payload: Any, *, idempotency_key: str | None=None): ...

AsyncDDMForgeClient.aclose

async def aclose(self) -> None: ...

AsyncDDMForgeClient.aenter

async def __aenter__(self) -> AsyncDDMForgeClient: ...

AsyncDDMForgeClient.aexit

async def __aexit__(self, *_args: Any) -> None: ...

Source module: json_api_forge/integrations/younglion.py

YoungLionForgeClient

YoungLionForgeClient.create_item

def create_item(self, project: str, resource: str, payload: Any, *, idempotency_key: str | None=None): ...

YoungLionForgeClient.update_item

def update_item(self, project: str, resource: str, item_id: str, payload: Any): ...

YoungLionForgeClient.list_items

def list_items(self, project: str, resource: str, *, params: Mapping[str, Any] | None=None): ...

YoungLionForgeClient.connect

@classmethod
def connect(cls, base_url: str, **kwargs: Any) -> YoungLionForgeClient: ...

YoungLionForgeClient.close

def close(self) -> None: ...

YoungLionForgeClient.enter

def __enter__(self) -> YoungLionForgeClient: ...

YoungLionForgeClient.exit

def __exit__(self, *_args: Any) -> None: ...

Sources and verification

This page describes the behavior at the pinned commits below. Recheck these contracts when upgrading.


English home · All English pages · Version maintenance

Clone this wiki locally