Weather update
# Ghana Weather CLI
A command-line weather tool built for Ghanaian cities. Type a town name, get current conditions plus rainfall probability — no browser needed.
## What it does
- Current temperature, humidity, wind speed, and visibility
- "Feels like" temperature
- Rain chance for the next 3-hour window (with a quick emoji indicator)
- Optimized for Ghanaian towns — searches within Ghana by default so smaller cities like Koforidua, Sunyani, Ho, Wa, and Bolgatanga actually return results
## Requirements
- Python 3.x
- `requests` library
- A free OpenWeatherMap API key
## Setup
**1. Clone the repo**
```bash
git clone
github.com
cd ghana-weather-cli
```
**2. Install dependencies**
```bash
pip install requests
```
**3. Add your API key**
Get a free key at openweathermap.org. Then open `weather.py` and replace the placeholder:
```python
API_KEY = "paste_your_key_here"
```
## Usage
```bash
python weather.py
```
You'll be prompted to enter a city name. Type `q` or `quit` to exit.
```
city (or 'q' to quit): Kumasi
===================================
🌍 Kumasi, GH
===================================
🌡️ Temp: 28.4°C
🤔 Feels like: 31.2°C
💧 Humidity: 78%
🌤️ Condition: Scattered Clouds
💨 Wind: 3.1 m/s
👁️ Visibility: 10 km
🌦️ Rain chance: 45%
===================================
```
## Rain chance guide
| Emoji | Meaning |
|-------|---------|
| ☀️ | Under 40% — probably fine |
| 🌦️ | 40–69% — might want an umbrella |
| 🌧️ | 70%+ — it's going to rain |
## Notes
- The script appends `,GH` to every search so OpenWeatherMap looks within Ghana first. This is why smaller towns work when they wouldn't otherwise.
- Rain probability comes from the `/forecast` endpoint (the free `/weather` endpoint doesn't include it), so the script makes two API calls per lookup.
- If a town still returns "not found," it's not in OpenWeatherMap's database. Try the nearest larger town.
## License
MIT