Skip to content

Instantly share code, notes, and snippets.

@quinncnl
Created May 2, 2019 15:27
Show Gist options
  • Save quinncnl/2aeca7418d7353732c6a35245b560882 to your computer and use it in GitHub Desktop.
Save quinncnl/2aeca7418d7353732c6a35245b560882 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import requests
r = requests.get('https://api.darksky.net/forecast/9ba42d2d7e496f2fb181e33940faec61/51.419551,5.446345?units=auto')
cur = r.json()['currently']
tmp = cur['temperature']
wind = float(cur['windSpeed'])
print("OUTSIDE TEMP", tmp, "°C WIND", wind, "KMH")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment