matflow.OutputFileParserSource#
- class matflow.OutputFileParserSource(parser, path=None, contents=None, extension='')#
Bases:
OutputFileParserSource
The source of code for use in an output file parser.
- Parameters:
Methods
Make an instance of this class from JSON (or YAML) data.
Save to a persistent workflow.
Get the actual contents of the file.
Serialize this object as a dictionary.
Serialize this object as an object structure that can be trivially converted to JSON.
Attributes
The contents of the file.
The extension of the file.
The path to the file.
Whether the file's contents are stored in the workflow's persistent store.
The owning workflow.
How to parse the file.
- app = App(name='MatFlow', version='0.3.0a131')#
- property contents#
The contents of the file.
- property extension#
The extension of the file.
- classmethod from_json_like(json_like, shared_data=None)#
Make an instance of this class from JSON (or YAML) data.
- Parameters:
json_like (Union[Dict, List]) – The data to deserialise.
shared_data (Optional[Dict[str, ObjectList]]) – Shared context data.
- Return type:
The deserialised object.
- make_persistent(workflow, source)#
Save to a persistent workflow.
- parser#
How to parse the file.
- property path#
The path to the file.
- read_contents()#
Get the actual contents of the file.
- property store_contents#
Whether the file’s contents are stored in the workflow’s persistent store.
- to_dict()#
Serialize this object as a dictionary.
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
Serialize this object as an object structure that can be trivially converted to JSON. Note that YAML can also be produced from the result of this method; it just requires a different final serialization step.