Skip to content

Samiksha998/Weather-Dashboard

Repository files navigation

Weather Dashboard (Flask)

Simple Flask app that fetches live weather and forecast from OpenWeatherMap API.

Features

  • Search weather by city
  • Displays temperature, humidity and a short forecast

Setup

  1. Create a virtual environment and install dependencies:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
  1. Create a .env file with your OpenWeatherMap API key:
OPENWEATHER_API_KEY=your_api_key_here
FLASK_SECRET=change_this
  1. Run the app:
python app.py

Then open http://127.0.0.1:5000 in your browser.

Docker Compose

Create a .env file in the repo root (or edit the .env file provided) with your API key:

OPENWEATHER_API_KEY=your_openweather_api_key_here
FLASK_SECRET=change-this-secret

Start with docker compose:

docker compose up --build

Stop and remove containers:

docker compose down

Notes

  • This example uses the free OpenWeatherMap endpoints. The forecast endpoint returns 5-day/3-hour data and the app shows a small slice of it.

Docker

Build the image from the repository root:

docker build -t weather-dashboard:latest .

Run the container (map port 5000):

docker run --rm -it -p 5000:5000 -e OPENWEATHER_API_KEY=your_key_here weather-dashboard:latest

Then open http://127.0.0.1:5000 in your browser.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors