def read_definitions(fromfile):
 with open(fromfile, 'r') as stream:
  contents = yaml.safe_load(stream)
  return [dict({'api': k}, **v) for (k, v) in contents.iteritems()]

def read_definitions ( fromfile ) : with open ( fromfile , 'r' ) as stream : contents = yaml . safe_load ( stream ) return [ dict ( { 'api' : k } , ** v ) for ( k , v ) in contents . iteritems ( ) ]
read api signatures from a file .