{"library":"openmeteo-sdk","title":"Open-Meteo Python SDK","description":"The Open-Meteo Python SDK provides FlatBuffer data models for interacting with the Open-Meteo weather API. It allows developers to construct API requests and parse API responses using highly efficient binary serialization. The library is actively maintained with frequent updates (often monthly or bi-monthly) to support new weather models and variables as the Open-Meteo API evolves.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install openmeteo-sdk"],"cli":null},"imports":["from openmeteo_sdk.WeatherApiRequest import WeatherApiRequest","from openmeteo_sdk.WeatherApiResponse import WeatherApiResponse","from openmeteo_sdk.Variables import Variables","import flatbuffers"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import requests\nimport flatbuffers\nfrom openmeteo_sdk.WeatherApiRequest import WeatherApiRequest\nfrom openmeteo_sdk.WeatherApiResponse import WeatherApiResponse\nfrom openmeteo_sdk.Variables import Variables\n\ndef get_weather_data(latitude: float, longitude: float):\n    builder = flatbuffers.Builder(0)\n    request = WeatherApiRequest.WeatherApiRequest.StartWeatherApiRequest(builder)\n    WeatherApiRequest.WeatherApiRequest.AddLatitude(request, latitude)\n    WeatherApiRequest.WeatherApiRequest.AddLongitude(request, longitude)\n    WeatherApiRequest.WeatherApiRequest.AddHourly(request, Variables.Variables().TEMPERATURE_2M)\n    WeatherApiRequest.WeatherApiRequest.AddDaily(request, Variables.Variables().SUNSHINE_DURATION)\n    WeatherApiRequest.WeatherApiRequest.AddTimezone(request, builder.CreateString(\"Europe/Berlin\"))\n    request_object = WeatherApiRequest.WeatherApiRequest.EndWeatherApiRequest(builder)\n    builder.Finish(request_object)\n\n    # Send request to Open-Meteo API\n    response = requests.post(\n        \"https://api.open-meteo.com/v1/forecast?models=gfs_seamless\",\n        data=builder.Output(),\n        headers={\n            \"Content-Type\": \"application/flatbuffers\",\n            \"Accept\": \"application/flatbuffers\"\n        }\n    )\n    response.raise_for_status()\n\n    # Parse response\n    weather_api_response = WeatherApiResponse.WeatherApiResponse.GetRootAsWeatherApiResponse(response.content)\n\n    # Access hourly data\n    if weather_api_response.Hourly() is not None:\n        hourly_temperatures = []\n        for i in range(weather_api_response.Hourly().VariablesLength()):\n            variable = weather_api_response.Hourly().Variables(i)\n            if variable.Variable() == Variables.Variables().TEMPERATURE_2M:\n                for j in range(variable.ValuesLength()):\n                    hourly_temperatures.append(variable.Values(j))\n        print(f\"Hourly Temperatures (2m): {hourly_temperatures[:5]}...\") # Print first 5 for brevity\n\n    # Access daily data\n    if weather_api_response.Daily() is not None:\n        daily_sunshine = []\n        for i in range(weather_api_response.Daily().VariablesLength()):\n            variable = weather_api_response.Daily().Variables(i)\n            if variable.Variable() == Variables.Variables().SUNSHINE_DURATION:\n                for j in range(variable.ValuesLength()):\n                    daily_sunshine.append(variable.Values(j))\n        print(f\"Daily Sunshine Duration: {daily_sunshine[:5]}...\") # Print first 5 for brevity\n\nif __name__ == '__main__':\n    get_weather_data(latitude=52.52, longitude=13.41)\n","lang":"python","description":"This quickstart demonstrates how to use `openmeteo-sdk` to build a FlatBuffer request for weather data, send it to the Open-Meteo API using the `requests` library, and then parse the binary FlatBuffer response to extract hourly temperatures and daily sunshine duration. It highlights the use of `flatbuffers.Builder` for request creation and direct access to data via the generated `WeatherApiResponse` classes.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"1.26.0","pypi_latest":"1.26.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.2M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"20.1M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"12.0M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.7M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.7M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"openmeteo-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"18M"}]}}