:py:mod:`rhino_health` ====================== .. py:module:: rhino_health .. autoapi-nested-parse:: Entry point to using the Rhino Health Python SDK. .. !! processed by numpydoc !! Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 lib/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: rhino_health.login .. py:function:: login(username: Optional[str] = None, password: Optional[str] = None, otp_code: Optional[str] = None, rhino_api_url: str = ApiEnvironment.PROD_API_URL, sdk_version: str = SDKVersion.PREVIEW, show_traceback: bool = False, authentication_details: Optional[lib.rest_api.rhino_authenticator.AuthenticationDetailType] = None) -> lib.rhino_session.RhinoSession Login to the Rhino platform and get a RhinoSession to interact with the rest of the system. :Parameters: **username: Optional[str]** The email you are logging in with if logging in with username/password. You must login with either username/password or authentication_details **password: Optional[str]** The password you are logging in with if logging in with username/password You must login with either username/password or authentication_details **authentication_details: Optional[AuthenticationDetailType]** Dictionary of authentication information you are logging in with if not using username/password. Refer to Examples and See Also section **otp_code: Optional[str]** If 2FA is enabled for the account, the One Time Password code from your 2FA device **rhino_api_url: str** Which rhino environent you are working in. **sdk_version: str** Used internally for future backwards compatibility. Use the default **show_traceback: bool** Should traceback information be included if an error occurs :Returns: session: RhinoSession A session object to interact with the cloud API .. seealso:: :obj:`rhino_health.lib.constants.ApiEnvironment` List of supported environments :obj:`rhino_health.lib.rhino_session.RhinoSession` Session object with accessible endpoints :obj:`rhino_health.lib.rest_api.rhino_authenticator.AuthenticationDetailType` Authentication detail dictionary for login .. rubric:: Examples >>> import rhino_health >>> my_username = "user@example.com" # Replace me >>> my_password = "Correct horse battery staple" # Replace me (see https://xkcd.com/936/) >>> session = rhino_health.login(username=my_username, password=my_password, otp_code=otp_code) RhinoSession() >>> import rhino_health >>> session = rhino_health.login(authentication_details={"sso_access_token": "MyAccessToken", "sso_provider": "google", "sso_client": "my_hospital"}) RhinoSession() .. !! processed by numpydoc !!