openmeteopy icon indicating copy to clipboard operation
openmeteopy copied to clipboard

OpenMeteo class missing .fetch() and .get_data() methods in latest release

Open chaz-clark opened this issue 2 months ago • 0 comments

Describe the bug After upgrading to the latest openmeteopy release from PyPI (as of Oct 2025), the OpenMeteo client no longer exposes either the .fetch() or .get_data() methods. Both were present in earlier versions and are still referenced in the official documentation and examples. This causes all existing integrations and tutorials to fail with AttributeError.

To Reproduce Steps to reproduce the behavior: 1. Create a clean Python 3.12 environment or rebuild an Airflow container. 2. Install the latest version of openmeteopy from PyPI. pip install openmeteopy

3.	Run the following example:

        from openmeteopy.client import OpenMeteo
        from openmeteopy.options.historical import HistoricalOptions
        from openmeteopy.daily.historical import DailyHistorical
        
        options = HistoricalOptions(
            latitude=40.7128,
            longitude=-74.0060,
            start_date="2025-10-30",
            end_date="2025-10-30"
        )
        daily = DailyHistorical()
        daily.temperature_2m_max()
        daily.temperature_2m_min()
        
        om = OpenMeteo(options, daily=daily)
        data = om.fetch()      # or om.get_data()

4.	The call fails with
        `AttributeError: 'OpenMeteo' object has no attribute 'fetch'`
            and the same occurs if using .get_data().

Expected behavior OpenMeteo should expose either .fetch() or .get_data() (as documented) that returns a weather dataset for the provided parameters. This was the behavior in earlier versions (e.g., openmeteopy==0.2.3).

Desktop (please complete the following information): • OS: Linux (Airflow Docker image, Debian Bookworm base) • Browser: N/A • Version: Python 3.12.10, Airflow 3.0.0

Additional context • The package worked correctly prior to rebuilding Docker with the latest dependencies. • Reverting to openmeteopy==0.2.3 restores the .fetch() method and expected behavior. • The latest release on PyPI appears to have removed or refactored this method without documentation. • Please clarify the current API or restore backward compatibility for .fetch() / .get_data().

chaz-clark avatar Oct 30 '25 01:10 chaz-clark