mxcubecore.HardwareObjects.MAXIV.ISPyBLims#

Classes

ISPyBLims(name)

Exceptions

NoSessionException

Exception raised when no expected session found.

class mxcubecore.HardwareObjects.MAXIV.ISPyBLims.ISPyBLims(name: str)[source]#

Bases: UserTypeISPyBLims

Parameters:

name (str) –

get_full_user_name() str[source]#

Returns the user name of the current user

Return type:

str

init()[source]#

Method inherited from baseclass

ispyb_login(user_name: str, password: str)[source]#

Authenticate with ISPyB REST services.

In fact password is an access token obtained from Keycloak, but we call it password to keep the interface consistent with other LIMS implementations.

Parameters:
  • user_name (str) – Username to authenticate with

  • password (str) – Password (access token) to authenticate with

Returns:

A tuple containing a boolean indicating success or failure, and an optional error message.

Return type:

Tuple[bool, Optional[str]]

set_active_session_by_id(session_id: str) Session[source]#

Sets session with session_id to active session.

It is possible that user picks the session that does not exist in the database yet, so called lazy session created on the fly. In that case the session POST request is sent to the server in order to create the session in the database and get the proper session id.

Parameters:

session_id (str) – session id

Return type:

Session

exception mxcubecore.HardwareObjects.MAXIV.ISPyBLims.NoSessionException[source]#

Bases: Exception

Exception raised when no expected session found.