Skip to content

pywttr

Typed Python client for the wttr.in weather API. For asyncio, use aiopywttr.

Installation

uv add pywttr pywttr-models
pip install -U pywttr pywttr-models

pywttr-models holds the response models and gets its own releases when wttr.in changes its responses. Naming it keeps pip install -U upgrading it along with pywttr.

Quick start

import pywttr

with pywttr.Wttr() as wttr:
    weather = wttr.weather("Paris")

now = weather.current_condition[0]
print(f"{now.temp_c} °C, {now.weather_desc[0].value}")

Next steps

  • Guide: current weather, forecasts, languages, timeouts, errors.
  • API reference: every class and method, and the response fields shared by all languages.