Skip to content

Basic usage

Entry point

All functionality is exposed through the rain program (see [project.scripts] in pyproject.toml). It is a Cyclopts application.

Global behaviour

  • rain --help — list subcommands
  • rain --version — package version
  • Most subcommands accept --db-dir (default: current directory). The database filename is always MyWeather.sqlite under that path.

Subcommands at a glance

Command Purpose
rain add Insert a daily total (mm). Optional --date, --back-fill.
rain change Update an existing day’s total.
rain graph Bar chart of rainfall totals (terminal).
rain rainy-days Bar chart of rainy-day counts per period (not mm).
rain weewx-import Copy daily rain from WeeWX SQLite into MyWeather.sqlite.

Time buckets

Daily rows use a 24-hour window ending at 09:00 local time on the recorded calendar day. See Data model.

Further reading