awesome-wm-widgets/RatesWidget/ratesPopup.py

12 lines
245 B
Python
Raw Normal View History

2016-01-12 22:59:53 +01:00
#!/usr/bin/python
import requests
import json
r = requests.get("http://api.fixer.io/latest?symbols=USD,EUR,JPY,GBP,CHF,CAD,RUB")
resp = json.loads(r.content)
rates = resp["rates"]
for currency, rate in rates.items():
print currency, rate