Simple script for converting between currencies. Uses the libre fixer.io API.
Muhammad M. Imtiaz a4164fad6f Init commit | 6 anos atrás | |
---|---|---|
LICENCE | 6 anos atrás | |
README.md | 6 anos atrás | |
curconv.py | 6 anos atrás |
Simple script for converting between currencies. Uses the libre fixer.io API.
curconv.py [amount] [input currency] [output currency]
Where:
amount
is the amount of the input currency that is to be converted
input currency
is the currency from which the amount is being converted
output currency
is the currency to which the amount is being converted
You must supply your own API key. This can be obtained from fixer.io and should be set as the value of API_KEY in the script. The free plan normally does not provide exchange rates using base currencies other than the Euro; however, curconv works around that limitation by converting the original amount to Euros and then to the output currency.
Tested with both Python 2.7 and 3.6.
This Work is subject to the terms of the Expat Licence. If a copy of the Expat Licence was not distributed with this Work, you can obtain one at https://directory.fsf.org/wiki/License:Expat.