Skip to content

API Reference parrot_loaders.epubloader

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_loaders.epubloader

View source

EPUB ingestion preserving navigation identities and section relationships.

Attribute BS4_AVAILABLE

Attribute EBOOKLIB_AVAILABLE

Class EpubLoader

Read EPUB spine content and preserve the full nested source TOC.

Per-chapter output means one document per structural section, including fragment targets and contentless parents. ebook_section metadata carries the authoritative hierarchy. Full-book output carries ebook_sections.

Parameter Type Default Description
source str | PurePath | list[PurePath] | None None
tokenizer str | Callable | None None
text_splitter str | Callable | None None
source_type str 'file'
as_markdown bool True
per_chapter bool True
include_toc_document bool False
min_section_length int 0
heading_style str 'ATX'
strip_whitespace bool True
**kwargs Any {}

Attributes:

Attribute Type Description
extensions list[str]

Method EpubLoader.load

Preserve structural records by default; chunking is explicitly opt-in.

load(source: str | PurePath | list[PurePath] | None = None, split_documents: bool = False, **kwargs: Any) -> list[Document]

Parameter Type Default Description
source str | PurePath | list[PurePath] | None None
split_documents bool False
**kwargs Any {}

Returns: list[Document]

Attribute MD_AVAILABLE

Function normalize_href

Normalize local navigation paths without discarding fragment identity.

normalize_href(href: str) -> str

Parameter Type Default Description
href str

Returns: str

Function section_id

Disambiguate repeated targets using their stable navigation position.

section_id(href: str, position: str) -> str

Parameter Type Default Description
href str
position str

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally