llama-index-readers-file


Namellama-index-readers-file JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
Summaryllama-index readers file integration
upload_time2024-11-18 00:16:00
maintainerFarisHijazi
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
licenseMIT
keywords 10k 10q chart eml figure html hwp image invoice ipynb jupyter notebook pdf pymupdf receipt sec spreadsheet tabular unstructured.io yaml yml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LlamaIndex Readers Integration: File

```bash
pip install llama-index-readers-file
```

This is the default integration for different loaders that are used within `SimpleDirectoryReader`.

Provides support for the following loaders:

- DocxReader
- HWPReader
- PDFReader
- EpubReader
- FlatReader
- HTMLTagReader
- ImageCaptionReader
- ImageReader
- ImageVisionLLMReader
- IPYNBReader
- MarkdownReader
- MboxReader
- PptxReader
- PandasCSVReader
- VideoAudioReader
- UnstructuredReader
- PyMuPDFReader
- ImageTabularChartReader
- XMLReader
- PagedCSVReader
- CSVReader
- RTFReader

## Installation

```bash
pip install llama-index-readers-file
```

## Usage

Once installed, You can import any of the loader. Here's an example usage of one of the loader.

```python
from llama_index.core import SimpleDirectoryReader
from llama_index.readers.file import (
    DocxReader,
    HWPReader,
    PDFReader,
    EpubReader,
    FlatReader,
    HTMLTagReader,
    ImageCaptionReader,
    ImageReader,
    ImageVisionLLMReader,
    IPYNBReader,
    MarkdownReader,
    MboxReader,
    PptxReader,
    PandasCSVReader,
    VideoAudioReader,
    UnstructuredReader,
    PyMuPDFReader,
    ImageTabularChartReader,
    XMLReader,
    PagedCSVReader,
    CSVReader,
    RTFReader,
)

# PDF Reader with `SimpleDirectoryReader`
parser = PDFReader()
file_extractor = {".pdf": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Docx Reader example
parser = DocxReader()
file_extractor = {".docx": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# HWP Reader example
parser = HWPReader()
file_extractor = {".hwp": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Epub Reader example
parser = EpubReader()
file_extractor = {".epub": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Flat Reader example
parser = FlatReader()
file_extractor = {".txt": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# HTML Tag Reader example
parser = HTMLTagReader()
file_extractor = {".html": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Image Reader example
parser = ImageReader()
file_extractor = {
    ".jpg": parser,
    ".jpeg": parser,
    ".png": parser,
}  # Add other image formats as needed
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# IPYNB Reader example
parser = IPYNBReader()
file_extractor = {".ipynb": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Markdown Reader example
parser = MarkdownReader()
file_extractor = {".md": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Mbox Reader example
parser = MboxReader()
file_extractor = {".mbox": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Pptx Reader example
parser = PptxReader()
file_extractor = {".pptx": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()


# Pandas CSV Reader example
parser = PandasCSVReader()
file_extractor = {".csv": parser}  # Add other CSV formats as needed
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# PyMuPDF Reader example
parser = PyMuPDFReader()
file_extractor = {".pdf": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# XML Reader example
parser = XMLReader()
file_extractor = {".xml": parser}
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# Paged CSV Reader example
parser = PagedCSVReader()
file_extractor = {".csv": parser}  # Add other CSV formats as needed
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()

# CSV Reader example
parser = CSVReader()
file_extractor = {".csv": parser}  # Add other CSV formats as needed
documents = SimpleDirectoryReader(
    "./data", file_extractor=file_extractor
).load_data()
```

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-file",
    "maintainer": "FarisHijazi",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "10k, 10q, chart, eml, figure, html, hwp, image, invoice, ipynb, jupyter, notebook, pdf, pymupdf, receipt, sec, spreadsheet, tabular, unstructured.io, yaml, yml",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/b3/6a/06c04c5b4af56dfb7e41e38b9f34c34c7d17c9161a5347f4ffaf528ef186/llama_index_readers_file-0.4.0.tar.gz",
    "platform": null,
    "description": "# LlamaIndex Readers Integration: File\n\n```bash\npip install llama-index-readers-file\n```\n\nThis is the default integration for different loaders that are used within `SimpleDirectoryReader`.\n\nProvides support for the following loaders:\n\n- DocxReader\n- HWPReader\n- PDFReader\n- EpubReader\n- FlatReader\n- HTMLTagReader\n- ImageCaptionReader\n- ImageReader\n- ImageVisionLLMReader\n- IPYNBReader\n- MarkdownReader\n- MboxReader\n- PptxReader\n- PandasCSVReader\n- VideoAudioReader\n- UnstructuredReader\n- PyMuPDFReader\n- ImageTabularChartReader\n- XMLReader\n- PagedCSVReader\n- CSVReader\n- RTFReader\n\n## Installation\n\n```bash\npip install llama-index-readers-file\n```\n\n## Usage\n\nOnce installed, You can import any of the loader. Here's an example usage of one of the loader.\n\n```python\nfrom llama_index.core import SimpleDirectoryReader\nfrom llama_index.readers.file import (\n    DocxReader,\n    HWPReader,\n    PDFReader,\n    EpubReader,\n    FlatReader,\n    HTMLTagReader,\n    ImageCaptionReader,\n    ImageReader,\n    ImageVisionLLMReader,\n    IPYNBReader,\n    MarkdownReader,\n    MboxReader,\n    PptxReader,\n    PandasCSVReader,\n    VideoAudioReader,\n    UnstructuredReader,\n    PyMuPDFReader,\n    ImageTabularChartReader,\n    XMLReader,\n    PagedCSVReader,\n    CSVReader,\n    RTFReader,\n)\n\n# PDF Reader with `SimpleDirectoryReader`\nparser = PDFReader()\nfile_extractor = {\".pdf\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Docx Reader example\nparser = DocxReader()\nfile_extractor = {\".docx\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# HWP Reader example\nparser = HWPReader()\nfile_extractor = {\".hwp\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Epub Reader example\nparser = EpubReader()\nfile_extractor = {\".epub\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Flat Reader example\nparser = FlatReader()\nfile_extractor = {\".txt\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# HTML Tag Reader example\nparser = HTMLTagReader()\nfile_extractor = {\".html\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Image Reader example\nparser = ImageReader()\nfile_extractor = {\n    \".jpg\": parser,\n    \".jpeg\": parser,\n    \".png\": parser,\n}  # Add other image formats as needed\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# IPYNB Reader example\nparser = IPYNBReader()\nfile_extractor = {\".ipynb\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Markdown Reader example\nparser = MarkdownReader()\nfile_extractor = {\".md\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Mbox Reader example\nparser = MboxReader()\nfile_extractor = {\".mbox\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Pptx Reader example\nparser = PptxReader()\nfile_extractor = {\".pptx\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n\n# Pandas CSV Reader example\nparser = PandasCSVReader()\nfile_extractor = {\".csv\": parser}  # Add other CSV formats as needed\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# PyMuPDF Reader example\nparser = PyMuPDFReader()\nfile_extractor = {\".pdf\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# XML Reader example\nparser = XMLReader()\nfile_extractor = {\".xml\": parser}\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# Paged CSV Reader example\nparser = PagedCSVReader()\nfile_extractor = {\".csv\": parser}  # Add other CSV formats as needed\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\n\n# CSV Reader example\nparser = CSVReader()\nfile_extractor = {\".csv\": parser}  # Add other CSV formats as needed\ndocuments = SimpleDirectoryReader(\n    \"./data\", file_extractor=file_extractor\n).load_data()\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 file integration",
    "version": "0.4.0",
    "project_urls": null,
    "split_keywords": [
        "10k",
        " 10q",
        " chart",
        " eml",
        " figure",
        " html",
        " hwp",
        " image",
        " invoice",
        " ipynb",
        " jupyter",
        " notebook",
        " pdf",
        " pymupdf",
        " receipt",
        " sec",
        " spreadsheet",
        " tabular",
        " unstructured.io",
        " yaml",
        " yml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7c0b410d03c364b5773015e0b520580cf2ce9e4a7e568ae1f3704034cb5f083",
                "md5": "f7f732397583acd98276558fbeedbfc2",
                "sha256": "437a38d63d4e254168980dd17c6eccde18cb97876fb9fffae9da3dfe6737d0fe"
            },
            "downloads": -1,
            "filename": "llama_index_readers_file-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7f732397583acd98276558fbeedbfc2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 38888,
            "upload_time": "2024-11-18T00:15:58",
            "upload_time_iso_8601": "2024-11-18T00:15:58.625564Z",
            "url": "https://files.pythonhosted.org/packages/a7/c0/b410d03c364b5773015e0b520580cf2ce9e4a7e568ae1f3704034cb5f083/llama_index_readers_file-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b36a06c04c5b4af56dfb7e41e38b9f34c34c7d17c9161a5347f4ffaf528ef186",
                "md5": "509c620f52ad7021d435c32eb15fe3b0",
                "sha256": "7828dec1feb7c53e6d3140385f8499c0e7ac746265299384714ddfd163f9d15a"
            },
            "downloads": -1,
            "filename": "llama_index_readers_file-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "509c620f52ad7021d435c32eb15fe3b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 22435,
            "upload_time": "2024-11-18T00:16:00",
            "upload_time_iso_8601": "2024-11-18T00:16:00.322094Z",
            "url": "https://files.pythonhosted.org/packages/b3/6a/06c04c5b4af56dfb7e41e38b9f34c34c7d17c9161a5347f4ffaf528ef186/llama_index_readers_file-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 00:16:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-file"
}
        
Elapsed time: 0.61304s