mortada / fredapi

Python API for FRED (Federal Reserve Economic Data) and ALFRED (Archival FRED)
Apache License 2.0
902 stars 159 forks source link

add proxy settings #30

Open dmpe opened 4 years ago

dmpe commented 4 years ago

Hi, it would have been really nice if you could add to Fred() call also proxy settings. Thanks

amandus1990 commented 2 years ago

agree. it is easy to realize but useful

TomasKoutek commented 2 years ago

Hi, as an alternative you can use package pystlouisfed, where it is possible to set parameters from requests.request

from pystlouisfed import FRED

fred = FRED(
    api_key='abcdefghijklmnopqrstuvwxyz123456',
    request_params={
        'proxies': {
            "http": 'http://127.0.0.1:3128',
            "https": 'http://127.0.0.1:3128'
        }
    })

df = fred.series_observations(series_id='GDP')
milmr commented 1 year ago

Opened a PR#65 for this issue.

Tvogel20 commented 1 year ago

Could this be pulled, the code looks good? Thanks