https://github.com/jsporna/pyexchangeratesapi
This is an unofficial Python wrapper for free ExchangeRatesAPI
https://github.com/jsporna/pyexchangeratesapi
exchange-rates pypi python rest-api
Last synced: 19 days ago
JSON representation
This is an unofficial Python wrapper for free ExchangeRatesAPI
- Host: GitHub
- URL: https://github.com/jsporna/pyexchangeratesapi
- Owner: jsporna
- License: apache-2.0
- Created: 2021-02-26T13:03:04.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-17T10:55:45.000Z (over 5 years ago)
- Last Synced: 2026-04-20T01:11:35.148Z (2 months ago)
- Topics: exchange-rates, pypi, python, rest-api
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyexchangeratesapi
This is an unofficial Python wrapper for free [ExchangeRatesAPI](https://github.com/exchangeratesapi/exchangeratesapi), which provides exchange rate lookups courtesy of the [Central European Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html). It features a number of useful functions and can be installed easily using [pip](https://pypi.org/project/pip/).
Additionally wrapper is providing CLI interface.
[](https://github.com/jsporna/pyexchangeratesapi/actions?query=workflow%3ATest)
[](https://badge.fury.io/py/exchangeratesapi)


[](https://codecov.io/gh/jsporna/pyexchangeratesapi)
[](https://snyk.io/test/github/jsporna/pyexchangeratesapi?targetFile=requirements.txt)
[](https://www.codefactor.io/repository/github/jsporna/pyexchangeratesapi)
## Installation
```shell
pip install exchangeratesapi
```
## Python usage
```python
from exchangeratesapi import rates
latest = rates.latest()
latest["base"]
latest["date"]
latest = rates.Rates()
latest.base
latest.date
history = rates.history(start_at="2020-01-01", end_at="2020-12-31", base="PLN")
history["base"]
history["start_at"]
history["end_at"]
history = rates.HistoryRates(start_at="2020-01-01", end_at="2020-12-31", base="PLN")
history.base
history.start_at
history.end_at
```