use requestsocks  with setting proxy in a session

session = requesocks.session()
    session.proxies = {'http': 'socks5://127.0.0.1:9050',
                       'https': 'socks5://127.0.0.1:9050'}
    r = session.get('https://api.github.com', auth=('user', 'pass'))

https://pypi.python.org/pypi/requesocks/0.10.8