rhino_health.lib.rhino_session#

Module Contents#

Classes#

RhinoSession

Allows access to various endpoints directly from the RhinoSession

class rhino_health.lib.rhino_session.RhinoSession(authentication_details: rhino_health.lib.rest_api.rhino_authenticator.AuthenticationDetailType | None = None, otp_code: str | None = None, rhino_api_url: str = ApiEnvironment.PROD_API_URL, sdk_version: str = SDKVersion.PREVIEW, show_traceback: bool = False)#

Bases: rhino_health.lib.rhino_client.RhinoClient

Allows access to various endpoints directly from the RhinoSession

Examples

>>> session.project.get_projects()
array[Project...]
>>> session.dataset.get_dataset(my_dataset_uid)
Dataset
Attributes:
code_object: Access endpoints at the code_object level
code_run: Access endpoints at the code_run level
dataset: Access endpoints at the dataset level
data_schema: Access endpoints at the data_schema level
federated_dataset: Access endpoints for federated_datasets
project: Access endpoints at the project level
sql_query: Access endpoints for sql queries
user: Access endpoints at the user level
workgroup: Access endpoints at the workgroup level
property current_user#

Returns the logged in user

switch_user(authentication_details, otp_code=None)#

Switch the currently logged in user.

Parameters:
authentication_details: AuthenticationDetailType

A dictionary containing authentication details

otp_code: Optional[str]

2FA login code if 2FA is enabled for the account