In the file tools.py, use requests module instead of the duo json and urllib.request.urlopen.
tools.py
json
urllib.request.urlopen