Skip to content

aman-ali65/Weather-Insight-Fullstack-Flask-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Insight Flask App

Python Flask API Frontend

Full-stack Flask weather application that uses the Ambee API for geocoding, current weather lookup, and historical weather exploration.

Project Overview

This project wraps external weather services behind a Flask application and renders results as HTML pages. It is useful as both an API integration demo and a simple weather dashboard starter project.

Main Features

  • Search location metadata for a city.
  • Fetch live weather by city or coordinates.
  • Fetch historical weather for a selected date range.
  • Render friendly HTML pages for home, info, current conditions, errors, and history.
  • Keep the weather API key outside version control using .env.

Tech Stack

  • Python
  • Flask
  • Requests
  • python-dotenv
  • HTML, CSS, and JavaScript

Project Structure

Weather API- Frontend+backend/
├── app.py
├── weather.py
├── requirements.txt
├── .env.example
├── static/
│   ├── css/
│   └── js/
└── templates/
    ├── home.html
    ├── info.html
    ├── current.html
    ├── history.html
    └── error.html

Environment Variables

Create a .env file and add:

  • API_WEATHER

Run Locally

python -m venv .venv
pip install -r requirements.txt
python app.py

Open http://127.0.0.1:5000/.

Available Routes

  • /
  • /info/<city>
  • /weather?lng=<longitude>&lat=<latitude>
  • /current/<city>
  • /history/<city>?from=YYYY-MM-DD hh:mm:ss&to=YYYY-MM-DD hh:mm:ss

Best For

  • API integration practice
  • Flask full-stack demos
  • Weather dashboard prototypes
  • Portfolio projects using external services

Future Improvements

  • Add charts for historical trends
  • Add unit conversion support
  • Cache recent searches
  • Improve UI for mobile devices

About

Full-stack Flask weather application that integrates Ambee geocoding, current weather, and historical weather APIs into a browser-based experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors