import octopart #search_response = octopart.category_search_raw('resistor') # ## print number of hits #print "Hits: {}".format(search_response['hits']) # ## print results #for result in res['results']: # item = result['item'] # print "{}: {}".format(item['uid'], item['name']) categories = octopart.category_search('resistor') for c in categories: print "{}: {}".format(c.uid, c.name)