A simple, lightweight command-line weather app that shows current conditions and a 5-day forecast specifically for Hamilton, Ontario, Canada.
Powered by the OpenWeatherMap API.
- Current weather (temperature, feels-like, description, humidity, wind)
- Optional 5-day / 3-hour forecast
- Supports metric, imperial, or standard units
- Clean console output
- API key loaded securely from environment variables
Current Weather in Hamilton, Ontario Temperature: 12.4°C (feels like 11.8°C) Conditions: Light rain Humidity: 82% Wind: 6.2 m/s from SW 5-Day Forecast Mon 06 Dec → 14°C / 9°C — Light rain Tue 07 Dec → 10°C / 6°C — Overcast clouds Wed 08 Dec → 8°C / 4°C — Clear sky ... text## Prerequisites
- Python 3.6+
- OpenWeatherMap API key (free at https://openweathermap.org/api)
git clone https://github.com/raphaelbdias/Weather-Hamilton.git cd Weather-Hamilton
pip install -r requirements.txt
export OPENWEATHER_API_KEY="your_api_key_here"
python weather_hamilton.py Usage
python weather_hamilton.py
python weather_hamilton.py --forecast
python weather_hamilton.py --units metric
python weather_hamilton.py --units imperial --forecast Project Structure textWeather-Hamilton/ ├── weather_hamilton.py # Main script ├── config.py # Configuration & defaults ├── requirements.txt # Dependencies ├── .env.example # Example environment file └── README.md # This file API Key Setup (alternative)
Author Raphael Dias https://github.com/raphaelbdias