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

pip install --user meteostat-cli

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

pip install --user meteostat-cli[plot]

🚀 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.1.0.tar.gz (108.0 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.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for meteostat_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8893ca3a77a3786a7095612ac4420b3641a38f731da4e8388a283cb052b91397
MD5 eaf5c921fd838c58ccaaacd3301ddf69
BLAKE2b-256 8981c45d7036c6fa1ab1e78eddac222a4ecece28af2d6cdbf6db3e8cd240d127

See more details on using hashes here.

Provenance

The following attestation bundles were made for meteostat_cli-0.1.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.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for meteostat_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e81668460996f30fd20e20863edc7d82282c1c5771506e1bc4c4d4f5235559f
MD5 8adcc8d8887bbc1517ccbfd2a1d17f92
BLAKE2b-256 a971537a9315212241f5641d41b3be44a1bf96db41c56bc39c0d9936d5d5b8df

See more details on using hashes here.

Provenance

The following attestation bundles were made for meteostat_cli-0.1.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