Python toolkit for Swiss weather data — download, query, and analyse MeteoSwiss Open Government Data
Project description
MeteoSwiss Open Data — Python API, CLI, MCP server, Parquet & Delta tables
foehn downloads every MeteoSwiss OGD collection via the STAC API, converts CSV/TXT to Parquet with Polars, and optionally ingests everything into Databricks Unity Catalog Delta tables on a daily schedule. It also ships an MCP server so LLMs can query Swiss weather data directly.
Daily weather in Bern, powered by foehn's MCP server and MeteoSwiss open data.
Why foehn?
- 20+ collections in one command — weather stations, radar, hail maps, forecasts, climate scenarios, and more
- MCP server for LLMs — give your favorite LLM live access to MeteoSwiss data with the MCP server
- Significantly smaller on disk — columnar Parquet with Zstandard compression vs. raw CSVs
- Incremental by default — only re-downloads files that changed since your last run, tracked via
_last_run.json - No Spark required locally — download + conversion uses Polars only; Spark is optional for Delta ingestion
- Ships a Declarative Automation Bundle — ready-to-deploy daily job and historical backfill, no pipeline config needed
Quick start
pip install foehn
foehn download
Recent data (Jan 1 to yesterday) is downloaded and converted to Parquet under ./data/meteoswiss/.
Installation
From PyPI:
pip install foehn
From source:
git clone https://github.com/kayhendriksen/foehn
cd foehn
pip install -e .
With extras:
pip install "foehn[databricks]" # PySpark + Delta
pip install "foehn[mcp]" # MCP server
Requires Python 3.10 or later.
Python API
import foehn
df = foehn.load("smn", station="BER", frequency="d")
Load data directly into Polars DataFrames, explore metadata, download to disk, and convert to Parquet — all from Python. See the full Python API documentation.
CLI
foehn download smn pollen
foehn load smn --station BER --frequency d
The CLI mirrors the Python API with subcommands for downloading, converting, loading, and inspecting metadata. See the full CLI documentation.
MCP server
{
"mcpServers": {
"foehn": {
"command": "foehn",
"args": ["mcp"]
}
}
}
Give any MCP-compatible LLM live access to MeteoSwiss data. See the full MCP server documentation.
Documentation
| Collections | All 20+ MeteoSwiss datasets, categories, and time slice conventions |
| Python API | Loading data, metadata, downloading, and Parquet conversion |
| CLI | All subcommands, flags, and environment variables |
| MCP Server | Setup, configuration, and available tools |
| Databricks Pipeline | Declarative Automation Bundle deployment |
Data sources
| STAC API | https://data.geo.admin.ch/api/stac/v1 |
| Documentation | https://opendatadocs.meteoswiss.ch |
| MeteoSwiss OGD | https://github.com/MeteoSwiss/opendata |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foehn-0.2.22.tar.gz.
File metadata
- Download URL: foehn-0.2.22.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be4ff6c502e48f542f0722dacbc478155cc91372cd58fcee570d39b958106203
|
|
| MD5 |
c7f097f233cbd122e2cd9cd0d33f61de
|
|
| BLAKE2b-256 |
23fa5ade557002ff111a28b1e5faed84b703f1a9444d0e84392ca04ffac80905
|
Provenance
The following attestation bundles were made for foehn-0.2.22.tar.gz:
Publisher:
publish.yml on kayhendriksen/foehn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foehn-0.2.22.tar.gz -
Subject digest:
be4ff6c502e48f542f0722dacbc478155cc91372cd58fcee570d39b958106203 - Sigstore transparency entry: 1487023946
- Sigstore integration time:
-
Permalink:
kayhendriksen/foehn@69aa933d4958dfd98c2050dcaadf27cdbf456004 -
Branch / Tag:
refs/tags/v0.2.22 - Owner: https://github.com/kayhendriksen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@69aa933d4958dfd98c2050dcaadf27cdbf456004 -
Trigger Event:
release
-
Statement type:
File details
Details for the file foehn-0.2.22-py3-none-any.whl.
File metadata
- Download URL: foehn-0.2.22-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd62d3110926497086ee12f40e07897fa9df2627174940249a14525b89e88c7b
|
|
| MD5 |
d4d7b68a7b9f5c37a1d4610562301e1b
|
|
| BLAKE2b-256 |
487a02090fa52e5604b60ac5b50d70c212ecf49645ea996f15723f548cbce44c
|
Provenance
The following attestation bundles were made for foehn-0.2.22-py3-none-any.whl:
Publisher:
publish.yml on kayhendriksen/foehn
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foehn-0.2.22-py3-none-any.whl -
Subject digest:
dd62d3110926497086ee12f40e07897fa9df2627174940249a14525b89e88c7b - Sigstore transparency entry: 1487023972
- Sigstore integration time:
-
Permalink:
kayhendriksen/foehn@69aa933d4958dfd98c2050dcaadf27cdbf456004 -
Branch / Tag:
refs/tags/v0.2.22 - Owner: https://github.com/kayhendriksen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@69aa933d4958dfd98c2050dcaadf27cdbf456004 -
Trigger Event:
release
-
Statement type: