schrodinger.application.livedesign.login module

Login page of the Maestro LiveDesign Export GUI.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.livedesign.login.AuthenticationMode

Bases: IntEnum

CREDENTIALS = 0
SINGLE = 1
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() AuthenticationMode | None
Returns:

The authentication mode from preferences

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=2025, 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: AuthenticationMode)
Parameters:

mode – 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: str, timeout: int | None = None) str

Download the LiveDesign client under a temp directory and extract it.

Parameters:
  • url – URL to download the ld client package

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

Returns:

path to the client package

Raises:

Exception – Raises RuntimeError in case of any error

schrodinger.application.livedesign.login.download_client(url: str, download_dir: str, tar_filename: str, timeout: int | None = None) str

Download the client tar.gz file at the specified URL and extract it

Parameters:
  • url – URL to download the client package

  • download_dir – Directory to download and extract the client tarfile

  • tar_filename – Filename of the downloaded tarfile

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

Returns:

path to the client package

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.login_using_last_session_credentials()

Attempt to access last session’s login credentials to log into livedesign.