Skip to main content

Documentation 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.

ClimApp runs as a local Flask server that calls AEMET’s API on demand. This guide walks you through cloning the repository, installing dependencies, setting up your environment variables, and opening the dashboard in your browser. The whole process takes under five minutes.

Prerequisites

Before you begin, make sure you have the following:
  • Python 3.x — ClimApp uses f-strings, type hints, and standard library modules that require Python 3.
  • An AEMET API key — register for free at opendata.aemet.es. See Configure your AEMET API key for step-by-step instructions.
  • git — to clone the repository.

Steps

1

Clone the repository

Clone the ClimApp source code from GitHub and enter the project directory:
git clone https://github.com/adrianaarang/climapp.git
cd climapp
2

Install dependencies

Install all required Python packages from requirements.txt:
pip install -r requirements.txt
This installs the following packages:
  • flask — the web framework that powers ClimApp’s routes and templates.
  • python-dotenv — loads environment variables from your .env file into os.getenv.
  • requests — used by WeatherAPIService to call the AEMET API.
  • pandas — available for data processing and manipulation.
  • pytest — the test runner for the project’s test suite.
3

Configure environment variables

Create a .env file in the project root with your AEMET API key and a Flask session secret:
AEMET_API_KEY=your_api_key_here
SECRET_KEY=your_secret_key_here
AEMET_API_KEY is required — the app raises a ValueError at startup if it is missing. SECRET_KEY is optional and defaults to clave_secreta if not set.
4

Run the application

Start the Flask development server:
python app.py
The server starts on host 0.0.0.0, port 5000, with debug mode enabled. You should see output similar to:
* Running on http://0.0.0.0:5000
5

Open in browser and allow location permission

Open http://localhost:5000 in your browser. When the dashboard loads, your browser will prompt you for location permission. Click Allow so ClimApp can read your GPS coordinates and find the nearest AEMET observation station.
ClimApp uses your browser’s Geolocation API to obtain your latitude and longitude, then passes them as query parameters to the /api/clima endpoint. The server calculates the distance to every active AEMET station and returns weather data from the geographically closest one.
Debug mode is already enabled in app.py (debug=True). In debug mode, Flask automatically reloads the server when you change source files and displays detailed error pages in the browser. Disable it before deploying to production by setting debug=False or using a production WSGI server such as Gunicorn.

Build docs developers (and LLMs) love