meteostat-cli 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meteostat_cli-0.3.0/.claude/skills/meteo/SKILL.md +22 -0
- meteostat_cli-0.3.0/PKG-INFO +122 -0
- meteostat_cli-0.3.0/README.md +95 -0
- meteostat_cli-0.3.0/demo.gif +0 -0
- meteostat_cli-0.3.0/demo.yml +266 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/__init__.py +1 -1
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/cli.py +0 -1
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/nearby.py +18 -9
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/config.py +1 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/plotting.py +1 -1
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/utils.py +18 -3
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/pyproject.toml +2 -2
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/test_cli.py +0 -6
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/test_commands.py +6 -7
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/uv.lock +4 -4
- meteostat_cli-0.1.0/PKG-INFO +0 -249
- meteostat_cli-0.1.0/README.md +0 -221
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/.github/workflows/lint.yml +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/.github/workflows/publish.yml +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/.github/workflows/test.yml +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/.gitignore +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/LICENSE +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/__init__.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/config.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/daily.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/hourly.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/inventory.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/monthly.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/normals.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/meteo/commands/station.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/__init__.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/conftest.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/test_config.py +0 -0
- {meteostat_cli-0.1.0 → meteostat_cli-0.3.0}/tests/test_utils.py +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: meteo
|
|
3
|
+
description: Access weather and climate data for thousands of weather stations and any place worldwide.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Meteo
|
|
7
|
+
|
|
8
|
+
## Commands
|
|
9
|
+
|
|
10
|
+
Meteo is a CLI tool, run `meteo --help` to see a list of all available commands and options.
|
|
11
|
+
|
|
12
|
+
## Gotchas
|
|
13
|
+
|
|
14
|
+
- If the `meteo` command is not found, use uvx: `uvx meteostat-cli [YOUR_COMMAND]`
|
|
15
|
+
- `meteo nearby` requires numeric `LAT,LON` argument — city names are not accepted; use coordinates directly
|
|
16
|
+
- When looking for stations that match the elevation of a place, use `meteo nearby` without a radius and filter results by elevation
|
|
17
|
+
- Pass multiple station IDs in one call instead of looping: `meteo daily D1424 EDEV0 10635 --start 2025 --end 2025`
|
|
18
|
+
- Fetch only the columns you need with `--parameters` to eliminate post-processing: `--parameters tmax` or `--parameters tmax,prcp`
|
|
19
|
+
- Aggregate all rows with `--agg` (Pandas `.agg()`): `--agg max`, `--agg mean`, `--agg sum`
|
|
20
|
+
- `--start` and `--end` accept YYYY-MM-DD, YYYY-MM, YYYY
|
|
21
|
+
- Machine-readable output for piping: `--format json` or `--format csv`
|
|
22
|
+
- To get the date of extreme values, fetch the parameter without aggregation and filter with `sort` after fetching: `meteo daily D1424 --start 2025-01-01 --end 2025-12-31 --parameters tmax -f csv | awk -F',' 'NR>1' | sort -t',' -k3 -rn | head -1`
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meteostat-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Access weather and climate data through the terminal.
|
|
5
|
+
Project-URL: Homepage, https://github.com/meteostat/cli
|
|
6
|
+
Project-URL: Repository, https://github.com/meteostat/cli
|
|
7
|
+
Project-URL: Issues, https://github.com/meteostat/cli/issues
|
|
8
|
+
Author-email: Meteostat <info@meteostat.net>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cli,climate,meteostat,weather
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: meteostat<3,>=2.1.4
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: typer>=0.15.0
|
|
24
|
+
Provides-Extra: plot
|
|
25
|
+
Requires-Dist: matplotlib>=3.9.0; extra == 'plot'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
<!-- PROJECT SHIELDS -->
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
[![PyPI Version][pypi-shield]][pypi-url]
|
|
32
|
+
[![Issues][issues-shield]][issues-url]
|
|
33
|
+
[![MIT License][license-shield]][license-url]
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- PROJECT LOGO -->
|
|
38
|
+
<br />
|
|
39
|
+
<div align="center">
|
|
40
|
+
<a href="https://github.com/meteostat/cli">
|
|
41
|
+
<img src="https://media.meteostat.net/icon.svg" alt="Meteostat Logo" width="80" height="80">
|
|
42
|
+
</a>
|
|
43
|
+
|
|
44
|
+
<h3 align="center">Meteostat CLI</h3>
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
Access weather and climate data through the terminal.
|
|
48
|
+
<p>
|
|
49
|
+
<a href="https://dev.meteostat.net/cli"><strong>Explore the docs »</strong></a>
|
|
50
|
+
</p>
|
|
51
|
+
<p>
|
|
52
|
+
<a href="https://meteostat.net">Visit Website</a>
|
|
53
|
+
·
|
|
54
|
+
<a href="https://github.com/meteostat/cli/issues">Report Bug</a>
|
|
55
|
+
·
|
|
56
|
+
<a href="https://github.com/orgs/meteostat/discussions">Request Feature</a>
|
|
57
|
+
</p>
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
## 📚 Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
uv tool install meteostat-cli
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For plotting capabilities (`png` and `svg` output), install the `plot` extra:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv tool install "meteostat-cli[plot]"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Alternatively, you can use `uvx`:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
uvx meteostat-cli [YOUR_COMMAND]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### ⚡ Shell Completion
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
meteo --install-completion # Bash, Zsh, Fish, PowerShell
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 🚀 Usage
|
|
88
|
+
|
|
89
|
+
Want to know the hottest temperature of 2024 at Frankfurt Airport (station `10637`)? Run the following command:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 -p tmax --agg max
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This will yield the following output:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
tmax
|
|
99
|
+
station
|
|
100
|
+
10637 35.9
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 📖 Documentation
|
|
104
|
+
|
|
105
|
+
Please refer to the [official documentation](https://dev.meteostat.net/cli) for detailed usage instructions and examples.
|
|
106
|
+
|
|
107
|
+
## 🤝 Contributing
|
|
108
|
+
|
|
109
|
+
Please read our [contributing guidelines](https://dev.meteostat.net/contributing) for details on how to contribute to Meteostat.
|
|
110
|
+
|
|
111
|
+
## 📄 License
|
|
112
|
+
|
|
113
|
+
The Meteostat CLI is licensed under the [**MIT License**](https://github.com/meteostat/cli/blob/main/LICENSE). Data provided by Meteostat is licensed under [**Creative Commons Attribution 4.0 International (CC BY 4.0)**](https://creativecommons.org/licenses/by/4.0). See the [documentation](https://dev.meteostat.net/license) for details.
|
|
114
|
+
|
|
115
|
+
<!-- MARKDOWN LINKS & IMAGES -->
|
|
116
|
+
|
|
117
|
+
[pypi-shield]: https://img.shields.io/pypi/v/meteostat-cli
|
|
118
|
+
[pypi-url]: https://pypi.org/project/meteostat-cli/
|
|
119
|
+
[issues-shield]: https://img.shields.io/github/issues/meteostat/cli.svg
|
|
120
|
+
[issues-url]: https://github.com/meteostat/cli/issues
|
|
121
|
+
[license-shield]: https://img.shields.io/github/license/meteostat/cli.svg
|
|
122
|
+
[license-url]: https://github.com/meteostat/cli/blob/main/LICENSE
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!-- PROJECT SHIELDS -->
|
|
2
|
+
<div align="center">
|
|
3
|
+
|
|
4
|
+
[![PyPI Version][pypi-shield]][pypi-url]
|
|
5
|
+
[![Issues][issues-shield]][issues-url]
|
|
6
|
+
[![MIT License][license-shield]][license-url]
|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<!-- PROJECT LOGO -->
|
|
11
|
+
<br />
|
|
12
|
+
<div align="center">
|
|
13
|
+
<a href="https://github.com/meteostat/cli">
|
|
14
|
+
<img src="https://media.meteostat.net/icon.svg" alt="Meteostat Logo" width="80" height="80">
|
|
15
|
+
</a>
|
|
16
|
+
|
|
17
|
+
<h3 align="center">Meteostat CLI</h3>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
Access weather and climate data through the terminal.
|
|
21
|
+
<p>
|
|
22
|
+
<a href="https://dev.meteostat.net/cli"><strong>Explore the docs »</strong></a>
|
|
23
|
+
</p>
|
|
24
|
+
<p>
|
|
25
|
+
<a href="https://meteostat.net">Visit Website</a>
|
|
26
|
+
·
|
|
27
|
+
<a href="https://github.com/meteostat/cli/issues">Report Bug</a>
|
|
28
|
+
·
|
|
29
|
+
<a href="https://github.com/orgs/meteostat/discussions">Request Feature</a>
|
|
30
|
+
</p>
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
## 📚 Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv tool install meteostat-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For plotting capabilities (`png` and `svg` output), install the `plot` extra:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv tool install "meteostat-cli[plot]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Alternatively, you can use `uvx`:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uvx meteostat-cli [YOUR_COMMAND]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### ⚡ Shell Completion
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
meteo --install-completion # Bash, Zsh, Fish, PowerShell
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 🚀 Usage
|
|
61
|
+
|
|
62
|
+
Want to know the hottest temperature of 2024 at Frankfurt Airport (station `10637`)? Run the following command:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 -p tmax --agg max
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This will yield the following output:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
tmax
|
|
72
|
+
station
|
|
73
|
+
10637 35.9
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 📖 Documentation
|
|
77
|
+
|
|
78
|
+
Please refer to the [official documentation](https://dev.meteostat.net/cli) for detailed usage instructions and examples.
|
|
79
|
+
|
|
80
|
+
## 🤝 Contributing
|
|
81
|
+
|
|
82
|
+
Please read our [contributing guidelines](https://dev.meteostat.net/contributing) for details on how to contribute to Meteostat.
|
|
83
|
+
|
|
84
|
+
## 📄 License
|
|
85
|
+
|
|
86
|
+
The Meteostat CLI is licensed under the [**MIT License**](https://github.com/meteostat/cli/blob/main/LICENSE). Data provided by Meteostat is licensed under [**Creative Commons Attribution 4.0 International (CC BY 4.0)**](https://creativecommons.org/licenses/by/4.0). See the [documentation](https://dev.meteostat.net/license) for details.
|
|
87
|
+
|
|
88
|
+
<!-- MARKDOWN LINKS & IMAGES -->
|
|
89
|
+
|
|
90
|
+
[pypi-shield]: https://img.shields.io/pypi/v/meteostat-cli
|
|
91
|
+
[pypi-url]: https://pypi.org/project/meteostat-cli/
|
|
92
|
+
[issues-shield]: https://img.shields.io/github/issues/meteostat/cli.svg
|
|
93
|
+
[issues-url]: https://github.com/meteostat/cli/issues
|
|
94
|
+
[license-shield]: https://img.shields.io/github/license/meteostat/cli.svg
|
|
95
|
+
[license-url]: https://github.com/meteostat/cli/blob/main/LICENSE
|
|
Binary file
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# The configurations that used for the recording, feel free to edit them
|
|
2
|
+
config:
|
|
3
|
+
|
|
4
|
+
# Specify a command to be executed
|
|
5
|
+
# like `/bin/bash -l`, `ls`, or any other commands
|
|
6
|
+
# the default is bash for Linux
|
|
7
|
+
# or powershell.exe for Windows
|
|
8
|
+
command: bash -l
|
|
9
|
+
|
|
10
|
+
# Specify the current working directory path
|
|
11
|
+
# the default is the current working directory path
|
|
12
|
+
cwd: /Users/chris/Meteostat/cli
|
|
13
|
+
|
|
14
|
+
# Export additional ENV variables
|
|
15
|
+
env:
|
|
16
|
+
recording: true
|
|
17
|
+
|
|
18
|
+
# Explicitly set the number of columns
|
|
19
|
+
# or use `auto` to take the current
|
|
20
|
+
# number of columns of your shell
|
|
21
|
+
cols: 120
|
|
22
|
+
|
|
23
|
+
# Explicitly set the number of rows
|
|
24
|
+
# or use `auto` to take the current
|
|
25
|
+
# number of rows of your shell
|
|
26
|
+
rows: 20
|
|
27
|
+
|
|
28
|
+
# Amount of times to repeat GIF
|
|
29
|
+
# If value is -1, play once
|
|
30
|
+
# If value is 0, loop indefinitely
|
|
31
|
+
# If value is a positive number, loop n times
|
|
32
|
+
repeat: -1
|
|
33
|
+
|
|
34
|
+
# Quality
|
|
35
|
+
# 1 - 100
|
|
36
|
+
quality: 100
|
|
37
|
+
|
|
38
|
+
# Delay between frames in ms
|
|
39
|
+
# If the value is `auto` use the actual recording delays
|
|
40
|
+
frameDelay: auto
|
|
41
|
+
|
|
42
|
+
# Maximum delay between frames in ms
|
|
43
|
+
# Ignored if the `frameDelay` isn't set to `auto`
|
|
44
|
+
# Set to `auto` to prevent limiting the max idle time
|
|
45
|
+
maxIdleTime: 2000
|
|
46
|
+
|
|
47
|
+
# The surrounding frame box
|
|
48
|
+
# The `type` can be null, window, floating, or solid`
|
|
49
|
+
# To hide the title use the value null
|
|
50
|
+
# Don't forget to add a backgroundColor style with a null as type
|
|
51
|
+
frameBox:
|
|
52
|
+
type: null
|
|
53
|
+
title: Meteostat
|
|
54
|
+
style:
|
|
55
|
+
border: 0px black solid
|
|
56
|
+
backgroundColor: "#1D1D1D"
|
|
57
|
+
# boxShadow: none
|
|
58
|
+
padding: 10px
|
|
59
|
+
|
|
60
|
+
# Add a watermark image to the rendered gif
|
|
61
|
+
# You need to specify an absolute path for
|
|
62
|
+
# the image on your machine or a URL, and you can also
|
|
63
|
+
# add your own CSS styles
|
|
64
|
+
watermark:
|
|
65
|
+
imagePath: null
|
|
66
|
+
style:
|
|
67
|
+
position: absolute
|
|
68
|
+
right: 15px
|
|
69
|
+
bottom: 15px
|
|
70
|
+
width: 100px
|
|
71
|
+
opacity: 0.9
|
|
72
|
+
|
|
73
|
+
# Cursor style can be one of
|
|
74
|
+
# `block`, `underline`, or `bar`
|
|
75
|
+
cursorStyle: block
|
|
76
|
+
|
|
77
|
+
# Font family
|
|
78
|
+
# You can use any font that is installed on your machine
|
|
79
|
+
# in CSS-like syntax
|
|
80
|
+
fontFamily: "Monaco, Lucida Console, Ubuntu Mono, Monospace"
|
|
81
|
+
|
|
82
|
+
# The size of the font
|
|
83
|
+
fontSize: 14
|
|
84
|
+
|
|
85
|
+
# The height of lines
|
|
86
|
+
lineHeight: 1
|
|
87
|
+
|
|
88
|
+
# The spacing between letters
|
|
89
|
+
letterSpacing: 0
|
|
90
|
+
|
|
91
|
+
# Theme
|
|
92
|
+
theme:
|
|
93
|
+
background: "transparent"
|
|
94
|
+
foreground: "#afafaf"
|
|
95
|
+
cursor: "#c7c7c7"
|
|
96
|
+
black: "#232628"
|
|
97
|
+
red: "#fc4384"
|
|
98
|
+
green: "#b3e33b"
|
|
99
|
+
yellow: "#ffa727"
|
|
100
|
+
blue: "#75dff2"
|
|
101
|
+
magenta: "#ae89fe"
|
|
102
|
+
cyan: "#708387"
|
|
103
|
+
white: "#d5d5d0"
|
|
104
|
+
brightBlack: "#626566"
|
|
105
|
+
brightRed: "#ff7fac"
|
|
106
|
+
brightGreen: "#c8ed71"
|
|
107
|
+
brightYellow: "#ebdf86"
|
|
108
|
+
brightBlue: "#75dff2"
|
|
109
|
+
brightMagenta: "#ae89fe"
|
|
110
|
+
brightCyan: "#b1c6ca"
|
|
111
|
+
brightWhite: "#f9f9f4"
|
|
112
|
+
|
|
113
|
+
# Records, feel free to edit them
|
|
114
|
+
records:
|
|
115
|
+
- delay: 151
|
|
116
|
+
content: "$ "
|
|
117
|
+
- delay: 200
|
|
118
|
+
content: m
|
|
119
|
+
- delay: 220
|
|
120
|
+
content: e
|
|
121
|
+
- delay: 103
|
|
122
|
+
content: t
|
|
123
|
+
- delay: 100
|
|
124
|
+
content: e
|
|
125
|
+
- delay: 200
|
|
126
|
+
content: o
|
|
127
|
+
- delay: 167
|
|
128
|
+
content: ' '
|
|
129
|
+
- delay: 100
|
|
130
|
+
content: 'n'
|
|
131
|
+
- delay: 150
|
|
132
|
+
content: e
|
|
133
|
+
- delay: 90
|
|
134
|
+
content: a
|
|
135
|
+
- delay: 200
|
|
136
|
+
content: r
|
|
137
|
+
- delay: 150
|
|
138
|
+
content: b
|
|
139
|
+
- delay: 140
|
|
140
|
+
content: 'y'
|
|
141
|
+
- delay: 110
|
|
142
|
+
content: ' '
|
|
143
|
+
- delay: 200
|
|
144
|
+
content: '5'
|
|
145
|
+
- delay: 170
|
|
146
|
+
content: '0'
|
|
147
|
+
- delay: 100
|
|
148
|
+
content: ','
|
|
149
|
+
- delay: 200
|
|
150
|
+
content: '8'
|
|
151
|
+
- delay: 138
|
|
152
|
+
content: .
|
|
153
|
+
- delay: 209
|
|
154
|
+
content: '6'
|
|
155
|
+
- delay: 200
|
|
156
|
+
content: "\r\n"
|
|
157
|
+
- delay: 103
|
|
158
|
+
content: " name country region latitude longitude elevation timezone distance\r\nid \r\nEDFE0 Egelsbach / Erzhausen DE HE 49.9620 8.6447 117 Europe/Berlin 5298.1\r\n10637 Frankfurt Airport DE HE 50.0500 8.6000 111 Europe/Berlin 5559.7\r\nD4090 Raunheim DE HE 50.0056 8.4291 89 Europe/Berlin 12230.2\r\nD0917 Darmstadt DE HE 49.8809 8.6779 162 Europe/Berlin 14368.8\r\nD1424 Frankfurt Westend DE HE 50.1269 8.6694 124 Europe/Berlin 14954.9\r\n"
|
|
159
|
+
- delay: 38
|
|
160
|
+
content: "$ "
|
|
161
|
+
- delay: 1011
|
|
162
|
+
content: m
|
|
163
|
+
- delay: 168
|
|
164
|
+
content: e
|
|
165
|
+
- delay: 137
|
|
166
|
+
content: t
|
|
167
|
+
- delay: 100
|
|
168
|
+
content: e
|
|
169
|
+
- delay: 200
|
|
170
|
+
content: o
|
|
171
|
+
- delay: 100
|
|
172
|
+
content: ' '
|
|
173
|
+
- delay: 200
|
|
174
|
+
content: d
|
|
175
|
+
- delay: 90
|
|
176
|
+
content: a
|
|
177
|
+
- delay: 200
|
|
178
|
+
content: i
|
|
179
|
+
- delay: 109
|
|
180
|
+
content: l
|
|
181
|
+
- delay: 200
|
|
182
|
+
content: 'y'
|
|
183
|
+
- delay: 123
|
|
184
|
+
content: ' '
|
|
185
|
+
- delay: 200
|
|
186
|
+
content: '1'
|
|
187
|
+
- delay: 200
|
|
188
|
+
content: '0'
|
|
189
|
+
- delay: 188
|
|
190
|
+
content: '6'
|
|
191
|
+
- delay: 150
|
|
192
|
+
content: '3'
|
|
193
|
+
- delay: 174
|
|
194
|
+
content: '7'
|
|
195
|
+
- delay: 145
|
|
196
|
+
content: ' '
|
|
197
|
+
- delay: 200
|
|
198
|
+
content: '-'
|
|
199
|
+
- delay: 130
|
|
200
|
+
content: '-'
|
|
201
|
+
- delay: 200
|
|
202
|
+
content: s
|
|
203
|
+
- delay: 150
|
|
204
|
+
content: t
|
|
205
|
+
- delay: 158
|
|
206
|
+
content: a
|
|
207
|
+
- delay: 142
|
|
208
|
+
content: r
|
|
209
|
+
- delay: 90
|
|
210
|
+
content: t
|
|
211
|
+
- delay: 130
|
|
212
|
+
content: ' '
|
|
213
|
+
- delay: 200
|
|
214
|
+
content: '2'
|
|
215
|
+
- delay: 150
|
|
216
|
+
content: '0'
|
|
217
|
+
- delay: 140
|
|
218
|
+
content: '2'
|
|
219
|
+
- delay: 200
|
|
220
|
+
content: '0'
|
|
221
|
+
- delay: 171
|
|
222
|
+
content: ' '
|
|
223
|
+
- delay: 200
|
|
224
|
+
content: '-'
|
|
225
|
+
- delay: 88
|
|
226
|
+
content: '-'
|
|
227
|
+
- delay: 130
|
|
228
|
+
content: e
|
|
229
|
+
- delay: 200
|
|
230
|
+
content: 'n'
|
|
231
|
+
- delay: 170
|
|
232
|
+
content: d
|
|
233
|
+
- delay: 100
|
|
234
|
+
content: ' '
|
|
235
|
+
- delay: 200
|
|
236
|
+
content: '2'
|
|
237
|
+
- delay: 200
|
|
238
|
+
content: '0'
|
|
239
|
+
- delay: 150
|
|
240
|
+
content: '2'
|
|
241
|
+
- delay: 90
|
|
242
|
+
content: '5'
|
|
243
|
+
- delay: 119
|
|
244
|
+
content: ' '
|
|
245
|
+
- delay: 200
|
|
246
|
+
content: '-'
|
|
247
|
+
- delay: 124
|
|
248
|
+
content: '-'
|
|
249
|
+
- delay: 200
|
|
250
|
+
content: a
|
|
251
|
+
- delay: 140
|
|
252
|
+
content: g
|
|
253
|
+
- delay: 130
|
|
254
|
+
content: g
|
|
255
|
+
- delay: 150
|
|
256
|
+
content: ' '
|
|
257
|
+
- delay: 130
|
|
258
|
+
content: m
|
|
259
|
+
- delay: 120
|
|
260
|
+
content: a
|
|
261
|
+
- delay: 150
|
|
262
|
+
content: x
|
|
263
|
+
- delay: 250
|
|
264
|
+
content: "\r\n"
|
|
265
|
+
- delay: 733
|
|
266
|
+
content: " temp tmin tmax rhum prcp snwd wspd wpgt pres tsun cldc\r\nstation \r\n10637 30.1 22.6 38.4 100 62.5 60 39.6 126.0 1047.5 942 8\r\n"
|
|
@@ -48,7 +48,6 @@ def _register_commands() -> None:
|
|
|
48
48
|
|
|
49
49
|
app.command("config")(config_cmd)
|
|
50
50
|
app.command("station")(station_cmd)
|
|
51
|
-
app.command("stations")(station_cmd)
|
|
52
51
|
app.command("s", hidden=True)(station_cmd)
|
|
53
52
|
app.command("nearby")(nearby_cmd)
|
|
54
53
|
app.command("inventory")(inventory_cmd)
|
|
@@ -6,10 +6,11 @@ from meteo.utils import detect_format, output_df
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def nearby_cmd(
|
|
9
|
-
|
|
10
|
-
lon: float = typer.Argument(..., help="Longitude."),
|
|
9
|
+
coords: str = typer.Argument(..., help="Coordinates as lat,lon (e.g. 48.1,11.6)."),
|
|
11
10
|
limit: int = typer.Option(5, "--limit", "-l", help="Maximum number of stations."),
|
|
12
|
-
radius: int = typer.Option(
|
|
11
|
+
radius: int | None = typer.Option(
|
|
12
|
+
None, "--radius", "-r", help="Search radius in meters."
|
|
13
|
+
),
|
|
13
14
|
fmt: str | None = typer.Option(
|
|
14
15
|
None, "--format", "-f", help="Output format (csv, json, xlsx, parquet)."
|
|
15
16
|
),
|
|
@@ -24,17 +25,25 @@ def nearby_cmd(
|
|
|
24
25
|
"""Find weather stations near a location."""
|
|
25
26
|
import meteostat as ms
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
raise typer.Exit(2)
|
|
30
|
-
if not (-180 <= lon <= 180):
|
|
28
|
+
parts = coords.split(",", 1)
|
|
29
|
+
if len(parts) != 2:
|
|
31
30
|
typer.echo(
|
|
32
|
-
|
|
31
|
+
"Error: Coordinates must be in lat,lon format (e.g. 48.1,11.6).", err=True
|
|
33
32
|
)
|
|
34
33
|
raise typer.Exit(2)
|
|
34
|
+
try:
|
|
35
|
+
lat = float(parts[0])
|
|
36
|
+
lon = float(parts[1])
|
|
37
|
+
except ValueError:
|
|
38
|
+
typer.echo(f"Error: Invalid coordinates: {coords}", err=True)
|
|
39
|
+
raise typer.Exit(2) from None
|
|
40
|
+
if not (-90 <= lat <= 90):
|
|
41
|
+
raise typer.BadParameter(f"Latitude must be between -90 and 90, got {lat}")
|
|
42
|
+
if not (-180 <= lon <= 180):
|
|
43
|
+
raise typer.BadParameter(f"Longitude must be between -180 and 180, got {lon}")
|
|
35
44
|
|
|
36
45
|
point = ms.Point(lat, lon)
|
|
37
|
-
df = ms.stations.nearby(point, radius=radius, limit=limit)
|
|
46
|
+
df = ms.stations.nearby(point, radius=radius or 40_075_000, limit=limit)
|
|
38
47
|
|
|
39
48
|
actual_fmt = detect_format(fmt, output)
|
|
40
49
|
output_df(df, actual_fmt, output, no_header, show_all=show_all)
|
|
@@ -100,7 +100,7 @@ def plot_dataframe(
|
|
|
100
100
|
|
|
101
101
|
typer.echo(
|
|
102
102
|
"Error: Matplotlib is required for plot output. "
|
|
103
|
-
|
|
103
|
+
'Install with: uv tool install "meteostat-cli[plot]"',
|
|
104
104
|
err=True,
|
|
105
105
|
)
|
|
106
106
|
raise typer.Exit(1) from None
|
|
@@ -121,6 +121,15 @@ def get_interpolation_radius() -> int:
|
|
|
121
121
|
return CLI_CONFIG_KEYS["interpolation_radius"]
|
|
122
122
|
|
|
123
123
|
|
|
124
|
+
def get_interpolation_station_count() -> int:
|
|
125
|
+
"""Get the configured station count limit for coordinate-based queries."""
|
|
126
|
+
data = load_config()
|
|
127
|
+
key = "interpolation_station_count"
|
|
128
|
+
if key in data:
|
|
129
|
+
return int(data[key])
|
|
130
|
+
return CLI_CONFIG_KEYS["interpolation_station_count"]
|
|
131
|
+
|
|
132
|
+
|
|
124
133
|
def detect_format(fmt: str | None, output: str | None) -> str:
|
|
125
134
|
"""Detect the output format from explicit flag or file extension."""
|
|
126
135
|
if fmt is not None:
|
|
@@ -362,7 +371,9 @@ def fetch_timeseries(
|
|
|
362
371
|
else:
|
|
363
372
|
point = ms.Point(resolved[1], resolved[2])
|
|
364
373
|
radius = get_interpolation_radius()
|
|
365
|
-
nearby = ms.stations.nearby(
|
|
374
|
+
nearby = ms.stations.nearby(
|
|
375
|
+
point, radius=radius, limit=get_interpolation_station_count()
|
|
376
|
+
)
|
|
366
377
|
if nearby.empty:
|
|
367
378
|
typer.echo(
|
|
368
379
|
"No weather stations found within the specified radius.",
|
|
@@ -397,7 +408,9 @@ def fetch_timeseries(
|
|
|
397
408
|
else:
|
|
398
409
|
point = ms.Point(resolved[1], resolved[2])
|
|
399
410
|
radius = get_interpolation_radius()
|
|
400
|
-
nearby = ms.stations.nearby(
|
|
411
|
+
nearby = ms.stations.nearby(
|
|
412
|
+
point, radius=radius, limit=get_interpolation_station_count()
|
|
413
|
+
)
|
|
401
414
|
if nearby.empty:
|
|
402
415
|
typer.echo(
|
|
403
416
|
"No weather stations found within the specified radius.",
|
|
@@ -434,7 +447,9 @@ def fetch_timeseries(
|
|
|
434
447
|
else:
|
|
435
448
|
point = ms.Point(resolved[1], resolved[2])
|
|
436
449
|
radius = get_interpolation_radius()
|
|
437
|
-
nearby = ms.stations.nearby(
|
|
450
|
+
nearby = ms.stations.nearby(
|
|
451
|
+
point, radius=radius, limit=get_interpolation_station_count()
|
|
452
|
+
)
|
|
438
453
|
if nearby.empty:
|
|
439
454
|
typer.echo(
|
|
440
455
|
"No weather stations found within the specified radius.",
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "meteostat-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Access weather and climate data through the terminal."
|
|
9
9
|
authors = [{ name = "Meteostat", email = "info@meteostat.net" }]
|
|
10
10
|
readme = "README.md"
|
|
@@ -12,7 +12,6 @@ license = { text = "MIT" }
|
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
13
|
keywords = ["weather", "climate", "meteostat", "cli"]
|
|
14
14
|
classifiers = [
|
|
15
|
-
"Development Status :: 4 - Beta",
|
|
16
15
|
"Environment :: Console",
|
|
17
16
|
"Intended Audience :: Developers",
|
|
18
17
|
"Intended Audience :: Science/Research",
|
|
@@ -33,6 +32,7 @@ plot = ["matplotlib>=3.9.0"]
|
|
|
33
32
|
|
|
34
33
|
[project.scripts]
|
|
35
34
|
meteo = "meteo.cli:main"
|
|
35
|
+
meteostat-cli = "meteo.cli:main"
|
|
36
36
|
|
|
37
37
|
[project.urls]
|
|
38
38
|
Homepage = "https://github.com/meteostat/cli"
|
|
@@ -67,12 +67,6 @@ def test_command_help_config(invoke):
|
|
|
67
67
|
assert result.exit_code == 0
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
def test_command_help_stations(invoke):
|
|
71
|
-
"""Test that 'stations --help' works."""
|
|
72
|
-
result = invoke("stations", "--help")
|
|
73
|
-
assert result.exit_code == 0
|
|
74
|
-
|
|
75
|
-
|
|
76
70
|
def test_command_help_nearby(invoke):
|
|
77
71
|
"""Test that 'nearby --help' works."""
|
|
78
72
|
result = invoke("nearby", "--help")
|
|
@@ -86,7 +86,7 @@ class TestNearbyCommand:
|
|
|
86
86
|
with patch("meteostat.stations") as mock_stations:
|
|
87
87
|
mock_stations.nearby.return_value = df
|
|
88
88
|
with patch("meteostat.Point"):
|
|
89
|
-
result = invoke("nearby", "50.1109
|
|
89
|
+
result = invoke("nearby", "50.1109,8.6821")
|
|
90
90
|
assert result.exit_code == 0
|
|
91
91
|
assert "Frankfurt" in result.output
|
|
92
92
|
|
|
@@ -259,7 +259,7 @@ class TestAllFlag:
|
|
|
259
259
|
with patch("meteostat.stations") as mock_stations:
|
|
260
260
|
mock_stations.nearby.return_value = df
|
|
261
261
|
with patch("meteostat.Point"):
|
|
262
|
-
result = invoke("nearby", "50.1109
|
|
262
|
+
result = invoke("nearby", "50.1109,8.6821", "--all")
|
|
263
263
|
assert result.exit_code == 0
|
|
264
264
|
|
|
265
265
|
def test_hourly_all_flag(self, invoke):
|
|
@@ -311,7 +311,6 @@ class TestAllFlag:
|
|
|
311
311
|
"""--all flag appears in help for all data commands."""
|
|
312
312
|
for cmd in [
|
|
313
313
|
"station",
|
|
314
|
-
"stations",
|
|
315
314
|
"nearby",
|
|
316
315
|
"inventory",
|
|
317
316
|
"hourly",
|
|
@@ -544,7 +543,7 @@ class TestNearbyEdgeCases:
|
|
|
544
543
|
"""Nearby command exits 1 when no stations found."""
|
|
545
544
|
with patch("meteostat.stations") as ms, patch("meteostat.Point"):
|
|
546
545
|
ms.nearby.return_value = pd.DataFrame()
|
|
547
|
-
result = invoke("nearby", "50.1109
|
|
546
|
+
result = invoke("nearby", "50.1109,8.6821")
|
|
548
547
|
assert result.exit_code == 1
|
|
549
548
|
assert "No data" in result.output
|
|
550
549
|
|
|
@@ -556,19 +555,19 @@ class TestNearbyEdgeCases:
|
|
|
556
555
|
)
|
|
557
556
|
with patch("meteostat.stations") as ms, patch("meteostat.Point"):
|
|
558
557
|
ms.nearby.return_value = df
|
|
559
|
-
result = invoke("nearby", "50.1109
|
|
558
|
+
result = invoke("nearby", "50.1109,8.6821", "--format", "csv")
|
|
560
559
|
assert result.exit_code == 0
|
|
561
560
|
assert "name" in result.output
|
|
562
561
|
|
|
563
562
|
def test_nearby_invalid_latitude(self, invoke):
|
|
564
563
|
"""Nearby command exits 2 when latitude is out of range."""
|
|
565
|
-
result = invoke("nearby", "200
|
|
564
|
+
result = invoke("nearby", "200,8.6821")
|
|
566
565
|
assert result.exit_code == 2
|
|
567
566
|
assert "Latitude" in result.output
|
|
568
567
|
|
|
569
568
|
def test_nearby_invalid_longitude(self, invoke):
|
|
570
569
|
"""Nearby command exits 2 when longitude is out of range."""
|
|
571
|
-
result = invoke("nearby", "50.1109
|
|
570
|
+
result = invoke("nearby", "50.1109,200")
|
|
572
571
|
assert result.exit_code == 2
|
|
573
572
|
assert "Longitude" in result.output
|
|
574
573
|
|
|
@@ -607,7 +607,7 @@ wheels = [
|
|
|
607
607
|
|
|
608
608
|
[[package]]
|
|
609
609
|
name = "meteostat-cli"
|
|
610
|
-
version = "0.
|
|
610
|
+
version = "0.3.0"
|
|
611
611
|
source = { editable = "." }
|
|
612
612
|
dependencies = [
|
|
613
613
|
{ name = "meteostat" },
|
|
@@ -891,11 +891,11 @@ wheels = [
|
|
|
891
891
|
|
|
892
892
|
[[package]]
|
|
893
893
|
name = "pygments"
|
|
894
|
-
version = "2.
|
|
894
|
+
version = "2.20.0"
|
|
895
895
|
source = { registry = "https://pypi.org/simple" }
|
|
896
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
896
|
+
sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" }
|
|
897
897
|
wheels = [
|
|
898
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
898
|
+
{ url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
|
|
899
899
|
]
|
|
900
900
|
|
|
901
901
|
[[package]]
|
meteostat_cli-0.1.0/PKG-INFO
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: meteostat-cli
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Access weather and climate data through the terminal.
|
|
5
|
-
Project-URL: Homepage, https://github.com/meteostat/cli
|
|
6
|
-
Project-URL: Repository, https://github.com/meteostat/cli
|
|
7
|
-
Project-URL: Issues, https://github.com/meteostat/cli/issues
|
|
8
|
-
Author-email: Meteostat <info@meteostat.net>
|
|
9
|
-
License: MIT
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Keywords: cli,climate,meteostat,weather
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Intended Audience :: Science/Research
|
|
16
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
21
|
-
Requires-Python: >=3.11
|
|
22
|
-
Requires-Dist: meteostat<3,>=2.1.4
|
|
23
|
-
Requires-Dist: pyyaml>=6.0
|
|
24
|
-
Requires-Dist: typer>=0.15.0
|
|
25
|
-
Provides-Extra: plot
|
|
26
|
-
Requires-Dist: matplotlib>=3.9.0; extra == 'plot'
|
|
27
|
-
Description-Content-Type: text/markdown
|
|
28
|
-
|
|
29
|
-
<!-- PROJECT SHIELDS -->
|
|
30
|
-
<div align="center">
|
|
31
|
-
|
|
32
|
-
[![PyPI Version][pypi-shield]][pypi-url]
|
|
33
|
-
[![Issues][issues-shield]][issues-url]
|
|
34
|
-
[![MIT License][license-shield]][license-url]
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<!-- PROJECT LOGO -->
|
|
39
|
-
<br />
|
|
40
|
-
<div align="center">
|
|
41
|
-
<a href="https://github.com/meteostat/cli">
|
|
42
|
-
<img src="https://media.meteostat.net/icon.svg" alt="Meteostat Logo" width="80" height="80">
|
|
43
|
-
</a>
|
|
44
|
-
|
|
45
|
-
<h3 align="center">Meteostat CLI</h3>
|
|
46
|
-
|
|
47
|
-
<p align="center">
|
|
48
|
-
Access weather and climate data through the terminal.
|
|
49
|
-
<p>
|
|
50
|
-
<a href="https://dev.meteostat.net/cli"><strong>Explore the docs »</strong></a>
|
|
51
|
-
</p>
|
|
52
|
-
<p>
|
|
53
|
-
<a href="https://meteostat.net">Visit Website</a>
|
|
54
|
-
·
|
|
55
|
-
<a href="https://github.com/meteostat/cli/issues">Report Bug</a>
|
|
56
|
-
·
|
|
57
|
-
<a href="https://github.com/orgs/meteostat/discussions">Request Feature</a>
|
|
58
|
-
</p>
|
|
59
|
-
</p>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
## 📚 Installation
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
pip install --user meteostat-cli
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
For plotting capabilities (`png`/`svg` output), install the `plot` extra:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
pip install --user meteostat-cli[plot]
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## 🚀 Usage
|
|
75
|
-
|
|
76
|
-
### Get daily weather data for a station
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
meteo daily 10637 --start 2024-01-01 --end 2024-12-31
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Get hourly data by coordinates (with interpolation)
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
meteo hourly 50.1109,8.6821 --start 2024-01-01 --end 2024-01-07
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Export data to a file
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output data.json
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Plot temperature data
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output chart.png
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## 📖 Commands
|
|
101
|
-
|
|
102
|
-
### `meteo station` — Browse weather stations
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
meteo station 10637 # Metadata for a specific station
|
|
106
|
-
meteo station --country DE # List stations by country
|
|
107
|
-
meteo station --country DE --state HE # Filter by country and state
|
|
108
|
-
meteo station --name "Frankfurt" # Search by name
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
| Option | Short | Description |
|
|
112
|
-
| ------------- | ----- | ------------------------------------------------ |
|
|
113
|
-
| `--country` | `-c` | ISO 3166-1 alpha-2 country code |
|
|
114
|
-
| `--state` | | State or region code |
|
|
115
|
-
| `--name` | `-n` | Station name (partial match) |
|
|
116
|
-
| `--wmo` | `-w` | WMO station ID |
|
|
117
|
-
| `--icao` | `-i` | ICAO station ID |
|
|
118
|
-
| `--iata` | | IATA station ID |
|
|
119
|
-
| `--national` | `-N` | National station ID |
|
|
120
|
-
| `--bbox` | | Bounding box (`lon_min,lat_min,lon_max,lat_max`) |
|
|
121
|
-
| `--sql` | | Arbitrary SQL query |
|
|
122
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
123
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
124
|
-
| `--no-header` | | Omit CSV header row |
|
|
125
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
126
|
-
|
|
127
|
-
### `meteo nearby` — Find stations near a location
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
meteo nearby 50.1109 8.6821 # Nearest stations (default: 5 within 5 km)
|
|
131
|
-
meteo nearby 50.1109 8.6821 --limit 10 # Return up to 10 stations
|
|
132
|
-
meteo nearby 50.1109 8.6821 --radius 20000 # Search within 20 km
|
|
133
|
-
meteo nearby 50.1109 8.6821 --format json # JSON output
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
| Option | Short | Description |
|
|
137
|
-
| ------------- | ----- | ----------------------------------------------- |
|
|
138
|
-
| `--limit` | `-l` | Maximum number of stations (default: 5) |
|
|
139
|
-
| `--radius` | `-r` | Search radius in meters (default: 5000) |
|
|
140
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
141
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
142
|
-
| `--no-header` | | Omit CSV header row |
|
|
143
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
144
|
-
|
|
145
|
-
### `meteo inventory` — Check data availability
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
meteo inventory 10637
|
|
149
|
-
meteo inventory 10637 --granularity daily --parameters tavg,tmin,tmax
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
| Option | Short | Description |
|
|
153
|
-
| --------------- | ----- | --------------------------------------------------------------- |
|
|
154
|
-
| `--granularity` | `-g` | Filter by granularity: `hourly`/`h`, `daily`/`d`, `monthly`/`m` |
|
|
155
|
-
| `--parameters` | `-p` | Comma-separated parameters (e.g. `tavg,tmin,tmax`) |
|
|
156
|
-
| `--providers` | `-P` | Comma-separated data providers |
|
|
157
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
158
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
159
|
-
| `--no-header` | | Omit CSV header row |
|
|
160
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
161
|
-
|
|
162
|
-
### `meteo hourly` — Hourly weather data
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
meteo hourly 10637 --start 2024-01-01 --end 2024-01-31
|
|
166
|
-
meteo h 10637 -s 2024-01-01 -e 2024-01-31 # Short form
|
|
167
|
-
meteo hourly 10637 10635 -s 2024-01-01 -e 2024-01-31 # Multiple stations
|
|
168
|
-
meteo hourly 10637 --agg max -s 2024-01-01 -e 2024-01-31 # Aggregate by station and time
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below. Hourly also supports `--timezone`/`-t` (e.g. `Europe/Berlin`).
|
|
172
|
-
|
|
173
|
-
### `meteo daily` — Daily weather data
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
meteo daily 10637 --start 2024-01-01 --end 2024-12-31
|
|
177
|
-
meteo d 10637 -s 2024-01-01 -e 2024-12-31 # Short form
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
181
|
-
|
|
182
|
-
### `meteo monthly` — Monthly weather data
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
meteo monthly 10637 --start 2020 --end 2024
|
|
186
|
-
meteo m 10637 -s 2020 -e 2024 # Short form
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
190
|
-
|
|
191
|
-
### `meteo normals` — Climate normals
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
meteo normals 10637 --start 1991 --end 2020
|
|
195
|
-
meteo n 10637 -s 1991 -e 2020 # Short form
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
199
|
-
|
|
200
|
-
### Common options (hourly / daily / monthly / normals)
|
|
201
|
-
|
|
202
|
-
| Option | Short | Description |
|
|
203
|
-
| ---------------- | ----- | ------------------------------------------------------------- |
|
|
204
|
-
| `--start` | `-s` | Start date (`YYYY-MM-DD`, `YYYY-MM`, `YYYY`) |
|
|
205
|
-
| `--end` | `-e` | End date (same formats) |
|
|
206
|
-
| `--parameters` | `-p` | Comma-separated parameters (e.g. `tavg,tmin,tmax,prcp`) |
|
|
207
|
-
| `--providers` | `-P` | Comma-separated data providers |
|
|
208
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet`, `png`, `svg` |
|
|
209
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
210
|
-
| `--timezone` | `-t` | Timezone for timestamps (e.g. `Europe/Berlin`) — hourly only |
|
|
211
|
-
| `--with-sources` | `-S` | Include data source column in output |
|
|
212
|
-
| `--no-models` | | Exclude model data (e.g. MOSMIX) |
|
|
213
|
-
| `--no-header` | | Omit CSV header row |
|
|
214
|
-
| `--no-cache` | | Disable result caching |
|
|
215
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
216
|
-
| `--agg` | | Aggregation function: `mean`, `sum`, `min`, `max` |
|
|
217
|
-
|
|
218
|
-
### `meteo config` — Manage configuration
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
meteo config --list # List all settings
|
|
222
|
-
meteo config cache_enable false # Set a value
|
|
223
|
-
meteo config interpolation_radius 25000
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Configuration is stored in `cli.yml` under `typer.get_app_dir("meteostat")`.
|
|
227
|
-
|
|
228
|
-
### Shell completion
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
meteo --install-completion # Bash, Zsh, Fish, PowerShell
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
## 🤝 Contributing
|
|
235
|
-
|
|
236
|
-
Please read our [contributing guidelines](https://dev.meteostat.net/contributing) for details on how to contribute to Meteostat.
|
|
237
|
-
|
|
238
|
-
## 📄 License
|
|
239
|
-
|
|
240
|
-
The Meteostat CLI is licensed under the [**MIT License**](https://github.com/meteostat/cli/blob/main/LICENSE). Data provided by Meteostat is licensed under [**Creative Commons Attribution 4.0 International (CC BY 4.0)**](https://creativecommons.org/licenses/by/4.0). See the [documentation](https://dev.meteostat.net/license) for details.
|
|
241
|
-
|
|
242
|
-
<!-- MARKDOWN LINKS & IMAGES -->
|
|
243
|
-
|
|
244
|
-
[pypi-shield]: https://img.shields.io/pypi/v/meteostat-cli
|
|
245
|
-
[pypi-url]: https://pypi.org/project/meteostat-cli/
|
|
246
|
-
[issues-shield]: https://img.shields.io/github/issues/meteostat/cli.svg
|
|
247
|
-
[issues-url]: https://github.com/meteostat/cli/issues
|
|
248
|
-
[license-shield]: https://img.shields.io/github/license/meteostat/cli.svg
|
|
249
|
-
[license-url]: https://github.com/meteostat/cli/blob/main/LICENSE
|
meteostat_cli-0.1.0/README.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
<!-- PROJECT SHIELDS -->
|
|
2
|
-
<div align="center">
|
|
3
|
-
|
|
4
|
-
[![PyPI Version][pypi-shield]][pypi-url]
|
|
5
|
-
[![Issues][issues-shield]][issues-url]
|
|
6
|
-
[![MIT License][license-shield]][license-url]
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<!-- PROJECT LOGO -->
|
|
11
|
-
<br />
|
|
12
|
-
<div align="center">
|
|
13
|
-
<a href="https://github.com/meteostat/cli">
|
|
14
|
-
<img src="https://media.meteostat.net/icon.svg" alt="Meteostat Logo" width="80" height="80">
|
|
15
|
-
</a>
|
|
16
|
-
|
|
17
|
-
<h3 align="center">Meteostat CLI</h3>
|
|
18
|
-
|
|
19
|
-
<p align="center">
|
|
20
|
-
Access weather and climate data through the terminal.
|
|
21
|
-
<p>
|
|
22
|
-
<a href="https://dev.meteostat.net/cli"><strong>Explore the docs »</strong></a>
|
|
23
|
-
</p>
|
|
24
|
-
<p>
|
|
25
|
-
<a href="https://meteostat.net">Visit Website</a>
|
|
26
|
-
·
|
|
27
|
-
<a href="https://github.com/meteostat/cli/issues">Report Bug</a>
|
|
28
|
-
·
|
|
29
|
-
<a href="https://github.com/orgs/meteostat/discussions">Request Feature</a>
|
|
30
|
-
</p>
|
|
31
|
-
</p>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
## 📚 Installation
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
pip install --user meteostat-cli
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
For plotting capabilities (`png`/`svg` output), install the `plot` extra:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
pip install --user meteostat-cli[plot]
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## 🚀 Usage
|
|
47
|
-
|
|
48
|
-
### Get daily weather data for a station
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
meteo daily 10637 --start 2024-01-01 --end 2024-12-31
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Get hourly data by coordinates (with interpolation)
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
meteo hourly 50.1109,8.6821 --start 2024-01-01 --end 2024-01-07
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Export data to a file
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output data.json
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Plot temperature data
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
meteo daily 10637 -s 2024-01-01 -e 2024-12-31 --output chart.png
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 📖 Commands
|
|
73
|
-
|
|
74
|
-
### `meteo station` — Browse weather stations
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
meteo station 10637 # Metadata for a specific station
|
|
78
|
-
meteo station --country DE # List stations by country
|
|
79
|
-
meteo station --country DE --state HE # Filter by country and state
|
|
80
|
-
meteo station --name "Frankfurt" # Search by name
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
| Option | Short | Description |
|
|
84
|
-
| ------------- | ----- | ------------------------------------------------ |
|
|
85
|
-
| `--country` | `-c` | ISO 3166-1 alpha-2 country code |
|
|
86
|
-
| `--state` | | State or region code |
|
|
87
|
-
| `--name` | `-n` | Station name (partial match) |
|
|
88
|
-
| `--wmo` | `-w` | WMO station ID |
|
|
89
|
-
| `--icao` | `-i` | ICAO station ID |
|
|
90
|
-
| `--iata` | | IATA station ID |
|
|
91
|
-
| `--national` | `-N` | National station ID |
|
|
92
|
-
| `--bbox` | | Bounding box (`lon_min,lat_min,lon_max,lat_max`) |
|
|
93
|
-
| `--sql` | | Arbitrary SQL query |
|
|
94
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
95
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
96
|
-
| `--no-header` | | Omit CSV header row |
|
|
97
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
98
|
-
|
|
99
|
-
### `meteo nearby` — Find stations near a location
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
meteo nearby 50.1109 8.6821 # Nearest stations (default: 5 within 5 km)
|
|
103
|
-
meteo nearby 50.1109 8.6821 --limit 10 # Return up to 10 stations
|
|
104
|
-
meteo nearby 50.1109 8.6821 --radius 20000 # Search within 20 km
|
|
105
|
-
meteo nearby 50.1109 8.6821 --format json # JSON output
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
| Option | Short | Description |
|
|
109
|
-
| ------------- | ----- | ----------------------------------------------- |
|
|
110
|
-
| `--limit` | `-l` | Maximum number of stations (default: 5) |
|
|
111
|
-
| `--radius` | `-r` | Search radius in meters (default: 5000) |
|
|
112
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
113
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
114
|
-
| `--no-header` | | Omit CSV header row |
|
|
115
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
116
|
-
|
|
117
|
-
### `meteo inventory` — Check data availability
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
meteo inventory 10637
|
|
121
|
-
meteo inventory 10637 --granularity daily --parameters tavg,tmin,tmax
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
| Option | Short | Description |
|
|
125
|
-
| --------------- | ----- | --------------------------------------------------------------- |
|
|
126
|
-
| `--granularity` | `-g` | Filter by granularity: `hourly`/`h`, `daily`/`d`, `monthly`/`m` |
|
|
127
|
-
| `--parameters` | `-p` | Comma-separated parameters (e.g. `tavg,tmin,tmax`) |
|
|
128
|
-
| `--providers` | `-P` | Comma-separated data providers |
|
|
129
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet` |
|
|
130
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
131
|
-
| `--no-header` | | Omit CSV header row |
|
|
132
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
133
|
-
|
|
134
|
-
### `meteo hourly` — Hourly weather data
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
meteo hourly 10637 --start 2024-01-01 --end 2024-01-31
|
|
138
|
-
meteo h 10637 -s 2024-01-01 -e 2024-01-31 # Short form
|
|
139
|
-
meteo hourly 10637 10635 -s 2024-01-01 -e 2024-01-31 # Multiple stations
|
|
140
|
-
meteo hourly 10637 --agg max -s 2024-01-01 -e 2024-01-31 # Aggregate by station and time
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below. Hourly also supports `--timezone`/`-t` (e.g. `Europe/Berlin`).
|
|
144
|
-
|
|
145
|
-
### `meteo daily` — Daily weather data
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
meteo daily 10637 --start 2024-01-01 --end 2024-12-31
|
|
149
|
-
meteo d 10637 -s 2024-01-01 -e 2024-12-31 # Short form
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
153
|
-
|
|
154
|
-
### `meteo monthly` — Monthly weather data
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
meteo monthly 10637 --start 2020 --end 2024
|
|
158
|
-
meteo m 10637 -s 2020 -e 2024 # Short form
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
162
|
-
|
|
163
|
-
### `meteo normals` — Climate normals
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
meteo normals 10637 --start 1991 --end 2020
|
|
167
|
-
meteo n 10637 -s 1991 -e 2020 # Short form
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
See [Common options](#common-options-hourly--daily--monthly--normals) below.
|
|
171
|
-
|
|
172
|
-
### Common options (hourly / daily / monthly / normals)
|
|
173
|
-
|
|
174
|
-
| Option | Short | Description |
|
|
175
|
-
| ---------------- | ----- | ------------------------------------------------------------- |
|
|
176
|
-
| `--start` | `-s` | Start date (`YYYY-MM-DD`, `YYYY-MM`, `YYYY`) |
|
|
177
|
-
| `--end` | `-e` | End date (same formats) |
|
|
178
|
-
| `--parameters` | `-p` | Comma-separated parameters (e.g. `tavg,tmin,tmax,prcp`) |
|
|
179
|
-
| `--providers` | `-P` | Comma-separated data providers |
|
|
180
|
-
| `--format` | `-f` | Output format: `csv`, `json`, `xlsx`, `parquet`, `png`, `svg` |
|
|
181
|
-
| `--output` | `-o` | Output file path (defaults to stdout) |
|
|
182
|
-
| `--timezone` | `-t` | Timezone for timestamps (e.g. `Europe/Berlin`) — hourly only |
|
|
183
|
-
| `--with-sources` | `-S` | Include data source column in output |
|
|
184
|
-
| `--no-models` | | Exclude model data (e.g. MOSMIX) |
|
|
185
|
-
| `--no-header` | | Omit CSV header row |
|
|
186
|
-
| `--no-cache` | | Disable result caching |
|
|
187
|
-
| `--all` | `-A` | Print full table without truncation |
|
|
188
|
-
| `--agg` | | Aggregation function: `mean`, `sum`, `min`, `max` |
|
|
189
|
-
|
|
190
|
-
### `meteo config` — Manage configuration
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
meteo config --list # List all settings
|
|
194
|
-
meteo config cache_enable false # Set a value
|
|
195
|
-
meteo config interpolation_radius 25000
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Configuration is stored in `cli.yml` under `typer.get_app_dir("meteostat")`.
|
|
199
|
-
|
|
200
|
-
### Shell completion
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
meteo --install-completion # Bash, Zsh, Fish, PowerShell
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## 🤝 Contributing
|
|
207
|
-
|
|
208
|
-
Please read our [contributing guidelines](https://dev.meteostat.net/contributing) for details on how to contribute to Meteostat.
|
|
209
|
-
|
|
210
|
-
## 📄 License
|
|
211
|
-
|
|
212
|
-
The Meteostat CLI is licensed under the [**MIT License**](https://github.com/meteostat/cli/blob/main/LICENSE). Data provided by Meteostat is licensed under [**Creative Commons Attribution 4.0 International (CC BY 4.0)**](https://creativecommons.org/licenses/by/4.0). See the [documentation](https://dev.meteostat.net/license) for details.
|
|
213
|
-
|
|
214
|
-
<!-- MARKDOWN LINKS & IMAGES -->
|
|
215
|
-
|
|
216
|
-
[pypi-shield]: https://img.shields.io/pypi/v/meteostat-cli
|
|
217
|
-
[pypi-url]: https://pypi.org/project/meteostat-cli/
|
|
218
|
-
[issues-shield]: https://img.shields.io/github/issues/meteostat/cli.svg
|
|
219
|
-
[issues-url]: https://github.com/meteostat/cli/issues
|
|
220
|
-
[license-shield]: https://img.shields.io/github/license/meteostat/cli.svg
|
|
221
|
-
[license-url]: https://github.com/meteostat/cli/blob/main/LICENSE
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|