Skip to main content

llama-index readers weather integration

Project description

Weather Loader

pip install llama-index-readers-weather

This loader fetches the weather data from the OpenWeatherMap's OneCall API, using the pyowm Python package. You must initialize the loader with your OpenWeatherMap API token, and then pass in the names of the cities you want the weather data for.

OWM's One Call API provides the following weather data for any geographical coordinate: - Current weather - Hourly forecast for 48 hours - Daily forecast for 7 days

Usage

To use this loader, you need to pass in an array of city names (eg. [chennai, chicago]). Pass in the country codes as well for better accuracy.

from llama_index.readers.weather import WeatherReader

loader = WeatherReader(token="[YOUR_TOKEN]")
documents = loader.load_data(places=["Chennai, IN", "Dublin, IE"])

This loader is designed to be used as a way to load data into LlamaIndex.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_weather-0.4.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_weather-0.4.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_weather-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_weather-0.4.0.tar.gz
Algorithm Hash digest
SHA256 aa0ac79495ce296639527076959009ba7df103db319f9f9934d23af9a0e713df
MD5 1de5e031cd34cb0957c02ac2aaa9216f
BLAKE2b-256 b9663e8778b3dd3c8925e60afe635f6338d603d9ee1863304e71c441e2dfb3b5

See more details on using hashes here.

File details

Details for the file llama_index_readers_weather-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_weather-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce931a30abbfc56bc23186a0852c1a52e61400281e8d0149e205b111d54d7163
MD5 5812fd24ca9c1d8b66b8ce41747ee189
BLAKE2b-256 8de427f30e4ee7537c402e756c63901deae851ddd2e58027d793a0cc9af90559

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page