ClimApp reads its configuration from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/adrianaarang/climapp/llms.txt
Use this file to discover all available pages before exploring further.
.env file in the project root using python-dotenv. Two environment variables control the application’s behaviour: AEMET_API_KEY, which is required for all AEMET API calls, and SECRET_KEY, which secures Flask sessions. This page explains how to obtain your API key and configure both variables correctly.
Getting an AEMET API key
AEMET provides free API access to its public weather observation data through the OpenData portal. Follow these steps to get your key:Go to opendata.aemet.es
Open https://opendata.aemet.es in your browser. This is Spain’s official open meteorological data portal.
Register an account
Click Acceso con clave de API and then choose the option to register a new account. Fill in the required fields (name and email address) and submit the form.
Environment variables
Your API key from opendata.aemet.es. This key is sent as an
api_key header on every request to the AEMET conventional observation endpoint. If this variable is missing when the application starts, WeatherAPIService raises a ValueError and the app will not serve weather data.The Flask session secret. Used by Flask to cryptographically sign session cookies. Defaults to
clave_secreta if not set. You should set this to a long, random string in any environment where you handle real user sessions.Example .env file
Create this file in the root of your ClimApp project directory:load_dotenv() at the top of app.py, making them available through os.getenv.
ClimApp queries AEMET’s conventional observation endpoint to retrieve all active station readings:This URL is the
base_url defined in WeatherAPIService. AEMET returns a metadata response whose datos field contains a second URL with the actual observation records. ClimApp follows this two-step pattern automatically on every /api/clima request.