Skip to main content

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

  1. 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


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_readwise-0.5.0.tar.gz (4.1 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_readwise-0.5.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for llama_index_readers_readwise-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cb51765d4b8cfabae4ea4fd84e41bf122121de3ab02e3aad0c82ee82ffb9a697
MD5 60dba7a3201d2d7e483eae49a232d9dc
BLAKE2b-256 1624a752c5e651688e6cb33a3ee3916e7a6512372bb82a4fdda565abc3c20aee

See more details on using hashes here.

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

Hashes for llama_index_readers_readwise-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b61d87abe42c9952c5815bf917c60ca6c55714996f15b5cb144d87875a48bcda
MD5 e8588b966d3b51954d0a601cb0aa5c43
BLAKE2b-256 3936fbe5441a6f8e4208b0395a1b78a1b37e6bf94b0a4e5da8c3427c70a22e03

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