ResultList Class

class modelindex.models.ResultList.ResultList(results: Optional[Union[List[Union[Dict, modelindex.models.Result.Result, str]], modelindex.models.Result.Result, Dict]] = None, _filepath: Optional[str] = None)[source]

ResultList is a list of Result objects.

Parameters
  • results (list, Result, dict) – Either a list of results, a single Result object or a dict representing a result

  • _filepath (str) – path to the file where the data is coming from

__init__(results: Optional[Union[List[Union[Dict, modelindex.models.Result.Result, str]], modelindex.models.Result.Result, Dict]] = None, _filepath: Optional[str] = None)[source]
Parameters
  • results (list, Result, dict) – Either a list of results, a single Result object or a dict representing a result

  • _filepath (str) – path to the file where the data is coming from

static from_file(filepath: Optional[str] = None, parent_filepath: Optional[str] = None)[source]

Load a ResultList from a file.

Parameters
  • filepath (str) – File from which to load the result list

  • parent_filepath (str) – Parent filename (if file is imported from another file)