def kegg_find(database, query, option=None):
 if ((database in ['compound', 'drug']) and (option in ['formula', 'exact_mass', 'mol_weight'])):
  resp = _q('find', database, query, option)
 elif option:
  raise Exception('Invalid option arg for kegg find request.')
 else:
  if isinstance(query, list):
   query = '+'.join(query)
  resp = _q('find', database, query)
 return resp

def kegg_find ( database , query , option = None ) : if ( ( database in [ 'compound' , 'drug' ] ) and ( option in [ 'formula' , 'exact_mass' , 'mol_weight' ] ) ) : resp = _q ( 'find' , database , query , option ) elif option : raise Exception ( 'Invalid option arg for kegg find request.' ) else : if isinstance ( query , list ) : query = '+' . join ( query ) resp = _q ( 'find' , database , query ) return resp
kegg find - data search .