Full-stack Flask weather application that uses the Ambee API for geocoding, current weather lookup, and historical weather exploration.
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.
- 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.
- Python
- Flask
- Requests
python-dotenv- HTML, CSS, and JavaScript
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
Create a .env file and add:
API_WEATHER
python -m venv .venv
pip install -r requirements.txt
python app.pyOpen http://127.0.0.1:5000/.
//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
- API integration practice
- Flask full-stack demos
- Weather dashboard prototypes
- Portfolio projects using external services
- Add charts for historical trends
- Add unit conversion support
- Cache recent searches
- Improve UI for mobile devices