OpenWeather API setup

Open Weather Maps API Key

We'll be using OpenWeatherMaps.org to retrieve the weather info through its API. In order to do so, you'll need to register for an account and get your API key.

Go to this link and register for a free account. Once registered, you'll get an email containing your API key, also known as the "openweather token".

Copy and paste this key into your secrets.py file that is on the root level of your CIRCUITPY drive, so it looks something like this:

# This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it

secrets = {
    'ssid' : 'my_ssid',
    'password' : 'my_pass',
    'timezone' : "America/New_York", # http://worldtimeapi.org/timezones
    'openweather_token' : 'putYourOpenWeatherTokenHere',
    }
This guide was first published on Apr 08, 2020. It was last updated on Apr 08, 2020.
This page (OpenWeather API setup) was last updated on Jul 14, 2020.