Metadata-Version: 2.4
Name: weather-tui
Version: 1.4.0
Summary: A TUI application for displaying weather forecasts with hour-by-hour graphs
Project-URL: Homepage, https://github.com/benedikt-mayer/weather-tui
Project-URL: Repository, https://github.com/benedikt-mayer/weather-tui
Project-URL: Issues, https://github.com/benedikt-mayer/weather-tui/issues
Author-email: Benedikt Mayer <benedikt_mayer@outlook.de>
License: MIT
License-File: LICENSE
Keywords: forecast,terminal,textual,tui,weather
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27.0
Requires-Dist: numpy>=2.4.0
Requires-Dist: openmeteo-requests>=1.2.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: textual-plotext>=1.0.1
Requires-Dist: textual>=0.47.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Requires-Dist: textual-dev>=1.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# Weather TUI

A terminal user interface for displaying weather forecasts with hour-by-hour graphs and multi-day forecasts.

![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
[![CI](https://github.com/benedikt-mayer/weather-tui/actions/workflows/ci.yml/badge.svg)](https://github.com/benedikt-mayer/weather-tui/actions/workflows/ci.yml)

## Features

- Current weather conditions with temperature
- Hourly temperature and precipitation graphs
- 7-day weather forecast with clickable day selection
- Location search powered by OpenWeatherMap Geocoding
- Keyboard-friendly navigation

## Installation

### Using uvx (recommended, no install needed)

```bash
# Run directly without installing
uvx --with weather-tui python -m weather_tui
```

### From PyPI

```bash
pip install weather-tui
```

### From source

```bash
# Clone the repository
git clone https://github.com/benedikt-mayer/weather-tui.git
cd weather-tui

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .
```

## Usage

```bash
# If installed via pip
python -m weather_tui
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `OPENWEATHERMAP_API_KEY` | Yes | API key for geocoding. Get a free key at [OpenWeatherMap](https://openweathermap.org/api) |

Create a `.env` file in your working directory:

```bash
OPENWEATHERMAP_API_KEY=your_api_key_here
```

## Keyboard Shortcuts

| Key | Action |
|-----|--------|
| `s` | Search for a new location |
| `r` | Refresh weather data |
| `q` | Quit |
| `Escape` | Cancel search |
| Click | Select a day to view its hourly forecast |

## Development

```bash
# Install dev dependencies
uv sync --extra dev

# Run tests
uv run pytest

# Run linting
uv run ruff check .
uv run ruff format --check .

# Fix linting issues
uv run ruff check --fix .
uv run ruff format .
```

## Tech Stack

- [Textual](https://github.com/Textualize/textual) - TUI framework
- [textual-plotext](https://github.com/Textualize/textual-plotext) - Terminal plotting
- [Open-Meteo](https://open-meteo.com/) - Weather data API (no key required)
- [OpenWeatherMap Geocoding](https://openweathermap.org/api/geocoding-api) - Location search

## License

MIT License - see [LICENSE](LICENSE) for details.
