schrodinger.application.livedesign.login module

Login page of the Maestro LiveDesign Export GUI.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.livedesign.login.LoginManager

Bases: object

A class to handle retrieving and setting login information, downloading and importing the ld client.

__init__()
getMode()
Returns:

The authentication mode from preferences

Return type:

int or None

getHost()
Returns:

The server host from preferences

Return type:

str or None

getUsername()
Returns:

The username from preferences

Return type:

str

getToken()
Returns:

The SSO token from preferences

Rypte:

str

classmethod connect(host: str, token: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, timeout: Optional[int] = None, compatibility_mode: Optional[Version] = Version(major=2024, minor=1)) str

Download the LiveDesign ldclient package, import the ldclient.client module and connect to the LiveDesign server. Also handle the raised exception and return error message if exception is raised. See ldclient_proxy.LDClientProxy.connect for argument documentation.

Parameters:

timeout (int or NoneType) – Timeout for the ldclient package download request (in secs)

Returns:

the error message with useful information in the event of a failure otherwise return empty string.

disconnect()

Disconnect the LiveDesign client connection and clear the token.

setMode(mode)
Parameters:

mode (int) – The authentication mode

setHost(host)
Parameters:

host (str) – The server host

setUsername(username)
Parameters:

username (str) – The username of the user

setToken(token)
Parameters:

token (str) – The SSO token

schrodinger.application.livedesign.login.get_ldclient_download_dir() str

Create and return the directory to use for downloading the ldclient package. Each session should have its own ldclient package directory to avoid being overwritten by other sessions which might be using a different version of the ldclient package.

schrodinger.application.livedesign.login.download_ld_client(url, timeout=None)

Download the ld client under a temp directory. LD client tar will be extracted in the temp directory.

Parameters:
  • url (str) – url of the ld client

  • timeout (int or NoneType) – Timeout for the download request (in secs)

Returns:

Returns the path to the client

Return type:

str

Raises:

Exception – Raises RuntimeError in case of any error

schrodinger.application.livedesign.login.get_ld_client() LDClientProxy

Return the singleton proxy LiveDesign client. Proxy notifies the listeners whenever the connection to the LiveDesign server changes.

LiveDesign login panel manages the connection to the LiveDesign server and ensures the underlying LDClient object is re-initialized.

See ldclient_proxy.LDClientProxy for details.

schrodinger.application.livedesign.login.get_ldclient_models()

Return ldclient.models module from the ldclient package.

schrodinger.application.livedesign.login.get_ldclient_enums()

Return ldclient.enums module from the ldclient package.

schrodinger.application.livedesign.login.get_ldclient_responses()

Return ldclient.responses module from the ldclient package.

schrodinger.application.livedesign.login.get_ldclient_requests()

Return ldclient.requests module from the ldclient package.

schrodinger.application.livedesign.login.format_host(host)

Format the given host. Adds ‘https’ protocol if none, and removes any trailing ‘/’s

Parameters:

host (str) – LiveDesign server host

Returns:

Formatted host

Return type:

str