icat.dumpfile_yaml — YAML data file backend

class icat.dumpfile_yaml.YAMLDumpFileReader(client, infile)

Bases: icat.dumpfile.DumpFileReader

Backend for icatingest.py to read a YAML data file.

getdata()

Iterate over the chunks in the data file.

getobjs_from_data(data, objindex)

Iterate over the objects in a data chunk.

Yield a new entity object in each iteration. The object is initialized from the data, but not yet created at the client.

class icat.dumpfile_yaml.YAMLDumpFileWriter(client, outfile)

Bases: icat.dumpfile.DumpFileWriter

Backend for icatdump.py to write a YAML data file.

head()

Write a header with some meta information to the data file.

startdata()

Start a new data chunk.

If the current chunk contains any data, write it to the data file.

writeobj(key, obj, keyindex)

Add an entity object to the current data chunk.

finalize()

Finalize the data file.

Previous topic

icat.dumpfile_xml — XML data file backend

Next topic

icat.entities — Provide classes corresponding to the ICAT schema