Textual TUI for viewing weather via Open-Meteo
Project description
wevva
wevva is a weather TUI built with Textual and powered by Open-Meteo.
Highlights
- Place search using Open-Meteo geocoding
- Current, hourly, and daily forecasts with detailed weather parameters and keyboard navigation
- Active weather alerts (normalized provider data)
- Unit preferences (temperature, wind, precipitation)
- Theme toggle and optional emoji rendering
- Interactive setup wizard for defaults
- Reusable Python API (async + sync helpers)
[!NOTE]
- 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.
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
[!TIP] 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 (picks first geocoding match, might not be what you expect!)
uvx wevva --location "Edinburgh"
# One-run overrides
uvx wevva --theme dracula --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
[!WARNING]
- Emoji rendering support varies depending on terminal support and is disabled by default. Enable it with
--emoji(or viawevva setup).- Colour support also varies. Try
export COLORTERM=truecolorif colours display strangely.
Weather Alerts
- Weather alerts are using my
wevva-warningslibrary.- Because we fetch all alerts for the searched location's country, then filter them by the forecast location coordinates, this may take a minute or two if there are many active alerts in the country.
- Where a provider includes an official alert URL,
wevvashows it directly on the alert card so you can jump out to the source document. - We use the latitude and longitude coordinates of the forecast location in combination with the warning provider-issued polygon data. Some countries/providers don't issue polygon data, so we are unable to show alerts for those locations.
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)
Fetch alerts by coordinates:
from wevva import alerts_by_coordinates_sync
alerts = alerts_by_coordinates_sync(lat=39.7456, lon=-97.0892, country_code="US")
for alert in alerts:
print(alert.event, alert.severity, alert.expires)
In-App Keys
ssearch for placerrefresh weatheruopen unit settingshor?open helpccreditsqquit
Config
Preferences are stored at:
~/.config/wevva/config.json
Saved settings include:
- units
- theme
- emoji preference
- default location (and cached resolved location metadata)
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 wevva-0.3.0.tar.gz.
File metadata
- Download URL: wevva-0.3.0.tar.gz
- Upload date:
- Size: 58.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
983b4266d2820f47e9a6282bba0ee88bd6a33fd65a9486eeda8d5be1e5f348f7
|
|
| MD5 |
8a63e9f18bc8b8455e05aff4471a6ed8
|
|
| BLAKE2b-256 |
3658a1dcb7c0c293723a178778c9ac1bd7580c869514d0fc886efbdfbf360f4e
|
File details
Details for the file wevva-0.3.0-py3-none-any.whl.
File metadata
- Download URL: wevva-0.3.0-py3-none-any.whl
- Upload date:
- Size: 79.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425f87595c7eba01e33889fadcc2f158769307b027b5560a121de98a93a1463a
|
|
| MD5 |
62ab57cd925c314efece8592664cfe1f
|
|
| BLAKE2b-256 |
391aae38b9a7f376823f7b5317e26ba1db45491add83bd41ba290f9994518c51
|