Skip to main content

Open Weather Map Tool

This tool connects to the OpenWeatherMap's OneCall API, using the pyowm Python package. You must initialize the tool with your OpenWeatherMap API token

The tool has access to the following functions:

  • the current weather
  • the weather tomorrow

Usage

Here's an example usage of the OpenWeatherMapToolSpec.

from llama_index.tools.weather import OpenWeatherMapToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = OpenWeatherMapToolSpec(key="...")

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("What is the temperature like in Paris?"))
print(await agent.run("What is the wind like in Budapest tomorrow?"))

weather_at_location: Use pyowm to get current weather details at a location

forecast_tomorrow_at_location: Use pyowm to get the forecast for tomorrow at a location.

Metadata

Release files for llama-index-tools-weather 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-weather 0.6.0
File Size Uploaded Provenance Actions
llama_index_tools_weather-0.6.0.tar.gz 4.5 kB Without provenance Details for llama_index_tools_weather-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-weather 0.6.0
File Interpreter ABI Platform Actions
llama_index_tools_weather-0.6.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_weather-0.6.0-py3-none-any.whl

Total release size: 8.6 kB

Release files / llama_index_tools_weather-0.6.0.tar.gz

Download URL llama_index_tools_weather-0.6.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9c4d414b78f4dd5b0142d6df3b15964022caa0ea367528252c5b03706e6b7282
BLAKE2b-256 checksum
How to use checksums
0c43619c8cd8412bf8afc326cd3a5580ae1947695aafb73daceb188ee57f477a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_tools_weather-0.6.0-py3-none-any.whl

Download URL llama_index_tools_weather-0.6.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36ebbeb691a9c5f4b8748d7f38f8a0bb957d8e676a6c79d4af7ad4837e141c8b
BLAKE2b-256 checksum
How to use checksums
db9c11b3ed5e8fe015e0d177972f7469f08c07124302349f0f31a6eebf6c6850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-tools-weather 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page