rhino_health.lib.rest_api.api_response
#
Module Contents#
Classes#
An internal representation of a HTTP response from the cloud API |
- class rhino_health.lib.rest_api.api_response.APIResponse(session, request_response)#
An internal representation of a HTTP response from the cloud API
- Attributes
- session: RhinoSession
The RhinoSession that triggered this request
- raw_response: requests.Response
A requests.Response object.
- 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.cohort.cohort_dataclass
Example Cohort 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(self, dataclass: Type[DataClass]) DataClass #
Convenience class to convert the cloud API response to an expected Dataclass
- to_dataclasses(self, dataclass: Type[DataClass]) List[DataClass] #
Convenience class to convert the cloud API response to multiple expected Dataclasses