def yaml(self, output): """Output data in YAML format""" import yaml yaml.safe_dump(output, self.outfile)