Request sessions


requests.Session

requests.Session(self)

A Requests session.

Provides cookie persistence, connection-pooling, and configuration.

Examples

>>> import requests
>>> s = requests.Session()
>>> s.get('https://httpbin.org/get')
<Response [200]>
>>> with requests.Session() as s:
...     s.get('https://httpbin.org/get')
<Response [200]>