How to use proxies with an HTTP session using the Python requests package
I was working on a client project yesterday where I needed to use a proxy to make HTTP requests with the Python requests package.
In my use case, I needed to create a session and I wanted to just specify the proxy settings in one place and use that for all requests made through that session. I didn't see how to do this in the documentation so I thought I'd share my solution here.
Here's …