This Python script utilizes APIs like CurrencyLayer & Fixer.io to fetch real-time exchange rates and convert between various currencies.
- Obtain API keys for CurrencyLayer and Fixer.io.
- Store the API keys in
api_key.txt(one per line). - Run the
pyexchange.pyscript to perform currency conversion.
$ python pyexchange.pyEnter the amount, source currency code, and target currency code when prompted.
pyexchange/
│
├── api_key.txt
├── pyexchange.py
├── exchange_rates.py
├── user_interface.py
└── README.md
Python 3.x requests library