qat.core.Batch

class qat.core.Batch(jobs=None, meta_data=None)

Simple higher level wrapper for the serializable Batch class.

Instance attributes:
  • jobs (list<Job>): jobs composing the batch

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

dump(fname)

Dumps the Batch inside a file in binary format.

Parameters

fname (str) – the file name

classmethod from_bytes(data: bytes)

Builds a batch from raw bytes object

classmethod from_thrift(tobject)

Builds a Batch object from a thrift batch

get_variables()

Returns the sorted list of all variables appearing in the Batch.

static load(fname)

Loads a Batch from a file.

Parameters

fname (str) – the file name

Returns

Batch

to_cpp()

Cast the Batch into a Thrift object not meant for serialized transmission, but rather for C++ code.

to_thrift()

Cast the Batch into a pure Thrift object