llama-index-readers-readwise


Namellama-index-readers-readwise JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index readers readwise integration
upload_time2024-08-22 06:54:56
maintaineralexbowe
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords highlights pkm reading readwise
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Readwise Reader

```bash
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](https://readwise.io/access_token).

## Usage

Here is an example usage of the Readwise Reader:

```python
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:

```python
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](https://github.com/run-llama/llama_index/).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-readers-readwise",
    "maintainer": "alexbowe",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": "highlights, pkm, reading, readwise",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/1b/c3/34c902dc05bf1738755e4c21c5b117974a892e69b7456b3792eee7ab710e/llama_index_readers_readwise-0.2.0.tar.gz",
    "platform": null,
    "description": "# Readwise Reader\n\n```bash\npip install llama-index-readers-readwise\n```\n\nUse Readwise's export API to fetch your highlights from web articles, epubs, pdfs, Kindle, YouTube, and load the resulting text into LLMs.\n\n## Setup\n\n1. Get your Readwise API key from [readwise.io/access_token](https://readwise.io/access_token).\n\n## Usage\n\nHere is an example usage of the Readwise Reader:\n\n```python\nimport os\nfrom llama_index.core import VectorStoreIndex, download_loader\n\nfrom llama_index.readers.readwise import ReadwiseReader\n\ntoken = os.getenv(\"READWISE_API_KEY\")\nloader = ReadwiseReader(api_key=token)\ndocuments = loader.load_data()\nindex = VectorStoreIndex.from_documents(documents)\n\nindex.query(\"What was the paper 'Attention is all you need' about?\")\n```\n\nYou can also query for highlights that have been created after a certain time:\n\n```python\nimport os\nimport datetime\nfrom llama_index.core import VectorStoreIndex, download_loader\n\nfrom llama_index.readers.readwise import ReadwiseReader\n\ntoken = os.getenv(\"READWISE_API_KEY\")\nloader = ReadwiseReader(api_key=token)\nseven_days_ago = datetime.datetime.now() - datetime.timedelta(days=7)\ndocuments = loader.load_data(updated_after=seven_days_ago)\nindex = VectorStoreIndex.from_documents(documents)\n\nindex.query(\"What has Elon Musk done this time?\")\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers readwise integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [
        "highlights",
        " pkm",
        " reading",
        " readwise"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "34562b6efc7a5081ffcfcf09a5a43ff9cb68212c2ca329bc36e160e4b1380b58",
                "md5": "c2aed4d3b1cdc3c1c7983c708011513f",
                "sha256": "f6d6bdc9d08ce2f4e24c0ff315ab2b63513142070ada6c61f6e832f34d57e84b"
            },
            "downloads": -1,
            "filename": "llama_index_readers_readwise-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c2aed4d3b1cdc3c1c7983c708011513f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2889,
            "upload_time": "2024-08-22T06:54:55",
            "upload_time_iso_8601": "2024-08-22T06:54:55.340027Z",
            "url": "https://files.pythonhosted.org/packages/34/56/2b6efc7a5081ffcfcf09a5a43ff9cb68212c2ca329bc36e160e4b1380b58/llama_index_readers_readwise-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1bc334c902dc05bf1738755e4c21c5b117974a892e69b7456b3792eee7ab710e",
                "md5": "d5d3e3c85d27b4f1e59b1f5471c6e9b0",
                "sha256": "ae77767177696c9651cb0c960a6abbe1c806bc13f1a151223050baa69aafdb53"
            },
            "downloads": -1,
            "filename": "llama_index_readers_readwise-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d5d3e3c85d27b4f1e59b1f5471c6e9b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 2646,
            "upload_time": "2024-08-22T06:54:56",
            "upload_time_iso_8601": "2024-08-22T06:54:56.560734Z",
            "url": "https://files.pythonhosted.org/packages/1b/c3/34c902dc05bf1738755e4c21c5b117974a892e69b7456b3792eee7ab710e/llama_index_readers_readwise-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 06:54:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-readwise"
}
        
Elapsed time: 4.98867s