hpcflow.sdk.core.utils.read_YAML_str#

hpcflow.sdk.core.utils.read_YAML_str(yaml_str, typ='safe', variables=None)#

Load a YAML string. This will produce basic objects.

Parameters:
  • yaml_str (str) – The YAML string to parse.

  • typ – Load type passed to the YAML library.

  • variables (dict[str, str] | Literal[False] | None) – String variables to substitute in yaml_str. Substitutions will be attempted if the file looks to contain variable references (like “<<var:name>>”). If set to False, no substitutions will occur.

Return type:

Any