Skip to content

dlgforge.distributed.types

Distributed runtime data types.

EndpointSpec(name, base_url, api_key='', weight=1.0, max_in_flight=64, timeout_s=None) dataclass

Specification for a routed model endpoint.

Parameters:

Name Type Description Default
name str

str value used by this operation.

required
base_url str

str value used by this operation.

required
api_key str

str value used by this operation.

''
weight float

float value used by this operation.

1.0
max_in_flight int

int value used by this operation.

64
timeout_s float | None

float | None value used by this operation.

None

Raises:

Type Description
Exception

Construction may raise when required dependencies or inputs are invalid.

Side Effects / I/O: - Primarily performs in-memory transformations.

Preconditions / Invariants: - Instantiate and use through documented public methods.

Examples:

>>> from dlgforge.distributed.types import EndpointSpec
>>> EndpointSpec(...)

to_routing_dict()

To routing dict.

Returns:

Type Description
Dict[str, Any]

Dict[str, Any]: Value produced by this API.

Raises:

Type Description
Exception

Propagates unexpected runtime errors from downstream calls.

Side Effects / I/O: - Primarily performs in-memory transformations.

Preconditions / Invariants: - Callers should provide arguments matching annotated types and expected data contracts.

Examples:

>>> from dlgforge.distributed.types import EndpointSpec
>>> instance = EndpointSpec(...)
>>> instance.to_routing_dict(...)