Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Created May 10, 2022 20:23
Show Gist options
  • Select an option

  • Save KenoLeon/f3a818dd917d2ea9db1a9a5dc917d621 to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/f3a818dd917d2ea9db1a9a5dc917d621 to your computer and use it in GitHub Desktop.
# AccuWeather API call example 5 Day Forecast for
# Mexico City Code: 242560
import requests
url = "http://dataservice.accuweather.com/forecasts/v1/daily/5day/242560?apikey=YOURAPIKEY"
resp = requests.get(url)
if resp.status_code == 200:
print(resp.json())
else:
print(resp.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment