1# Here is how to set a time out for requests.get in python
2# its simple!
3import requests
4
5link = 'https://google.com'
6request_from_link = requests.get(link, timeout=10)
7# this causes the code to call a timeout if the connection or delays in
8# between the reads take more than 10 seconds
9print(request_from_link)