def similar_funcs(self, text, typ=None): resp = requests.get(self.path + "/similar_funcs", json={"text":text, "type":typ}) # resp is a list of snippet json data return bson_loads(resp.text)