llama-index readers weather integration
Project description
Weather Loader
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 import download_loader
WeatherReader = download_loader("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 and/or subsequently used as a Tool in a LangChain Agent. See here for examples.
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
Built Distribution
Hashes for llama_index_readers_weather-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98eb5dff7c0d06dd8f3c8cca63e08064a1a9f6566e51f70e9f20486f826e0b6 |
|
MD5 | e00a312509ac23ab1590db462e5326dd |
|
BLAKE2b-256 | d7bcfcb5cab890649293751c58ee078ec02982144b4b029091429ed806e55ab5 |
Hashes for llama_index_readers_weather-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd8723f6944174fd95f99c79d4f40fe1be615309bddf5d7bb572d7b1d6f4963d |
|
MD5 | b4c1d21d676b7e511e02b55dde722af5 |
|
BLAKE2b-256 | fa62fbab3f2bb2bfdf9aef004fed220f6f47577cd8c85dfe4a01f62ff4558efe |