ai2_kit.tool.yaml module#

class ai2_kit.tool.yaml.Yaml[source]#

Bases: object

dump(in_place=False, pretty=True)[source]#
load(yaml_file: str)[source]#
set_value(key: str, value)[source]#

edit a yaml file

Parameters:
  • yaml_file (str) – path to the yaml file

  • key (str) – key to edit, support nested key, e.g. a.b.c

  • value ([type]) – new value