The ecbdata API allows for easy querying of data from the European Central Bank's Data Portal.
You can install with pip as:
pip install ecbdata
from ecbdata import ecbdata
df = ecbdata.get_series('ICP.M.U2.Y.XEF000.3.INX', start='2024-01', end='2024-03')
When behind a proxy server, one can establish a connection as
from ecbdata import ecbdata
ecbdata.connect(proxies={'https': '<https-proxy>',
'http': '<http-proxy>'})
df = ecbdata.get_series('ICP.M.U2.Y.XEF000.3.INX', start='2024-01', end='2024-03')
For details on available series and filters, please consult the ECB Data Portal page.
Luca Mingarelli, 2024