CurrencyAPI Python Client is the official Python Wrapper around the CurrencyAPI API.
Install from pip:
pip install currencyapicomInstall from code:
pip install git+https://github.com/everapihq/currencyapi-python.gitAll curencyapi API requests are made using the Client class. This class must be initialized with your API access key string. Where is my API access key?
In your Python application, import currencyapicom and pass authentication information to initialize it:
import currencyapicom
client = currencyapicom.Client('API_KEY')print(client.status())https://currencyapi.com/docs/currencies
result = client.currencies(currencies=['EUR', 'CAD'])
print(result)https://currencyapi.com/docs/latest
result = client.latest()
print(result)https://currencyapi.com/docs/historical
result = client.historical('2022-02-02')
print(result)https://currencyapi.com/docs/range
result = client.range('2022-02-02', '2022-02-04')
print(result)https://currencyapi.com/docs/convert
result = client.convert(1234)
print(result)Any feedback? Please feel free to contact our team.