本文整理汇总了Python中search.Search.get_json方法的典型用法代码示例。如果您正苦于以下问题:Python Search.get_json方法的具体用法?Python Search.get_json怎么用?Python Search.get_json使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search.Search
的用法示例。
在下文中一共展示了Search.get_json方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: memory_search_api
# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get_json [as 别名]
def memory_search_api():
source = request.args.get('source')
target = request.args.get('target')
project = request.args.get('project')
search = Search(source, target, project)
return Response(search.get_json(), mimetype='application/json')
示例2: autocomplete_api
# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get_json [as 别名]
def autocomplete_api(word):
word = word + u"*"
lang = request.args.get('lang')
if lang is None:
search = Search(word)
else:
search = Search(word, lang)
search.AutoComplete = True
return json_answer(search.get_json())
示例3: search_api
# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get_json [as 别名]
def search_api(word):
lang = request.args.get('lang')
it = request.args.get('it')
if lang is None:
search = Search(word)
else:
search = Search(word, lang)
if it is None and is_tracking_enabled():
save_stats(word, lang)
return json_answer(search.get_json())
示例4: index_letter_api
# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get_json [as 别名]
def index_letter_api(lletra):
search = Search(lletra)
search.Index = True
search.Duplicates = False
return json_answer(search.get_json())