class HTTPBasicAndProxyAuth:

    def __init__(self, basic_up, proxy_up):
        self.basic_auth = HTTPBasicAuth(*basic_up)
self.proxy_auth = HTTPProxyAuth(*proxy_up)

def __call__(self, r):
    r = self.basic_auth(r)
r = self.proxy_auth(r)
Python requests library combine HTTPProxyAuth with HTTPBasicAuth