Skip to main content

A Rich-powered weather dashboard CLI using WeatherAPI.com, with favorites and interactive mode.

Project description

🌤️ Weather Dashboard CLI

A Python command-line weather dashboard built with Typer and Rich. Fetch current weather and forecasts, manage favorite cities, and explore weather data via an interactive CLI.

✨ Features

  • 🌤️ Current weather for any city
  • ⭐ Manage favorite cities (add, list, remove, clear)
  • 🧭 Interactive menu-based mode
  • 🌡️ Celsius / Fahrenheit support
  • 📊 Rich-formatted terminal output
  • ⚠️ Basic weather alerts (rain, etc.)

📦 Installation (from PyPI)

Using pip

pip install weather-dashboard-jl

Using uv (no project needed)

uv run --with weather-dashboard-jl --no-project -- weather --help

🔑 API Key Setup

This CLI uses WeatherAPI.com.

1) Get an API key

Create an account and generate a key at: https://www.weatherapi.com/

2) Set the environment variable

macOS / Linux

export WEATHER_API_KEY="YOUR_API_KEY"

Windows (PowerShell)

$env:WEATHER_API_KEY="YOUR_API_KEY"

Optional: .env file (local convenience)

Create a .env file in the directory you run the command from:

WEATHER_API_KEY=YOUR_API_KEY

weather --help works without the API key. The key is only required for commands that call the API.

🧪 Development Setup

git clone https://github.com/<your-username>/weather-dashboard.git
cd weather-dashboard
uv sync

🚀 Usage

Help

weather --help

Current weather

weather current Singapore
weather current "New York" --units f

Interactive mode

weather interactive

Favorites

weather fav add London
weather fav list
weather fav remove London
weather fav clear

📁 Project Structure

weather_dashboard/
├── cli_weather.py        # Typer CLI commands
├── client.py             # WeatherAPI HTTP client
├── conditions.py         # Weather condition mappings
├── models.py             # View models
├── ui.py                 # Rich UI helpers
├── weather_service.py    # Domain logic
├── favorites.py          # Favorites persistence
├── units.py              # Unit handling (C/F)
├── alerts.py             # Alert logic
└── data/
    └── weather_conditions.json

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

weather_dashboard_jl-0.1.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weather_dashboard_jl-0.1.2-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file weather_dashboard_jl-0.1.2.tar.gz.

File metadata

  • Download URL: weather_dashboard_jl-0.1.2.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for weather_dashboard_jl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 54ae34e4eab0947531fbcc820885b6882840beb4086e1556eec4e4e8e9563888
MD5 27e591facb800a6e10d2a2921beec809
BLAKE2b-256 d25de748ebb27e12434464e8dd04c7cc963aab6852d5773cd0839083416284c7

See more details on using hashes here.

File details

Details for the file weather_dashboard_jl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: weather_dashboard_jl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for weather_dashboard_jl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f60bd311867a38527e130dfc3818dfab00e74a9a3c77717dec7286ded3a17a6b
MD5 bb14e544ace35ee2bbff3c64a0dc1326
BLAKE2b-256 1c93ca752ac2dc89fcf8c180400487cc40887cce0204c5dabf2549b9807eeeb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page