Skip to main content

Easy way to get currency exchange data from https://data.ecb.europa.eu/ to a pandas dataframe.

Project description

Easy Exchange Rates

PyPI package version number Actions Status License

A python package for retrieving currency exchange data from https://data.ecb.europa.eu/ to a pandas dataframe.

Usage

from easy_exchange_rates import API
api = API()
df = api.get_exchange_rates(
  base_currency="EUR", 
  start_date="2024-03-12",
  end_date="2024-04-21",
  targets=["USD","CAD"]
)
print(df.head(5))
>>>
	        CAD	    USD
TIME_PERIOD		
2024-03-12	1.4739	1.0916
2024-03-13	1.4756	1.0939
2024-03-14	1.4725	1.0925
2024-03-15	1.4731	1.0892
2024-03-18	1.4745	1.0892

Testing

python3 -m unittest discover -s tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_exchange_rates-0.2.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

easy_exchange_rates-0.2.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page