A command-line tool for fetching and displaying weather information
Project description
WeatherWhisper 🌦️
WeatherWhisper is a friendly command-line tool that fetches and displays weather information from the free OpenWeatherMap API.
It runs on Mac OS, Linux, and Windows and installs in seconds with pip.
Features
- 🔍 Current weather for any city or lat,lon coordinates
- 📏 Metric / Imperial units switch (
-u metric|imperial) - 🎨 Colored output that reflects temperature & conditions (toggleable)
- 🎭 ASCII art icons for common weather types (toggleable)
- 📑 Output formats: brief, detailed, json, forecast
- ⭐ Save favorite locations for one-touch lookup
- 🗓️ 5-day forecast summaries & hourly breakdowns
- 🌅 Sunrise / sunset times
- ✈️ Wind speed & direction, humidity, pressure, visibility, clouds
- 📦 Transparent on-disk caching to reduce API calls
- 🔧 Config file (
~/.weatherwhisper/config.ini) for defaults - 🛠️ Extensible roadmap: historical data, alerts, air-quality, plugins …
Installation
Requires Python 3.7+.
pip install --upgrade weatherwhisper
First run will create the config directory:
~/.weatherwhisper/
└─ config.ini
Getting an API key
- Sign up at https://openweathermap.org/api
- Copy your key (a 32-character string)
- Set it once:
weatherwhisper config --api-key YOUR_KEY_HERE
Quick Start
# Paris weather in default (metric, brief) format
weatherwhisper current "Paris"
# Same but imperial units and detailed view
weatherwhisper current "New York" -u imperial -f detailed
# Five-day forecast with ASCII art disabled
weatherwhisper forecast "Tokyo" --no-ascii
Favorites
# Save a favourite
weatherwhisper favorites add "Berlin"
# List favourites
weatherwhisper favorites list
# Remove
weatherwhisper favorites remove "Berlin"
If no location argument is provided to current, forecast, etc., the first favourite is used automatically.
Configuration
weatherwhisper config show # View all settings
weatherwhisper config set --units imperial
weatherwhisper config set --no-color # Disable ANSI colours
The config.ini is human-editable; changes take effect next run.
Output Formats
| Format | Flag example | Use case |
|---|---|---|
| brief* | -f brief (default) |
Quickly glance at essentials |
| detailed | -f detailed |
Full breakdown (humidity, sunrise…) |
| json | -f json |
Pipe to other tools (jq, scripts) |
| forecast | weatherwhisper forecast … |
5-day / hourly forecast |
Screenshots
| Brief | Detailed | Forecast |
|---|---|---|
(Replace the placeholders in docs/images/ with real captures.)
Development
git clone https://github.com/yourname/weatherwhisper.git
cd weatherwhisper
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
pre-commit install
Run the CLI from source:
python -m weatherwhisper current "London"
Tests:
pytest
Roadmap
- Historical weather (paid API)
- Severe weather alerts
- Auto-detect location (IP / GPS)
- Plug-in system for alternative providers
- GUI wrapper
See issues to contribute or suggest features.
Contributing 🤝
Pull requests are welcome! Please open an issue first to discuss big changes.
All code is formatted with black and checked by ruff & pytest.
License
MIT © 2025 Your Name.
See LICENSE for details.
Made with ☕ and clouds.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weatherwhisper-0.1.0.tar.gz.
File metadata
- Download URL: weatherwhisper-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c8c8e41431c36065b9a9bb40b96d32c5b4e200272a2d7123a394284e0f0c166
|
|
| MD5 |
3a4dd0b1d9fdc50f2c2b068130dad70f
|
|
| BLAKE2b-256 |
89c2c274442ed5660247c2832e8272282957dda2749d9034a530f30a91e1ae71
|
File details
Details for the file weatherwhisper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: weatherwhisper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be4b032be035ab24c6c5ddaa1761e240af99c30a8ce877077776150e4a7f03ad
|
|
| MD5 |
6d48ea9aaf3d093043fb15fd0f400777
|
|
| BLAKE2b-256 |
cec6eb7ba34764912cd609a0adb4aaff5fa2a20a45d1c5f7c77f4f077bfd054b
|