Relative Content

Tag Archive for pythonyaml

YAML only first occurrence of sequence when anchored item is used

Please consider the following YAML file. This is a simplified model but acts the same as my issue.
I want to prepare the template Param which can be reused in multiple records. First one is template and the second one is record that I want to expand with a base params.

yaml key, value replacement in Python

I have the following yaml file and want to replace MoreVariables: "placeholder" with a dynamic amount of key, value pairs in the same style as var1, var2. I also want replace Something 2 with different variables without knowing in advance how many variables I may want to append. Is this doable?