rhino_health.lib.rest_api.api_response#

Module Contents#

Classes#

APIResponse

An internal representation of a HTTP response from the cloud API

Attributes#

ERROR_PARSERS

rhino_health.lib.rest_api.api_response.ERROR_PARSERS: List[rhino_health.lib.rest_api.error_parsers.error_parser.ErrorParser]#
class rhino_health.lib.rest_api.api_response.APIResponse(session, request_response, api_request)#

An internal representation of a HTTP response from the cloud API

Attributes:
session: RhinoSession

The RhinoSession that triggered this request

status_code: int

The status code of the response

Dataclass#

A Type Hint representing a Dataclass in the system.

See also

rhino_health.lib.endpoints.dataset.dataset_dataclass

Example Dataset dataclass

Notes

Dataclasses are how we represent input and output objects in the SDK. They provide validation, and convenience functions for you to interact with the objects. Example dataclasses include our metrics as well as various endpoint dataclasses.

All SDK dataclasses extend pydantic and have access to functionality found within the library.

to_dataclass(dataclass: Type[Dataclass], format_response_function: Callable = None) Dataclass#

Convenience class to convert the cloud API response to an expected Dataclass

to_dataclasses(dataclass: Type[Dataclass], format_response_function: Callable = None) List[Dataclass]#

Convenience class to convert the cloud API response to multiple expected Dataclasses