import urllib
import json
import os

apikey = os.environ['DARKSKY_API_KEY']
recursecenter = {'lat': '40.72078', 'lon': '-74.001119'}
# defint the base URL for API calls
url = 'https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE'
# put in the details we actually need to get real information
s = url.replace('APIKEY', apikey).replace('LATITUDE', recursecenter['lat']).replace('LONGITUDE', recursecenter['lon'])

# let's keep this thing in a file-like object from the internet
f = urllib.urlopen(s)
# actually get the information out of the file-like object
data = f.read()
# turn this into a dictionary, by the power of JSON
d = json.loads(data)

hourly = d['hourly']
print hourly['summary']


@@ -33,112 +33,792 @@
  os%0A
-%0Aapikey = os.environ%5B'DARKSKY_API_KEY'%5D%0Arecursecenter = %7B'lat': '40.72078', 'lon': '-74.001119'%7D
+import argparse%0A%0A# get the Dark Sky API key in a cool safe way%0Aapikey = os.environ%5B'DARKSKY_API_KEY'%5D%0A%0A# To start, let's grab whatever arguments were passed in.%0A# First, we make a parser with argparse:%0Aparser = argparse.ArgumentParser(description = 'Specify optional preferences.')%0A# Next, we'll define what options we'd like to, um, define%0Aparser.add_argument('-location', '-l', help = 'specify a particular location')%0A%0A# Put all those arguments into something we can use!%0Aargs = parser.parse_args()%0A%0A%0A# Let's define several locations that we may care about%0Alocations = %7B'recursecenter': %7B'lat': '40.72078', 'lon': '-74.001119'%7D,%0A             'portland_home': %7B'lat': '45.55902', 'lon': '-122.630664'%7D,%0A             'parents':       %7B'lat': '47.29085', 'lon': '-122.40482'%7D%7D%0A
 %0A# defin
 t th
@@ -813,17 +813,17 @@
 %0A# defin
-t
+e
  the bas
@@ -1326,16 +1326,93 @@
 (data)%0A%0A
+minutely = d%5B'minutely'%5D%0Aprint 'Imminently: %7B0%7D'.format(minutely%5B'summary'%5D)%0A
 hourly =
@@ -1430,16 +1430,40 @@
 %5D%0Aprint 
+'Coming up: %7B0%7D'.format(
 hourly%5B'
@@ -1471,10 +1471,11 @@
 ummary'%5D
+)
 %0A%0A

add some more detail, destroy functionality with new argparse scaffolding