Python 如何将代理与Dropbox API一起使用?

Python 如何将代理与Dropbox API一起使用?,python,proxy,dropbox-api,Python,Proxy,Dropbox Api,现在,我想使用代理,如何做到这一点?[参考交叉链接:] dbx = dropbox.dropbox.Dropbox('***************') f = open("/home/net/a.py", 'rb') data = f.read() res = dbx.files_upload(data, "/a.py", dropbox.files.WriteMode.overwrite) def get_my_proxy(): """ Static method to get p

现在,我想使用代理,如何做到这一点?

[参考交叉链接:]
dbx = dropbox.dropbox.Dropbox('***************')
f = open("/home/net/a.py", 'rb')
data = f.read()
res = dbx.files_upload(data, "/a.py", dropbox.files.WriteMode.overwrite)
def get_my_proxy():
    """ Static method to get proxy
    """
    proxy = '134.245.32.30:80'
    http_proxy = "http://" + proxy
    https_proxy = "https://" + proxy
    ftp_proxy = "ftp://" + proxy

    proxyDict = {
        "http": http_proxy,
        "https": https_proxy,
        "ftp": ftp_proxy
    }
    return proxyDict

import dropbox
access_token = 'myawesomeaccesstoken'
mysesh = dropbox.create_session(1,get_my_proxy())
dbx = dropbox.Dropbox(access_token,session=mysesh)

# Test the connection
dbx.users_get_current_account()