summaryrefslogtreecommitdiff
path: root/RatesWidget/rates.py
diff options
context:
space:
mode:
Diffstat (limited to 'RatesWidget/rates.py')
-rw-r--r--RatesWidget/rates.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/RatesWidget/rates.py b/RatesWidget/rates.py
new file mode 100644
index 0000000..9a12462
--- /dev/null
+++ b/RatesWidget/rates.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+
+import requests
+import json
+
+r = requests.get("http://api.fixer.io/latest?symbols=CHF,EUR")
+resp = json.loads(r.content)
+
+print resp["rates"]["CHF"] \ No newline at end of file