idmtools_platform_local.client.experiments_client module

idmtools local platform experiment API Client.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

class idmtools_platform_local.client.experiments_client.ExperimentsClient[source]

Bases: BaseClient

Provides API client for Experiments.

path_url = 'experiments'
classmethod get_all(tags: List[Tuple[str, str]] | None = None, page: int | None = None, per_page: int | None = None) List[Dict[str, Any]][source]

Get all experiments with options to filter by tags.

Parameters:
  • per_page – How many experiments to return per page

  • page – Which page

  • tags (Optional[List[Tuple[str, str]]]) – List of tags/values to filter experiment by

Returns:

returns list of experiments

Return type:

List[Dict[str, Any]]

classmethod get_one(id: str, tags: List[Tuple[str, str]] | None = None) Dict[str, Any][source]

Convenience method to get one experiment.

Parameters:
  • id (str) – ID of the experiment

  • tags (Optional[List[Tuple[str, str]]]) – List of tags/values to filter experiment by

Returns:

Dictionary containing the experiment objects

Return type:

dict

classmethod delete(id: str, delete_data: bool = False, ignore_doesnt_exist: bool = True) bool[source]

Delete an experiment. Optionally you can delete the experiment data. WARNING: Deleting the data is irreversible.

Parameters:
  • id (str) – ID of the experiments

  • delete_data (bool) – Delete data directory including simulations

  • ignore_doesnt_exist – Ignore error if the specific experiment doesn’t exist

Returns:

True if deletion is succeeded