Singer tap for OpenMeteo weather API, built with the Meltano Singer SDK.
Project description
tap-openmeteo
tap-openmeteo is a Singer tap for the Open-Meteo weather API.
Built with the Meltano Tap SDK for Singer Taps.
Features
- Multiple Locations: Fetch weather data for any number of locations worldwide
- Comprehensive Weather Data: Hourly, daily, 15-minutely, current conditions, and historical data
- Incremental Syncs: Efficient syncing with support for incremental updates
- Flexible Configuration: Extensive configuration options for weather variables, units, and models
- API Key Support: Optional API key for commercial usage
- Multiple Weather Models: Select specific weather models or use best-match automatic selection
Available Streams
| Stream | Description | Incremental |
|---|---|---|
weather_forecast |
Forecast metadata and configuration | ✓ |
weather_hourly |
Hourly weather variables (up to 16 days forecast) | ✓ |
weather_daily |
Daily weather aggregations | ✓ |
weather_current |
Current weather conditions | ✓ |
weather_minutely_15 |
15-minute resolution data (Central Europe & North America) | ✓ |
weather_historical |
Historical weather data (back to 1940) | ✓ |
Installation
Install from source:
pip install git+https://github.com/YOUR_ORG/tap-openmeteo.git
Or with uv:
uv tool install git+https://github.com/YOUR_ORG/tap-openmeteo.git
Configuration
Required Settings
| Setting | Type | Description |
|---|---|---|
locations |
array | List of locations with name, latitude, longitude |
Optional Settings
| Setting | Type | Default | Description |
|---|---|---|---|
api_key |
string | - | API key for commercial use |
api_url |
string | https://api.open-meteo.com |
API base URL |
forecast_days |
integer | 7 | Number of forecast days (0-16) |
past_days |
integer | 0 | Include past days in forecast (0-92) |
start_date |
date | - | Start date for historical data |
end_date |
date | - | End date for historical data |
hourly_variables |
array | See below | Hourly weather variables |
daily_variables |
array | See below | Daily weather variables |
current_variables |
array | See below | Current weather variables |
minutely_15_variables |
array | [] | 15-minutely variables |
temperature_unit |
string | celsius |
celsius or fahrenheit |
wind_speed_unit |
string | kmh |
kmh, ms, mph, or kn |
precipitation_unit |
string | mm |
mm or inch |
timezone |
string | auto |
Default timezone for all locations |
models |
array | [] | Specific weather models to use |
cell_selection |
string | land |
Grid cell selection: land, sea, nearest |
streams_to_sync |
array | See below | Which streams to sync |
Default Hourly Variables
[
"temperature_2m",
"relative_humidity_2m",
"precipitation",
"weather_code",
"wind_speed_10m",
"wind_direction_10m"
]
Default Daily Variables
[
"weather_code",
"temperature_2m_max",
"temperature_2m_min",
"precipitation_sum",
"sunrise",
"sunset"
]
Default Streams
[
"weather_forecast",
"weather_hourly",
"weather_daily"
]
Available Hourly Variables
temperature_2m,temperature_80m,temperature_120m,temperature_180mrelative_humidity_2m,dew_point_2m,apparent_temperatureprecipitation,precipitation_probability,rain,showers,snowfall,snow_depthweather_code,cloud_cover,cloud_cover_low,cloud_cover_mid,cloud_cover_highpressure_msl,surface_pressure,visibilitywind_speed_10m,wind_speed_80m,wind_speed_120m,wind_speed_180mwind_direction_10m,wind_direction_80m,wind_direction_120m,wind_direction_180mwind_gusts_10msoil_temperature_0cm,soil_temperature_6cm,soil_temperature_18cm,soil_temperature_54cmsoil_moisture_0_to_1cm,soil_moisture_1_to_3cm,soil_moisture_3_to_9cm,soil_moisture_9_to_27cm,soil_moisture_27_to_81cmuv_index,uv_index_clear_sky,is_day,sunshine_durationshortwave_radiation,direct_radiation,diffuse_radiation,direct_normal_irradianceglobal_tilted_irradiance,terrestrial_radiationevapotranspiration,et0_fao_evapotranspiration,vapour_pressure_deficitcape,freezing_level_height
Available Daily Variables
weather_codetemperature_2m_max,temperature_2m_min,temperature_2m_meanapparent_temperature_max,apparent_temperature_min,apparent_temperature_meansunrise,sunset,daylight_duration,sunshine_durationuv_index_max,uv_index_clear_sky_maxprecipitation_sum,rain_sum,showers_sum,snowfall_sumprecipitation_hours,precipitation_probability_maxwind_speed_10m_max,wind_gusts_10m_max,wind_direction_10m_dominantshortwave_radiation_sum,et0_fao_evapotranspiration
Example Configuration
Basic Configuration
{
"locations": [
{
"name": "Berlin",
"latitude": 52.52,
"longitude": 13.41
}
]
}
Full Configuration
{
"api_key": "your-commercial-api-key",
"api_url": "https://customer-api.open-meteo.com",
"locations": [
{
"name": "Berlin",
"latitude": 52.52,
"longitude": 13.41,
"elevation": 34,
"timezone": "Europe/Berlin"
},
{
"name": "New York",
"latitude": 40.71,
"longitude": -74.01,
"timezone": "America/New_York"
}
],
"forecast_days": 14,
"past_days": 2,
"hourly_variables": [
"temperature_2m",
"relative_humidity_2m",
"apparent_temperature",
"precipitation",
"rain",
"snowfall",
"weather_code",
"cloud_cover",
"wind_speed_10m",
"wind_direction_10m",
"wind_gusts_10m",
"uv_index"
],
"daily_variables": [
"weather_code",
"temperature_2m_max",
"temperature_2m_min",
"apparent_temperature_max",
"apparent_temperature_min",
"sunrise",
"sunset",
"precipitation_sum",
"rain_sum",
"snowfall_sum",
"wind_speed_10m_max",
"wind_gusts_10m_max"
],
"current_variables": [
"temperature_2m",
"relative_humidity_2m",
"apparent_temperature",
"is_day",
"precipitation",
"weather_code",
"cloud_cover",
"wind_speed_10m",
"wind_direction_10m"
],
"temperature_unit": "celsius",
"wind_speed_unit": "kmh",
"precipitation_unit": "mm",
"timezone": "auto",
"streams_to_sync": [
"weather_forecast",
"weather_hourly",
"weather_daily",
"weather_current"
]
}
Historical Data Configuration
{
"locations": [
{
"name": "Berlin",
"latitude": 52.52,
"longitude": 13.41
}
],
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"hourly_variables": [
"temperature_2m",
"precipitation",
"weather_code"
],
"streams_to_sync": ["weather_historical"]
}
Usage
Direct Execution
# Show version
tap-openmeteo --version
# Show help
tap-openmeteo --help
# Discover streams
tap-openmeteo --config config.json --discover > catalog.json
# Run sync
tap-openmeteo --config config.json --catalog catalog.json
With Meltano
Add to your meltano.yml:
plugins:
extractors:
- name: tap-openmeteo
namespace: tap_openmeteo
pip_url: git+https://github.com/celine-eu/tap-openmeteo.git
config:
locations:
- name: Berlin
latitude: 52.52
longitude: 13.41
forecast_days: 7
hourly_variables:
- temperature_2m
- precipitation
- weather_code
Run the pipeline:
meltano run tap-openmeteo target-jsonl
Incremental Sync
The tap supports incremental syncing for efficient data updates:
- Hourly/Daily/Historical streams: Use timestamp-based replication keys
- State tracking: Maintains sync state between runs
- Configurable lookback: Use
past_daysto include recent historical data
Weather Models
Open-Meteo combines data from multiple national weather services. You can either:
- Use automatic selection (default): Best models are selected for each location
- Specify models: Set
modelsconfig to use specific weather models
Available models include:
ecmwf_ifs025- ECMWF IFS (global)gfs_seamless- NOAA GFS (global)icon_seamless- DWD ICON (Europe)meteofrance_seamless- Météo-Francejma_seamless- JMA (Japan)gem_seamless- GEM (Canada)- And many more regional models
API Key (Commercial Use)
For commercial use:
- Get an API key from Open-Meteo pricing
- Set
api_keyin your configuration - Use
api_url: https://customer-api.open-meteo.com
Free tier is available for non-commercial use without an API key.
Development
Setup
# Clone the repository
git clone https://github.com/YOUR_ORG/tap-openmeteo.git
cd tap-openmeteo
# Install with dev dependencies
pip install -e ".[dev]"
Running Tests
pytest
Code Quality
# Linting
ruff check .
# Type checking
mypy tap_openmeteo
License
Apache 2.0
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
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
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 tap_openmeteo-0.2.1.tar.gz.
File metadata
- Download URL: tap_openmeteo-0.2.1.tar.gz
- Upload date:
- Size: 162.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c9993136676314ca428534558f4068ddfb1a18b3eda2be8550bd49bf999b3b3
|
|
| MD5 |
7d3dfb66041bcc42b218a78ddfbb3850
|
|
| BLAKE2b-256 |
17f6f6e5bcba0b3dfce46a91ba6cd67ad1b81187b0dc9738691305d4779fce42
|
Provenance
The following attestation bundles were made for tap_openmeteo-0.2.1.tar.gz:
Publisher:
build.yml on celine-eu/tap-openmeteo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tap_openmeteo-0.2.1.tar.gz -
Subject digest:
0c9993136676314ca428534558f4068ddfb1a18b3eda2be8550bd49bf999b3b3 - Sigstore transparency entry: 981830412
- Sigstore integration time:
-
Permalink:
celine-eu/tap-openmeteo@c499fd643a52f82c9f62b91f0a5f027429437d09 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/celine-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@c499fd643a52f82c9f62b91f0a5f027429437d09 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tap_openmeteo-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tap_openmeteo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf13071845b2d381589c2a32c14eb45ad853876d08eeab91ed68a95573aca7e
|
|
| MD5 |
aca3a5e68eae5649f20fb231140c2c77
|
|
| BLAKE2b-256 |
9e76c12d6f9941dc669f75e9e1cbc943c63b169869ae1bdf79fb425e21bc38dc
|
Provenance
The following attestation bundles were made for tap_openmeteo-0.2.1-py3-none-any.whl:
Publisher:
build.yml on celine-eu/tap-openmeteo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tap_openmeteo-0.2.1-py3-none-any.whl -
Subject digest:
abf13071845b2d381589c2a32c14eb45ad853876d08eeab91ed68a95573aca7e - Sigstore transparency entry: 981830471
- Sigstore integration time:
-
Permalink:
celine-eu/tap-openmeteo@c499fd643a52f82c9f62b91f0a5f027429437d09 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/celine-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@c499fd643a52f82c9f62b91f0a5f027429437d09 -
Trigger Event:
push
-
Statement type: