llama-index-readers-readwise


Namellama-index-readers-readwise JSON
Version 0.1.2 PyPI version JSON
download
home_page
Summaryllama-index readers readwise integration
upload_time2024-02-13 21:41:03
maintaineralexbowe
docs_urlNone
authorYour Name
requires_python>=3.8.1,<3.12
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

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 import VectorStoreIndex, download_loader

ReadwiseReader = download_loader("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 import VectorStoreIndex, download_loader

ReadwiseReader = download_loader("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/tree/main/llama_index) and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "llama-index-readers-readwise",
    "maintainer": "alexbowe",
    "docs_url": null,
    "requires_python": ">=3.8.1,<3.12",
    "maintainer_email": "",
    "keywords": "highlights,pkm,reading,readwise",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/e7/c0/268f7832e59d131fd83ecf36057a63f8a41fe156c2466dc8c81752244a30/llama_index_readers_readwise-0.1.2.tar.gz",
    "platform": null,
    "description": "# Readwise Reader\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 import VectorStoreIndex, download_loader\n\nReadwiseReader = download_loader(\"ReadwiseReader\")\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 import VectorStoreIndex, download_loader\n\nReadwiseReader = download_loader(\"ReadwiseReader\")\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/tree/main/llama_index) and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers readwise integration",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "highlights",
        "pkm",
        "reading",
        "readwise"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d705c4aa0792a21f602c29c8daa4205df66a53014bdc07dda3c30b4178cad22",
                "md5": "147893a4681ac9c7d98bfde6807e654e",
                "sha256": "d57872b98e5e02e05eb8a04e6709c75c0327f91310f02fb8392a63198a6e90b1"
            },
            "downloads": -1,
            "filename": "llama_index_readers_readwise-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "147893a4681ac9c7d98bfde6807e654e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<3.12",
            "size": 3151,
            "upload_time": "2024-02-13T21:41:01",
            "upload_time_iso_8601": "2024-02-13T21:41:01.535166Z",
            "url": "https://files.pythonhosted.org/packages/8d/70/5c4aa0792a21f602c29c8daa4205df66a53014bdc07dda3c30b4178cad22/llama_index_readers_readwise-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7c0268f7832e59d131fd83ecf36057a63f8a41fe156c2466dc8c81752244a30",
                "md5": "fbce061581e6bae315a810fdd5b089ff",
                "sha256": "5048619fcf1402e02dae22a3890044a48bd66615396e2f4f4fb13e2556cb89ea"
            },
            "downloads": -1,
            "filename": "llama_index_readers_readwise-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fbce061581e6bae315a810fdd5b089ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<3.12",
            "size": 2712,
            "upload_time": "2024-02-13T21:41:03",
            "upload_time_iso_8601": "2024-02-13T21:41:03.346487Z",
            "url": "https://files.pythonhosted.org/packages/e7/c0/268f7832e59d131fd83ecf36057a63f8a41fe156c2466dc8c81752244a30/llama_index_readers_readwise-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-13 21:41:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-readwise"
}
        
Elapsed time: 0.17706s