Skip to content

API Reference parrot_loaders.markdown

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

parrot_loaders.markdown

View source

Class MarkdownLoader

Universal Document Loader using MarkItDown library.

Converts various document formats to markdown and returns Document objects. Supports:

  • PDF files
  • PowerPoint presentations (.pptx, .ppt)
  • Word documents (.docx, .doc)
  • Excel spreadsheets (.xlsx, .xls, .csv)
  • HTML files
  • Text-based formats (CSV, JSON, XML)
  • Images with OCR (if enabled)
  • Audio files (if enabled)
Parameter Type Default Description
source Optional[Union[str, Path, List[Union[str, Path]]]] None Path or list of paths to load from
tokenizer Union[str, Callable] None Tokenizer to use for text processing
text_splitter Union[str, Callable] None Text splitter to use
source_type str 'file' Type of source ('file', 'url', etc.)
enable_plugins bool True Enable MarkItDown plugins for enhanced processing
enable_ocr bool False Enable OCR for image processing
enable_audio bool False Enable audio transcription
use_chapters bool False Split by chapters/major sections
use_sections bool False Split by all sections
merge_consecutive_headers bool True Merge consecutive headers with their content
min_section_length int 50 Minimum length for a section to be considered valid
**kwargs {} Additional arguments passed to AbstractLoader

Attributes:

Attribute Type Description
extensions List[str]

Method MarkdownLoader.get_supported_formats

Get information about supported file formats.

get_supported_formats() -> dict

Returns: dict — Dictionary mapping format categories to file extensions

Method MarkdownLoader.validate_file_support

Check if a file is supported by MarkItDown.

validate_file_support(path: Union[str, Path]) -> bool

Parameter Type Default Description
path Union[str, Path] File path to check

Returns: bool — True if file is supported, False otherwise

Method MarkdownLoader.convert_to_markdown

Convert a single file to markdown and return the content.

convert_to_markdown(path: Union[str, Path]) -> str

Parameter Type Default Description
path Union[str, Path] Path to file to convert

Returns: str — Markdown content as string

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