python requests.get timeout

# Here is how to set a time out for requests.get in python
# its simple!
import requests

link = 'https://google.com' 
request_from_link = requests.get(link, timeout=10) 
# this causes the code to call a timeout if the connection or delays in 
# between the reads take more than 10 seconds
print(request_from_link)

Here is what the above code is Doing:
1. It is importing the requests library
2. It is setting the link variable to the google.com url
3. It is setting the request_from_link variable to the result of the
requests.get function. This function takes the link variable as the first
argument and the timeout variable as the second argument.
4. It is printing the request_from_link variable.