Skip to content

Instantly share code, notes, and snippets.

@raganmd
Last active July 26, 2021 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raganmd/dc929e6625445e9910ad19bd52ee3974 to your computer and use it in GitHub Desktop.
Save raganmd/dc929e6625445e9910ad19bd52ee3974 to your computer and use it in GitHub Desktop.
import requests
dataURL = 'https://www.purpleair.com/json?show=182&fbclid=IwAR17uHJ8zpHcj7nwipL7_KRleF8uj9DEZ3Gqz-8AfQwVVC7rYdfWC61aM0Q'
rawData = requests.get(dataURL)
msg = rawData.json()
results = msg.get('results')
for eachDict in results:
for eachKey, eachVal in eachDict.items():
print(eachKey, eachVal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment