def search_npn(): q = request.args.get('q', default='', type=str) url = mapi_url('top_npn_search_matches') if (url): response = requests.get(url, params={'q': q}).json() else: response = LNHPD.top_npn_search_matches(q) return jsonify(response)
async def top_npn_search_matches(q: str): return LNHPD.top_npn_search_matches(q)