After doing some further investigation into this issue, it seems that requests does not directly support digest authentication over proxies, which could possibly be the cause of the 407 error if your company’s corporate proxy is expecting digest authentication instead of basic authentication. However, there is support for this in requests-toolbelt
, which is maintained by the requests developers for additional utilities that that they’ve deemed useful, but too niche for requests
. See the docs for HTTPProxyDigestAuth
for details, it looks very simple to use.
If the above solution doesn’t work, I would recommend getting in contact with your system administrators to determine the form of authentication required, and to verify your credentials. Without knowing any of the configuration details of the proxy server, I’m just guessing at possible solutions.