Install & Compatibility
Where this runs
tested against v1.7.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.897s · 37.7MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 3.3s · import 0.811s · 37MB
36MB installed
● package 36MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ import openmeteo_requests
om = openmeteo_requests.Client()
✗ from openmeteo_requests import Client
The primary client class is typically accessed via the top-level package import.
Variable
✓ from openmeteo_sdk.Variable import Variable
The Variable enum is part of the `openmeteo-sdk` package, not `openmeteo-requests` directly. It is used for filtering and identifying specific weather variables in the FlatBuffers response.
This quickstart initializes the Open-Meteo client, defines weather parameters for a specific location (Berlin), and fetches current and hourly forecast data. It then demonstrates how to access the FlatBuffers-encoded data, specifically extracting current temperature and relative humidity. Note that Open-Meteo's API generally does not require an API key for non-commercial use.
import openmeteo_requests
from openmeteo_sdk.Variable import Variable
# Initialize the Open-Meteo API client
om = openmeteo_requests.Client()
# Define parameters for the weather request
params = {
"latitude": 52.52,
"longitude": 13.41,
"hourly": ["temperature_2m", "precipitation", "wind_speed_10m"],
"current": ["temperature_2m", "relative_humidity_2m"],
"timezone": "Europe/Berlin"
}
# Make the API call
url = "https://api.open-meteo.com/v1/forecast"
responses = om.weather_api(url, params=params)
# Process the first location's response (assuming single location for brevity)
response = responses[0]
print(f"Coordinates: {response.Latitude()}°N {response.Longitude()}°E")
print(f"Elevation: {response.Elevation()} m asl")
print(f"Timezone: {response.Timezone()} {response.TimezoneAbbreviation()}")
print(f"Timezone difference to GMT+0: {response.UtcOffsetSeconds()} s")
# Access current weather data
current = response.Current()
current_variables = list(map(lambda i: current.Variables(i), range(0, current.VariablesLength())))
current_temperature_2m = next(filter(lambda x: x.Variable() == Variable.temperature and x.Altitude() == 2, current_variables))
current_relative_humidity_2m = next(filter(lambda x: x.Variable() == Variable.relative_humidity and x.Altitude() == 2, current_variables))
print(f"Current time: {current.Time()}")
print(f"Current temperature_2m: {current_temperature_2m.Value()} °C")
print(f"Current relative_humidity_2m: {current_relative_humidity_2m.Value()} %")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'openmeteo_sdk'
The `openmeteo-requests` library depends on `openmeteo_sdk`, and this error occurs when `openmeteo_sdk` is not found or accessible in the Python environment, even if `openmeteo-requests` was installed.
fixEnsure `openmeteo-sdk` is explicitly installed or re-install `openmeteo-requests` to ensure all its dependencies are correctly resolved in your environment: `pip install openmeteo-sdk` or `pip install --upgrade openmeteo-requests`.
ModuleNotFoundError: No module named 'openmeteo_requests'
The `openmeteo-requests` library has not been installed in the current Python environment or is not on the Python path.
fixInstall the library using pip: `pip install openmeteo-requests`.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
This generic pip error indicates a conflict between `openmeteo-requests`'s dependencies (or its sub-dependencies like `flatbuffers`) and other packages already installed in your environment.
fixTry installing `openmeteo-requests` in a fresh virtual environment to isolate its dependencies, or address specific conflicting packages by upgrading or downgrading them as suggested by the error message.
AttributeError: 'Response' object has no attribute 'Latitude'
Data fields from the Open-Meteo API response (which uses FlatBuffers) are accessed as methods (e.g., `Latitude()`), not as direct attributes (e.g., `Latitude`).
fixAccess the data fields by calling them as methods: `response.Latitude()` instead of `response.Latitude`.
Upgrade
Version history
1.7.5latest on PyPI · released Jan 19, 2026
Audit
Dependencies
niquestsrequiredThe client is based on this library for HTTP requests.
openmeteo-sdkrequiredRequired for FlatBuffers data parsing and accessing weather variable definitions (e.g., Variable enum).
requests-cacheoptionalOptional dependency for implementing caching for API requests.