gplately.PlateModelManager
- class gplately.PlateModelManager(model_manifest: str = '', timeout=(None, None))[source]
- Bases: - object- Manage a set of public available plate reconstruction models. The model files are hosted on EarthByte servers. You need Internet connection to download the files. - __init__(model_manifest: str = '', timeout=(None, None))[source]
- Constructor. Create a - PlateModelManagerinstance.- Parameters:
- model_manifest – The URL to a - models.jsonmetadata file. Normally you don’t need to provide this parameter unless you would like to setup your own plate model server.
 
 - Methods - __init__([model_manifest, timeout])- Constructor. - download_all_models([data_dir])- Download all available models into the - data_dir.- Return the names of available models as a list. - Return the URL to the configuration data of models. - get_local_available_model_names(local_dir)- Return a list of model names in a local folder. - get_model([model_name, data_dir])- Return a - PlateModelobject for a given model name.- Attributes - The metadata for all the models. - download_all_models(data_dir: str = './') None[source]
- Download all available models into the - data_dir.- Parameters:
- data_dir (str) – The folder to save the model files. 
 
 - static get_local_available_model_names(local_dir: str)[source]
- Return a list of model names in a local folder. - Parameters:
- local_dir (str) – The local folder containing models. 
 
 - get_model(model_name: str = 'default', data_dir: str = '.') PlateModel | None[source]
- Return a - PlateModelobject for a given model name.- Call - get_available_model_names()to see a list of available model names.- Parameters:
- model_name – the model name of interest 
- data_dir – The folder to save the model files. This - data_dircan be changed with- PlateModel.set_data_dir()later.
 
- Returns:
- a - PlateModelobject or- Noneif the model name is no good.