This should do the trick:
import requests.adapters
session = requests.Session()
adapter = requests.adapters.HTTPAdapter(pool_connections=100, pool_maxsize=100)
session.mount('http://', adapter)
response = session.get("/mypage")
More Related Contents:
- Correct way to try/except using Python requests module?
- Fastest parallel requests in Python
- Is the Session object from Python’s Requests library thread safe?
- How to get response SSL certificate from requests in python?
- python how to decode http response
- Python requests with multithreading
- How to get the raw content of a response in requests with Python?
- Download large file in python with requests
- How to get the return value from a thread in Python?
- How to download image using requests
- Using module ‘subprocess’ with timeout
- Updating GUI elements in MultiThreaded PyQT
- How to use Python requests to fake a browser visit a.k.a and generate User Agent?
- Limit number of threads in numpy
- How to capture multiple camera streams with OpenCV?
- Python threads all executing on a single core
- Using headers with the Python requests library’s get method
- How to close a thread when multithreading? [duplicate]
- Threading in Python [closed]
- Start a flask application in separate thread
- Python Requests package: Handling xml response
- Python 3 Multiprocessing queue deadlock when calling join before the queue is empty
- Python code performance decreases with threading
- Python: FastAPI error 422 with POST request when sending JSON data
- requests.get returns 403 while the same url works in browser
- Getting HEAD content with Python Requests
- waiting for user input in separate thread
- Return a requests.Response object from Flask
- How to close a thread from within?
- Embedding python in multithreaded C application