Skip to content

raphaelbdias/Weather-Hamilton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather-Hamilton

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.

Features

  • 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

Preview

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

Quick Start

1. Clone the repo

git clone https://github.com/raphaelbdias/Weather-Hamilton.git cd Weather-Hamilton

2. Install dependencies

pip install -r requirements.txt

3. Set your API key

export OPENWEATHER_API_KEY="your_api_key_here"

On Windows:

set OPENWEATHER_API_KEY=your_api_key_here

4. Run

python weather_hamilton.py Usage

Current weather only (default)

python weather_hamilton.py

With 5-day forecast

python weather_hamilton.py --forecast

Metric units (Celsius, m/s)

python weather_hamilton.py --units metric

Imperial units (Fahrenheit, mph)

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •