ProvidersMoreOpenWeatherMapOn this pageOpenWeatherMapOpenWeatherMap provides all essential weather data for a specific location:Current weatherMinute forecast for 1 hourHourly forecast for 48 hoursDaily forecast for 8 daysNational weather alertsHistorical weather data for 40+ years backThis page covers how to use the OpenWeatherMap API within LangChain.Installation and Setup​Install requirements withpip install pyowmGo to OpenWeatherMap and sign up for an account to get your API key hereSet your API key as OPENWEATHERMAP_API_KEY environment variableWrappers​Utility​There exists a OpenWeatherMapAPIWrapper utility which wraps this API. To import this utility:from langchain.utilities.openweathermap import OpenWeatherMapAPIWrapperFor a more detailed walkthrough of this wrapper, see this notebook.Tool​You can also easily load this wrapper as a Tool (to use with an Agent).
You can do this with:from langchain.agents import load_toolstools = load_tools(["openweathermap-api"])For more information on tools, see this page.PreviousOpenSearchNextPetalsInstallation and SetupWrappersUtilityTool