meteostat-cli 0.1.0__py3-none-any.whl
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.
- meteo/__init__.py +3 -0
- meteo/cli.py +71 -0
- meteo/commands/__init__.py +0 -0
- meteo/commands/config.py +95 -0
- meteo/commands/daily.py +72 -0
- meteo/commands/hourly.py +79 -0
- meteo/commands/inventory.py +98 -0
- meteo/commands/monthly.py +72 -0
- meteo/commands/nearby.py +40 -0
- meteo/commands/normals.py +70 -0
- meteo/commands/station.py +175 -0
- meteo/config.py +175 -0
- meteo/plotting.py +172 -0
- meteo/utils.py +473 -0
- meteostat_cli-0.1.0.dist-info/METADATA +249 -0
- meteostat_cli-0.1.0.dist-info/RECORD +19 -0
- meteostat_cli-0.1.0.dist-info/WHEEL +4 -0
- meteostat_cli-0.1.0.dist-info/entry_points.txt +2 -0
- meteostat_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,249 @@
|
|
|
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
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
meteo/__init__.py,sha256=0G-JdNghgQ17I5YjyDMpVZlj8gveX5GmimSHTpbssW0,101
|
|
2
|
+
meteo/cli.py,sha256=7HzbeQVBdN9HKjCsfHwTz8H26XDSZT5Z7JhwUIU5Hd4,2094
|
|
3
|
+
meteo/config.py,sha256=ALLlxOuICu4udiLnOfAPNrY3DpO2x8ckVy4u7j2JsZY,5170
|
|
4
|
+
meteo/plotting.py,sha256=o9yKTH8Qzn2me5SF4w32NbenI3YzGzKVKITdMc6i7-E,4442
|
|
5
|
+
meteo/utils.py,sha256=gfroPSJCSGhKtVspl7UBRHhkzWU1YDVoVMvvneYnqSk,16052
|
|
6
|
+
meteo/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
meteo/commands/config.py,sha256=aLE0S8GLdtxhjyHgVZ6_lNRKVNMNx4uUGkO3DLDVijM,2609
|
|
8
|
+
meteo/commands/daily.py,sha256=b2wAj7tiTG03-pHsqX7mTdw4zo8RxEFJbP8GlvuxpXQ,2235
|
|
9
|
+
meteo/commands/hourly.py,sha256=e599udiXZWqAZc1wWVTyT3SjEOpwqojdoipF-vlcpBA,2426
|
|
10
|
+
meteo/commands/inventory.py,sha256=4e3u-9WZePGMIgLfoInKq1-TvwKROrE6mU9MBBfpaHI,3261
|
|
11
|
+
meteo/commands/monthly.py,sha256=veTmtXJzYoq8QD7dXIIBXJunfL6wGG5XP7FXklZYMCE,2251
|
|
12
|
+
meteo/commands/nearby.py,sha256=s4gRKh6qVJjBidy29umpzMlQMCZbiCnaG3nIkp38hrY,1493
|
|
13
|
+
meteo/commands/normals.py,sha256=90_aBQn0QlhMQAu6Jer2WqkCqW60dSQHcxVAp6BtcWw,2216
|
|
14
|
+
meteo/commands/station.py,sha256=jXuXtZAeWRGU3RhydUlTNwdxdDgWH95CW5faia5CB0c,6690
|
|
15
|
+
meteostat_cli-0.1.0.dist-info/METADATA,sha256=RkSjMr-B4XkP3PgrGs0gsC2ZpYbWnr15IDnI8E9-Thc,10114
|
|
16
|
+
meteostat_cli-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
17
|
+
meteostat_cli-0.1.0.dist-info/entry_points.txt,sha256=KzgBE5RDxU9MnP6wK9ryglNegFIc7B4JHuhnSOwq1s0,41
|
|
18
|
+
meteostat_cli-0.1.0.dist-info/licenses/LICENSE,sha256=8ZYaawfNrAKM7h2ecHxiBJCUdYDdN9hlIysPqwHhJnI,1066
|
|
19
|
+
meteostat_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Meteostat
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|