summaryrefslogtreecommitdiff
path: root/RatesWidget/ratesPopup.py
blob: 4ac6cceec3559a6d9de72ff1e5ace1a25596b788 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/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