Metadata-Version: 2.4
Name: meteoswiss
Version: 1.2.1
Summary: Python data retriever from MeteoSwiss open-data APIs
Project-URL: Homepage, https://github.com/lcsrodriguez/meteoswiss-retriever
Project-URL: Repository, https://github.com/lcsrodriguez/meteoswiss-retriever
Project-URL: Bug Tracker, https://github.com/lcsrodriguez/meteoswiss-retriever/issues
Author: Lucas RODRIGUEZ
Maintainer: Lucas RODRIGUEZ
Keywords: forecasts,measurements,weather,weather-alerts,weather-api,weather-data
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.13
Requires-Dist: feedparser>=6.0.14
Requires-Dist: httpx>=0.28.1
Requires-Dist: numpy>=2.5.1
Requires-Dist: platformdirs>=4.11.0
Requires-Dist: polars>=1.43.2
Requires-Dist: pytz>=2026.3.post1
Requires-Dist: shapely>=2.1.2
Description-Content-Type: text/markdown

# MeteoSwiss data retriever

Python weather data retriever from MeteoSwiss open-data: forecasts, ground measurements and weather alerts.

## Getting started

Install package:
```shell
uv add meteoswiss # or pip install meteoswiss
```

See sample scripts in **[`examples/`](examples/)** folder.


## Data

> [!NOTE]
> This repository does not store any data provided by below providers. These scripts are downloading required datasets on the user's **local machine** only.

Datasets are available via open-source APIs provided by MeteoSwiss.

1. **Local forecast data**: forecasts for 9 full days (including today)
    - https://opendatadocs.meteoswiss.ch/e-forecast-data/e4-local-forecast-data
2. **Short-term forecast data**: forecasts for the next minutes up to 6 hours ahead
    - https://opendatadocs.meteoswiss.ch/e-forecast-data/e1-short-term-forecast-data
3. **Ground-based measurements**:
    - Weather stations: https://opendatadocs.meteoswiss.ch/a-data-groundbased/a1-automatic-weather-stations
    - Precipitation stations: https://opendatadocs.meteoswiss.ch/a-data-groundbased/a2-automatic-precipitation-stations

> [!WARNING]
> Short-term forecast data *(nowcasting)* are available to download **on request**. No API endpoint exposed.


### Measurements

When selecting a postal code, users can have access to local forecasts at this postal code.
However, ground-measurements are only available on specific stations.
To get both *realized* measurements + local forecasts for a given postal code,
we can use **proxy measurements** by picking the ground measurements at the nearest station from our postal code coordinates.


### Weather alerts

We wanted to include weather alerts retrieval in this package. However, it does not seem to be available as an open data source directly by MeteoSwiss.

However, MeteoSwiss distributes its weather alerts directly to **[MeteoAlarm.org](https://meteoalarm.org/en)** which provides APIs or ATOM feed like this one: https://feeds.meteoalarm.org/feeds/meteoalarm-legacy-atom-switzerland

> [!WARNING]
> Legacy RSS feeds (`https://feeds.meteoalarm.org/feeds/meteoalarm-legacy-rss-<COUNTRY_NAME>`) are deprecated and must not be used! Only use ATOM feeds.

Docs on ATOM format: https://en.wikipedia.org/wiki/Atom_(web_standard)

## License

Data source: **[MeteoSwiss](https://opendatadocs.meteoswiss.ch/)**.
