MCPcopy Index your code
hub / github.com/geekcomputers/Python / return_quote

Function return_quote

quote.py:12–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11
12def return_quote():
13 response = requests.get("https://zenquotes.io/api/random")
14 json_data = loads(response.text)
15 quote = (
16 json_data[0]["q"] + " -" + json_data[0]["a"]
17 ) # aligning the quote and it's author name in one string
18 return quote
19
20
21quote = return_quote()

Callers 1

quote.pyFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected