requests.exceptions.Timeout  VS 
requests.models.Response.status_code = 504 [gateway timeout]
what is the actual difference between the two as both deals with saying timeout has occurred?
Let us say Service s1 makes call to S2
In s1:
request.post( url=s2,..., timeout=60 ) 
when will requests.exceptions.Timeout  be raised and in what scenario 504 is received.
Can retries be made for all of those exceptions  - I believe answer for above question might give lead to this..
Thanks in advance.
The gateway timeout means the connected server had some sort of timeout after receiving your request(i.e. you did make a connection).  However, the requests timeout exception means your script never connected to the server and timed out waiting on a response from the server (i.e. you did not make a connection).
python: requests.exceptions.Timeout vs requests.models.Response.status_code 504 ( gateway timeout )