diff options
author | streetturtle <streetturtle@gmail.com> | 2016-01-04 23:04:16 +0100 |
---|---|---|
committer | streetturtle <streetturtle@gmail.com> | 2016-01-04 23:04:16 +0100 |
commit | 88d661d9538da1d9ce44d04954f5eee199d55bd6 (patch) | |
tree | b8f4e3e91039f6f80ef0f1140a5310d68b1e343a /RatesWidget/rates.py | |
parent | d3f0f72cd207c3f5aaf77cc8b73e8ad07d952702 (diff) |
Add rates widget
Diffstat (limited to 'RatesWidget/rates.py')
-rw-r--r-- | RatesWidget/rates.py | 9 |
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 |