Skip to main content

Textual TUI for viewing weather via Open-Meteo

Project description

wevva

wevva is a weather TUI built with Textual and powered by Open-Meteo.

wevva weather TUI screenshot

Highlights

  • Place search using Open-Meteo geocoding
  • Current, hourly, and daily forecasts with detailed weather parameters and keyboard navigation
  • Unit preferences (temperature, wind, precipitation)
  • Theme and emoji toggles
  • Interactive setup wizard for defaults
  • Reusable Python API (async + sync helpers)

Quick Start

First, install uv:

curl -Ls https://astral.sh/uv/install.sh | sh

Then, using uvx, run wevva:

uvx wevva

to launch the app without cloning the repo. This will install wevva as a package in a temporary environment and run it from there.

Alternatively, you can clone the repo and run from the local source:

uvx --from . wevva

Requires Python >=3.12.

First-Time Setup

Run the setup wizard to save defaults:

uvx wevva setup

Save settings without launching:

uvx wevva setup --no-launch

Useful Commands

# Start normally (uses saved defaults)
uvx wevva

# Start directly at a location
uvx wevva --location "Edinburgh"

# One-run overrides
uvx wevva --theme dracula --no-emoji
uvx wevva --temperature-unit fahrenheit --wind-speed-unit mph

# Manage saved default location
uvx wevva --set-default-location "New York"
uvx wevva --clear-default-location

Library Usage

This library is designed to be used as a TUI, but I have also exposed a minimal set of functions for fetching weather data and geocoding that can be used in other Python contexts. These are available as both async and sync versions, depending on your needs.

Install as a package:

uv add wevva

Simple sync usage (nice for scripts):

from wevva import forecast_by_place_sync

bundle = forecast_by_place_sync("Edinburgh")
print(bundle.metadata.name, bundle.metadata.country)
print(bundle.current.get_temperature(), bundle.current.forecast_units.get("temperature_2m"))

Async usage (best for apps/services):

import asyncio
from wevva import forecast_by_coordinates

async def main() -> None:
    bundle = await forecast_by_coordinates(lat=55.9533, lon=-3.1883)
    print(bundle.daily.get_temperature_max(0))
    print(bundle.hourly.get_condition_abbreviation(0))

asyncio.run(main())

You can also geocode from Python:

from wevva import geocode_sync

matches = geocode_sync("Glasgow", count=3)
for match in matches:
    print(match.name, match.country, match.latitude, match.longitude)

In-App Keys

  • s search for place
  • r refresh weather
  • u open unit settings
  • h or ? open help
  • c credits
  • q quit

Config

Preferences are stored at:

~/.config/wevva/config.json

Saved settings include:

  • units
  • theme
  • emoji preference
  • default location (and cached resolved location metadata)

Notes

  • Emoji rendering support varies by terminal/font/locale.
  • TUI is the primary focus, but a lightweight Python API is now exported too.

Known Issues

  • Layout not super flexible, requires a terminal size of at least 100x43 for all elements to show fully.
  • Temperature colour scaling is using the Met Office scale, the colours of which may not play nicely with all themes as they get towards the more extreme ends of the scale.

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

wevva-0.1.0.tar.gz (53.7 kB view details)

Uploaded Source

Built Distribution

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

wevva-0.1.0-py3-none-any.whl (74.0 kB view details)

Uploaded Python 3

File details

Details for the file wevva-0.1.0.tar.gz.

File metadata

  • Download URL: wevva-0.1.0.tar.gz
  • Upload date:
  • Size: 53.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.6

File hashes

Hashes for wevva-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00e321aca4c8e3c3074a6a08aa4ea72beaba27c53b72b2dce2cb9516e2af3451
MD5 0d6db815b44df738749460a7adaae410
BLAKE2b-256 868ec6cdb57b65aaea0b4eff68d781ed505293bf11b04fe4286c52c19e53da40

See more details on using hashes here.

File details

Details for the file wevva-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wevva-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 74.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.6

File hashes

Hashes for wevva-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 210655721428ba9ba5b756ecfccb3e917c314055a67ebce9be8605494fda800b
MD5 2fa23ffca2a488b585cf46d2c5402ee9
BLAKE2b-256 d6667035a8eada8d17c0965cbe96129bb0fe91ee010c246c59e79ae0d347a6d5

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