Under the hood of requests.get() , a new Session object is created for each request made.
By creating a session object in front, you can reuse the session; this allows you to save cookies, for example, and allows you to reuse parameters that will be used for all connections, such as headers and request parameters. To top it off, sessions allow you to use a connection pool; reusing connections to the same host.
See Session Documentation :
The Session object allows you to save certain parameters in all queries. It also saves cookies in all requests made from the Session instance and will use the urllib3 connection pool. Therefore, if you make multiple requests to the same host, the underlying TCP connection will be reused, which can lead to a significant increase in performance (see HTTP Permanent Connection ).
source share