MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / GET

Method GET

openlibrary/plugins/inside/code.py:15–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 path = "/search/inside"
14
15 def GET(self):
16 search_start = time() # should probably use a @timeit decorator
17 i = web.input(q="", page=1)
18 query = i.q
19 page = int(i.page)
20 results = fulltext_search(query, page=page, limit=RESULTS_PER_PAGE)
21 search_time = time() - search_start
22
23 return render_template(
24 "search/inside.tmpl",
25 query,
26 results,
27 search_time,
28 page=page,
29 results_per_page=RESULTS_PER_PAGE,
30 )
31
32
33def setup():

Callers

nothing calls this directly

Calls 2

timeFunction · 0.85
render_templateFunction · 0.50

Tested by

no test coverage detected