schrodinger.application.livedesign_ml.login module¶
Login module for LiveDesign ML. This module uses LiveDesign’s login infrastructure to manage its authentication.
- class schrodinger.application.livedesign_ml.login.LDMLClientManager(ldml_url: str | None = None)¶
Bases:
objectA class to handle downloading and importing the ldml client. If an explicit LDML url is provided, the ldml client is downloaded from that URL. If
LDML_URLenvironment is set, it is used as the URL. Otherwise, the URL is derived from the LDClient’s host.- __init__(ldml_url: str | None = None)¶
Initialize the LDMLClientManager and install the ldml client.
- Parameters:
ldml_url – LiveDesign ML URL. If None, the url is derived from the connected LDClient.
- classmethod createFromUrl(ldml_url: str) LDMLClientManager¶
Create an LDMLClientManager instance for the given LDML URL.
- Parameters:
ldml_url – LiveDesign ML URL
- Returns:
LDMLClientManager instance
- classmethod getInstance() LDMLClientManager¶
Return the singleton LDMLClientManager instance.
- schrodinger.application.livedesign_ml.login.get_ldmlclient_download_dir() str¶
Create and return the directory to use for downloading the ldml client package. Each session should have its own ldml client package directory to avoid being overwritten by other sessions which might be using a different version of the ldml client package.
- schrodinger.application.livedesign_ml.login.download_ldml_client(url: str, timeout: int | None = None) str¶
Download the ldml client under a temp directory and extract it.
- Parameters:
url – URL to download the ldml client package
timeout – Timeout for the download request (in secs)
- Returns:
path to the ldml client package