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

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.2.4
File Size Uploaded Provenance Actions
ai_parrot_loaders-1.2.4.tar.gz 148.5 kB With provenance Details for ai_parrot_loaders-1.2.4.tar.gz

Built distribution (wheel)

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

Total release size: 294.9 kB

Release files / ai_parrot_loaders-1.2.4.tar.gz

Download URL ai_parrot_loaders-1.2.4.tar.gz
Size 148.5 kB
Tags Source
SHA-256 checksum
How to use checksums
18d5c7d1ac7215b3d0a9706bffc97e370416299881baf14e3ae84665270fe85c
BLAKE2b-256 checksum
How to use checksums
c7c379933d453480c20aa3d4b14d9f158cdb71711b0044a5c90e4d7f77a87436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

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

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

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 Oct 22, 2026.

Transparency log

Security for ai-parrot-loaders 1.2.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_parrot_loaders-1.2.4.tar.gz

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 Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files Full provenance

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