quandl / quandl-python

MIT License
1.37k stars 336 forks source link

Quandl-Python add params #86

Closed toasteez closed 7 years ago

toasteez commented 7 years ago

Would it be possible to add params to support the following:

proxies - Requests supports a dictionary containing proxies:

proxies = {'http': 'http://proxy.company.org:8080',
       'https': 'http://proxy.company.org:8080',}

verify - requests supports a verify=<file path name of cert,pem>

Would be useful to make requests-kerberos and requests,ntlm work for use behind firewall. This is really useful for the use case where the call to a database redirects to amazon.

Some example code:

import requests
from requests_kerberos import HTTPKerberosAuth
import zipfile, io

proxies = {'http': 'http://proxy.company.org:8080',
       'https': 'http://proxy.company.org:8080',}

meta_url = 'https://www.quandl.com/api/v3/datasets/WIKI/AAPL/metadata.json'

# url =  'https://www.quandl.com/api/v3/datasets/WIKI/AAPL.json?collapse=daily?exclude_column_names=true'

url =  'https://www.quandl.com/api/v3/databases/CLSM/data?api_key=<insert key here>

response = requests.get(url, proxies=proxies, verify='cert.pem', auth=HTTPKerberosAuth())
junos commented 7 years ago

Hi @toasteez, Interesting feature! If you would like to create a pull request with the proposed changes, we can see if it makes sense to merge it into our next release.

junos commented 7 years ago

Hi @toasteez, Could you possibly setup a proxy server to access Quandl APIs at your network settings? We will keep this feature in mind for future implementation but right now we do not have the bandwidth. If you are able to provide a PR, we can review it and hopefully get that as part of the next release