summaryrefslogtreecommitdiff
path: root/RatesWidget/rates.py
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@gmail.com>2016-01-04 23:04:16 +0100
committerstreetturtle <streetturtle@gmail.com>2016-01-04 23:04:16 +0100
commit88d661d9538da1d9ce44d04954f5eee199d55bd6 (patch)
treeb8f4e3e91039f6f80ef0f1140a5310d68b1e343a /RatesWidget/rates.py
parentd3f0f72cd207c3f5aaf77cc8b73e8ad07d952702 (diff)
Add rates widget
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