benchling_sdk.helpers.response_helpers module

model_from_detailed(response: benchling_api_client.v2.types.Response, error_types: Optional[Iterable[Type[ExtendedBenchlingErrorBase]]] = None)

Deserialize a response into a model.

May optionally take error_types which can produce an error_matcher() for more specific error cases.

read_header_value(headers: Mapping[str, str], *expected_headers: str) Optional[str]

Get a header value by name, with case-insensitive lookup and fallback support.

Tries each expected header name in order, first with an exact match, then with a case-insensitive match. Returns the first found value or None.