summaryrefslogtreecommitdiff
path: root/RatesWidget/ratesPopup.py
diff options
context:
space:
mode:
Diffstat (limited to 'RatesWidget/ratesPopup.py')
-rw-r--r--RatesWidget/ratesPopup.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/RatesWidget/ratesPopup.py b/RatesWidget/ratesPopup.py
new file mode 100644
index 0000000..4ac6cce
--- /dev/null
+++ b/RatesWidget/ratesPopup.py
@@ -0,0 +1,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