Easy abstraction to get currency exchange data from https://exchangerate.host/ to a pandas dataframe.
Project description
easy-exchange-rates
Usage
from easy_exchange_rates import API
api = API()
time_series = api.get_exchange_rates(
base_currency="EUR",
start_date="2021-01-01",
end_date="2021-08-13",
targets=["USD","CAD"]
)
data_frame = api.to_dataframe(time_series)
print(data_frame.head(5))
>>>
CAD USD
2021-01-01 1.549988 1.217582
2021-01-02 1.544791 1.213500
2021-01-03 1.557791 1.223409
2021-01-04 1.566076 1.225061
2021-01-05 1.558553 1.229681
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
Built Distribution
Close
Hashes for easy_exchange_rates-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31c2754a4306d3c1cb22d2b322d00d057c35fa534420235bcda0f610ac75fffb |
|
MD5 | 6e3b5328040bd54c9cde43c8528a492f |
|
BLAKE2b-256 | 343c706949097d0b2d1b954e68db84de0b285b0953af9200913962ea34e43a59 |
Close
Hashes for easy_exchange_rates-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f116203327b9ef5d754be1d2796ff7283336dc64cd0964e6974248fe75340c55 |
|
MD5 | 138e20423c2c8c5647bbe16075d101bc |
|
BLAKE2b-256 | ca03d202fcb59e0f210aac3880829ffe1364375f5459e794622390bc820a8f92 |