def search_ohloh_project(project_name):
 results = get_ohloh_api_request(u'https://www.ohloh.net/p.xml', api_key, {u'query': project_name, u'sort': u'relevance'})
 if (results.find(u'result/project/id') is None):
  raise Exception((u'Could not find project %s on Ohloh' % project_name))
 project = results.find(u'result/project')
 return {u'id': project.findtext(u'id'), u'name': project.findtext(u'name'), u'description': project.findtext(u'description'), u'analysis': project.findtext(u'analysis_id'), u'tags': [tag.text for tag in project.iterfind(u'tags/tag')]}

def search_ohloh_project ( project_name ) : results = get_ohloh_api_request ( u'https://www.ohloh.net/p.xml' , api_key , { u'query' : project_name , u'sort' : u'relevance' } ) if ( results . find ( u'result/project/id' ) is None ) : raise Exception ( ( u'Could not find project %s on Ohloh' % project_name ) ) project = results . find ( u'result/project' ) return { u'id' : project . findtext ( u'id' ) , u'name' : project . findtext ( u'name' ) , u'description' : project . findtext ( u'description' ) , u'analysis' : project . findtext ( u'analysis_id' ) , u'tags' : [ tag . text for tag in project . iterfind ( u'tags/tag' ) ] }
searches for an ohloh project by name keyword arguments: project_name -- the project name to search for .