qat.core.BatchResult

class qat.core.BatchResult(**kwargs)

Simple higher level wrapper for the serializable BatchResult class.

Parameters

kwargs (keyword arguments) – accepted arguments are results (a list of Result objects) and meta_data (a (str, str) map).

Instance attributes:
  • results (list<Result>): list of results

  • meta_data (dict<str, str>): meta data

append(value)

Add a result in the list of results

Parameters

value (Result) –

dump(fname)

Dumps the BatchResult inside a file in binary format.

Parameters

fname (str) – the file name

extend(values)

Add several results in the list of results

Parameters

values (list<Result>) –

classmethod from_thrift(tobject)

Builds a BatchResult object from a thrift object

static load(fname)

Loads a BatchResult from a file

Parameters

fname (str) – the file name

Returns

BatchResult