Skip to main content

Access weather and climate data through the terminal.

Project description

PyPI Version Issues MIT License


Meteostat Logo

Meteostat CLI

Access weather and climate data through the terminal.

Explore the docs »

Visit Website · Report Bug · Request Feature

📚 Installation

uv tool install meteostat-cli

For plotting capabilities (png and svg output), install the plot extra:

uv tool install "meteostat-cli[plot]"

Alternatively, you can use uvx:

uvx --from meteostat-cli meteo

🚀 Usage

Get daily weather data for a station

meteo daily 10637 --start 2024-01-01 --end 2024-12-31

Get hourly data by coordinates (with interpolation)

meteo hourly 50.1109,8.6821 --start 2024-01-01 --end 2024-01-07

Export data to a file

meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output data.json

Plot temperature data

meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output chart.png

📖 Commands

meteo station — Browse weather stations

meteo station 10637                        # Metadata for a specific station
meteo station --country DE                 # List stations by country
meteo station --country DE --state HE      # Filter by country and state
meteo station --name "Frankfurt"           # Search by name
Option Short Description
--country -c ISO 3166-1 alpha-2 country code
--state State or region code
--name -n Station name (partial match)
--wmo -w WMO station ID
--icao -i ICAO station ID
--iata IATA station ID
--national -N National station ID
--bbox Bounding box (lon_min,lat_min,lon_max,lat_max)
--sql Arbitrary SQL query
--format -f Output format: csv, json, xlsx, parquet
--output -o Output file path (defaults to stdout)
--no-header Omit CSV header row
--all -A Print full table without truncation

meteo nearby — Find stations near a location

meteo nearby 50.1109 8.6821                        # Nearest stations (default: 5 within 5 km)
meteo nearby 50.1109 8.6821 --limit 10             # Return up to 10 stations
meteo nearby 50.1109 8.6821 --radius 20000         # Search within 20 km
meteo nearby 50.1109 8.6821 --format json          # JSON output
Option Short Description
--limit -l Maximum number of stations (default: 5)
--radius -r Search radius in meters (default: 5000)
--format -f Output format: csv, json, xlsx, parquet
--output -o Output file path (defaults to stdout)
--no-header Omit CSV header row
--all -A Print full table without truncation

meteo inventory — Check data availability

meteo inventory 10637
meteo inventory 10637 --granularity daily --parameters tavg,tmin,tmax
Option Short Description
--granularity -g Filter by granularity: hourly/h, daily/d, monthly/m
--parameters -p Comma-separated parameters (e.g. tavg,tmin,tmax)
--providers -P Comma-separated data providers
--format -f Output format: csv, json, xlsx, parquet
--output -o Output file path (defaults to stdout)
--no-header Omit CSV header row
--all -A Print full table without truncation

meteo hourly — Hourly weather data

meteo hourly 10637 --start 2024-01-01 --end 2024-01-31
meteo h 10637 -s 2024-01-01 -e 2024-01-31                    # Short form
meteo hourly 10637 10635 -s 2024-01-01 -e 2024-01-31         # Multiple stations
meteo hourly 10637 --agg max -s 2024-01-01 -e 2024-01-31     # Aggregate by station and time

See Common options below. Hourly also supports --timezone/-t (e.g. Europe/Berlin).

meteo daily — Daily weather data

meteo daily 10637 --start 2024-01-01 --end 2024-12-31
meteo d 10637 -s 2024-01-01 -e 2024-12-31    # Short form

See Common options below.

meteo monthly — Monthly weather data

meteo monthly 10637 --start 2020 --end 2024
meteo m 10637 -s 2020 -e 2024               # Short form

See Common options below.

meteo normals — Climate normals

meteo normals 10637 --start 1991 --end 2020
meteo n 10637 -s 1991 -e 2020               # Short form

See Common options below.

Common options (hourly / daily / monthly / normals)

Option Short Description
--start -s Start date (YYYY-MM-DD, YYYY-MM, YYYY)
--end -e End date (same formats)
--parameters -p Comma-separated parameters (e.g. tavg,tmin,tmax,prcp)
--providers -P Comma-separated data providers
--format -f Output format: csv, json, xlsx, parquet, png, svg
--output -o Output file path (defaults to stdout)
--timezone -t Timezone for timestamps (e.g. Europe/Berlin) — hourly only
--with-sources -S Include data source column in output
--no-models Exclude model data (e.g. MOSMIX)
--no-header Omit CSV header row
--no-cache Disable result caching
--all -A Print full table without truncation
--agg Aggregation function: mean, sum, min, max

meteo config — Manage configuration

meteo config --list                        # List all settings
meteo config cache_enable false            # Set a value
meteo config interpolation_radius 25000

Configuration is stored in cli.yml under typer.get_app_dir("meteostat").

Shell completion

meteo --install-completion   # Bash, Zsh, Fish, PowerShell

🤝 Contributing

Please read our contributing guidelines for details on how to contribute to Meteostat.

📄 License

The Meteostat CLI is licensed under the MIT License. Data provided by Meteostat is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). See the documentation for details.

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

meteostat_cli-0.2.0.tar.gz (109.5 kB view details)

Uploaded Source

Built Distribution

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

meteostat_cli-0.2.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file meteostat_cli-0.2.0.tar.gz.

File metadata

  • Download URL: meteostat_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 109.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meteostat_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ded1fd59f36d7963c6decb34584a50201f573d874e4d24293e0e7ad4d9c1c2cd
MD5 6131d15a5419d905a5339d40712af2f4
BLAKE2b-256 6c109e04439afda209c94dc5dcd3a1c331e06a7351682e1121e85595f528cac2

See more details on using hashes here.

Provenance

The following attestation bundles were made for meteostat_cli-0.2.0.tar.gz:

Publisher: publish.yml on meteostat/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meteostat_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: meteostat_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for meteostat_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66265221cb02e0b26c88fc26818346f1abf908c35e987ab5661e8a4e7f22d479
MD5 bae8003d24c1b943471f5928fcb439a3
BLAKE2b-256 f5859d98082d9ebabb0f0a004187f367883c9ef19daa45ae1254124e29cb2ddb

See more details on using hashes here.

Provenance

The following attestation bundles were made for meteostat_cli-0.2.0-py3-none-any.whl:

Publisher: publish.yml on meteostat/cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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