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.3.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for llama_index_readers_weather-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a0693633f61a566f2963824314e58690a6c38447ddfce6018162d2cd5de97804
MD5 0cfeb8644c4989c76cc5dd16f0d22631
BLAKE2b-256 67a4840bc9fb8937615fe311fd7146d5899f6d4620628cd962bf657a5c457b54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_weather-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98cde3e1dc157297761fb9bdf488fe4f47cd3eba44fbbe48187f32bb6671002c
MD5 fc1fcfef294fc311c60d78cb54dea5bb
BLAKE2b-256 9c60a7d1d2a35f2c71468f72af89aa050d97ceac808dbddf34405b857e4b4926

See more details on using hashes here.

Supported by

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