[PR #24] [MERGED] feat: Add Weather server using free, no API key needed open-meteo.com API #4

Closed
opened 2026-02-15 20:17:03 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/openapi-servers/pull/24
Author: @taylorwilsdon
Created: 4/6/2025
Status: Merged
Merged: 4/8/2025
Merged by: @tjbck

Base: mainHead: weather_server


📝 Commits (2)

  • 3a4036c Add weather server
  • 381a4b5 Implement support for automatic F/C designation based on location of weather call

📊 Changes

5 files changed (+212 additions, -0 deletions)

View changed files

servers/weather/.dockerignore (+34 -0)
servers/weather/Dockerfile (+51 -0)
servers/weather/compose.yaml (+7 -0)
servers/weather/main.py (+112 -0)
servers/weather/requirements.txt (+8 -0)

📄 Description

Add Weather API Tool using Open-Meteo

Summary

This PR introduces a new weather retrieval API tool powered by Open-Meteo, allowing users to fetch current weather conditions and hourly forecasts based on latitude and longitude.

Screenshots:
image
weather_forecast_tool

Features

  • Endpoint: /forecast
  • Retrieves:
    • Current weather conditions:
      • Temperature at 2m
      • Wind speed at 10m
    • Hourly forecast data:
      • Temperature at 2m
      • Relative humidity at 2m
      • Wind speed at 10m
  • Automatically handles timezone detection.
  • Robust error handling with clear HTTP exceptions.

Implementation Details

  • Utilizes FastAPI and Pydantic for structured and validated responses.
  • Incorporates CORS middleware for broader compatibility.
  • Adds comprehensive inline documentation and descriptive schema annotations.

Dependencies

  • requests added for external API calls.
  • FastAPI's Query parameter handling for latitude and longitude.

Testing

Manual testing confirmed successful retrieval of weather data from the Open-Meteo API.

Usage Example

GET /forecast?latitude=52.52&longitude=13.41

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/openapi-servers/pull/24 **Author:** [@taylorwilsdon](https://github.com/taylorwilsdon) **Created:** 4/6/2025 **Status:** ✅ Merged **Merged:** 4/8/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `weather_server` --- ### 📝 Commits (2) - [`3a4036c`](https://github.com/open-webui/openapi-servers/commit/3a4036caed0e869cceb58c99fda149bf0522134c) Add weather server - [`381a4b5`](https://github.com/open-webui/openapi-servers/commit/381a4b5e22b104f3970377da17c0796e71c87023) Implement support for automatic F/C designation based on location of weather call ### 📊 Changes **5 files changed** (+212 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `servers/weather/.dockerignore` (+34 -0) ➕ `servers/weather/Dockerfile` (+51 -0) ➕ `servers/weather/compose.yaml` (+7 -0) ➕ `servers/weather/main.py` (+112 -0) ➕ `servers/weather/requirements.txt` (+8 -0) </details> ### 📄 Description ## Add Weather API Tool using Open-Meteo ### Summary This PR introduces a new weather retrieval API tool powered by Open-Meteo, allowing users to fetch current weather conditions and hourly forecasts based on latitude and longitude. Screenshots: <img width="887" alt="image" src="https://github.com/user-attachments/assets/f6cce501-e8c0-4a29-9743-510566ed67e7" /> <img width="694" alt="weather_forecast_tool" src="https://github.com/user-attachments/assets/454c1f77-f102-4468-a54e-f1c763e0e3f1" /> ### Features - **Endpoint**: `/forecast` - Retrieves: - Current weather conditions: - Temperature at 2m - Wind speed at 10m - Hourly forecast data: - Temperature at 2m - Relative humidity at 2m - Wind speed at 10m - Automatically handles timezone detection. - Robust error handling with clear HTTP exceptions. ### Implementation Details - Utilizes FastAPI and Pydantic for structured and validated responses. - Incorporates CORS middleware for broader compatibility. - Adds comprehensive inline documentation and descriptive schema annotations. ### Dependencies - `requests` added for external API calls. - FastAPI's `Query` parameter handling for latitude and longitude. ### Testing Manual testing confirmed successful retrieval of weather data from the Open-Meteo API. ### Usage Example ```bash GET /forecast?latitude=52.52&longitude=13.41 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:17:03 -05:00
yindo closed this issue 2026-02-15 20:17:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/openapi-servers#4