Skip to main content

AI-Parrot Loaders

ai-parrot-loaders provides document loaders for AI-Parrot RAG (Retrieval-Augmented Generation) pipelines. Each loader transforms a specific document format into text chunks that can be embedded and searched.

Installation

pip install ai-parrot-loaders

Install only the extras you need:

pip install ai-parrot-loaders[pdf]
pip install ai-parrot-loaders[youtube]
pip install ai-parrot-loaders[audio]
pip install ai-parrot-loaders[web]

# Everything
pip install ai-parrot-loaders[all]

Available Extras

Extra Description
pdf PDF loading with OCR support (PaddleOCR)
youtube YouTube transcript and video download
audio Audio transcription (WhisperX, pyannote)
web HTML/web page loading
ebook Structured EPUB and MOBI e-book loading
documents PDF, DOCX, EPUB, and MOBI ingestion without OCR dependencies
video Video processing (MoviePy, FFmpeg)

Supported Formats

uv pip install 'ai-parrot[wiki]' automatically installs ai-parrot-loaders[documents] and the parsing dependencies for PDF, DOCX, EPUB, and MOBI. To use those loaders independently, install uv pip install 'ai-parrot-loaders[documents]'.

The documents extra uses the native PDF and DOCX loaders plus the ebook extra. The existing document extra is separate and supplies Mammoth for document conversion; pdf includes the broader OCR stack.

Loader Format Description
TextLoader .txt Plain text files
CSVLoader .csv CSV files
ExcelLoader .xlsx, .xls Excel spreadsheets
MSWordLoader .docx Microsoft Word documents
HTMLLoader .html HTML files
MarkdownLoader .md Markdown files
PDFLoader .pdf PDF documents
PDFMarkdownLoader .pdf PDF to Markdown conversion
PDFTablesLoader .pdf PDF table extraction
PowerPointLoader .pptx PowerPoint presentations
EpubLoader .epub EPUB e-books
MobiLoader .mobi MOBI/KF8 e-books via KindleUnpack
WebLoader URL Web pages
YoutubeLoader URL YouTube video transcripts
VimeoLoader URL Vimeo video transcripts
AudioLoader .mp3, .wav, etc. Audio transcription
VideoLoader URL Video download + transcription
VideoLocalLoader .mp4, etc. Local video transcription
DocumentConverterLoader multiple Auto-detect format and convert

Quick Start

Structured EPUB and MOBI books

Install the optional ebook dependencies:

uv pip install 'ai-parrot-loaders[ebook]'

This includes ebooklib, beautifulsoup4, markdownify, and mobi (KindleUnpack).

from parrot_loaders.epubloader import EpubLoader
from parrot_loaders.mobiloader import MobiLoader
from parrot.loaders.ebook import ebook_sections

documents = await EpubLoader("book.epub").load()
sections = ebook_sections(documents)
await pageindex.insert_ebook("my-book", [section.model_dump() for section in sections])

# Same output contract and loader options for MOBI:
mobi_documents = await MobiLoader("book.mobi").load()

Create the PageIndex tree before inserting. Bookstore, GraphIndex and wiki ingestion select this structural path automatically for EPUB and MOBI documents.

bookstore add book.mobi --no-llm

MOBI support handles unencrypted MOBI7 HTML/NCX and KF8 EPUB output. MOBI7 uses NCX navigation when present, then explicit nested HTML navigation, then HTML heading structure. If the source has no hierarchy, the loader cannot recover one that was never encoded. Invalid/encrypted books and PDF-only Print Replica output raise MobiLoaderError. Decoding runs off the event loop with serialized backend calls, and temporary files are removed on both success and failure. Section provenance always refers to the original .mobi source.

Each document contains one section's body and an ebook_section metadata record: section_id, parent_id, title, href (including fragments), depth, toc_order, reading_order, source_uri, target_found, and origin. per_chapter=False returns one readable book document with complete records in ebook_sections. include_toc_document=True adds a nested navigation document.

Navigation parents and short TOC sections are retained even when they have no body. Missing targets remain in the index with target_found=False. When a document has no TOC entries, HTML headings supply its fallback structure. Reading order follows the spine, while TOC order is recorded separately. Repeated targets retain distinct navigation identities; their body is stored once, on the last entry for that target, rather than duplicated.

Compatibility: load() defaults to split_documents=False for ebooks. Explicit chunking remains available for vector-store callers. Section bodies no longer carry synthetic Section:/Title: prefixes or duplicate chapter headings; titles and relationships are metadata. Use ebook_markdown(sections) for a readable Markdown export. The structural PageIndex path preserves all navigation levels and does not merge short nodes or infer parents from Markdown headings.

Other documents

from parrot_loaders.factory import get_loader_class

# Auto-detect loader by file extension
LoaderClass = get_loader_class("report.pdf")
loader = LoaderClass(source="report.pdf")
documents = await loader.load()

for doc in documents:
    print(doc.page_content[:200])

Or use a specific loader directly:

from parrot_loaders.youtube import YoutubeLoader

loader = YoutubeLoader(source="https://www.youtube.com/watch?v=...")
documents = await loader.load()

Requirements

License

MIT

Metadata

Release files for ai-parrot-loaders 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-parrot-loaders 1.0.0
File Size Uploaded
ai_parrot_loaders-1.0.0.tar.gz 148.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-parrot-loaders 1.0.0
File Interpreter ABI Platform
ai_parrot_loaders-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 294.8 kB

Release files / ai_parrot_loaders-1.0.0.tar.gz

Download URL ai_parrot_loaders-1.0.0.tar.gz
Size 148.4 kB
Tags Source
SHA-256 checksum
How to use checksums
235d0d8deb089a267a7cafcf19c0467ebbd6975cae73723b635632e6f36a5d24
BLAKE2b-256 checksum
How to use checksums
065c5da3d24ac3e22c7e68fe1ad39f51a1b0b0e6f554dc603f829cd2b92a7ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / ai_parrot_loaders-1.0.0-py3-none-any.whl

Download URL ai_parrot_loaders-1.0.0-py3-none-any.whl
Size 146.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3302156e78ae6ebdcb1d0734b8baa6b1627429bcc9ce57709414295498ec78bf
BLAKE2b-256 checksum
How to use checksums
e2251a869ca7e64faeae58a6c68dc2646687b917f3a2826c3263919fa6c4d5ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.90

2 release files

0.1.87

1 release file

0.1.83

1 release file

0.1.82

1 release file

0.1.81

2 release files

0.1.80

2 release files

0.1.79

2 release files

0.1.76

2 release files

0.1.75

2 release files

0.1.74

2 release files

0.1.73

2 release files

0.1.71

2 release files

0.1.70

2 release files

0.1.68

2 release files

0.1.67

2 release files

0.1.66

2 release files

0.1.65

2 release files

0.1.64

2 release files

0.1.63

2 release files

0.1.57

2 release files

0.1.55

2 release files

0.1.54

2 release files

0.1.53

2 release files

0.1.52

2 release files

0.1.51

2 release files

0.1.50

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.47

2 release files

0.1.46

2 release files

0.1.37

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

1 release file

0.1.21

1 release file

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page