llama-index readers readwise integration
Project description
Readwise Reader
pip install llama-index-readers-readwise
Use Readwise's export API to fetch your highlights from web articles, epubs, pdfs, Kindle, YouTube, and load the resulting text into LLMs.
Setup
- Get your Readwise API key from readwise.io/access_token.
Usage
Here is an example usage of the Readwise Reader:
import os
from llama_index.core import VectorStoreIndex, download_loader
from llama_index.readers.readwise import ReadwiseReader
token = os.getenv("READWISE_API_KEY")
loader = ReadwiseReader(api_key=token)
documents = loader.load_data()
index = VectorStoreIndex.from_documents(documents)
index.query("What was the paper 'Attention is all you need' about?")
You can also query for highlights that have been created after a certain time:
import os
import datetime
from llama_index.core import VectorStoreIndex, download_loader
from llama_index.readers.readwise import ReadwiseReader
token = os.getenv("READWISE_API_KEY")
loader = ReadwiseReader(api_key=token)
seven_days_ago = datetime.datetime.now() - datetime.timedelta(days=7)
documents = loader.load_data(updated_after=seven_days_ago)
index = VectorStoreIndex.from_documents(documents)
index.query("What has Elon Musk done this time?")
This loader is designed to be used as a way to load data into LlamaIndex.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_readers_readwise-0.5.0.tar.gz.
File metadata
- Download URL: llama_index_readers_readwise-0.5.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb51765d4b8cfabae4ea4fd84e41bf122121de3ab02e3aad0c82ee82ffb9a697
|
|
| MD5 |
60dba7a3201d2d7e483eae49a232d9dc
|
|
| BLAKE2b-256 |
1624a752c5e651688e6cb33a3ee3916e7a6512372bb82a4fdda565abc3c20aee
|
File details
Details for the file llama_index_readers_readwise-0.5.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_readers_readwise-0.5.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b61d87abe42c9952c5815bf917c60ca6c55714996f15b5cb144d87875a48bcda
|
|
| MD5 |
e8588b966d3b51954d0a601cb0aa5c43
|
|
| BLAKE2b-256 |
3936fbe5441a6f8e4208b0395a1b78a1b37e6bf94b0a4e5da8c3427c70a22e03
|