import yaml

def construct_ruby_object(loader, suffix, node):
    return loader.construct_yaml_map(node)

def construct_ruby_sym(loader, node):
    return loader.construct_yaml_str(node)
yaml.add_multi_constructor('!ruby/object:', construct_ruby_object)
yaml.add_constructor('!ruby/sym', construct_ruby_sym)
stream = file('201203130939.yaml', 'r')
mydata = yaml.load(stream)
print(mydata)
Разбор puppet-api yaml с помощью python