LiteParse

Fast, open-source PDF and document parser with Python bindings, OCR, and spatial text extraction.

Library
PyPI
v2.13.0
12,122stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
83/100Excellent
Development Activity100
Maintenance100
Community64
Maturity28
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
82/100Excellent
Architecture84
Code Quality82
Innovation80
Learning Curve82

LiteParse is a fast, lightweight document parser from the LlamaIndex team that extracts text, tables, and layout from PDFs and other documents. Its core is written in Rust for speed and shipped to Python as native bindings (with npm and crates.io packages available too), so you get high-performance parsing behind an ergonomic Python API.

The Python package exposes a simple LiteParse class that renders documents to Markdown, JSON, or plain text, reconstructing headings, tables, lists, images, and links from the spatial layout. It bundles OCR support (Tesseract, with optional HTTP OCR servers), page targeting, screenshots, and password handling, making it well suited to feeding documents into LLM and RAG pipelines.

What You Get

  • A LiteParse Python class backed by a fast Rust parsing core
  • Markdown, JSON, and plain-text output with reconstructed headings, tables, lists, and links
  • Built-in OCR via Tesseract, with optional HTTP OCR server support and configurable workers
  • Parsing from file paths or raw bytes, plus page targeting, screenshots, and password-protected documents
  • A lit command-line tool installed alongside the library

Common Use Cases

  • Converting PDFs to clean Markdown for LLM and RAG ingestion
  • Extracting structured text and tables from scanned or digital documents
  • OCR-ing image-based PDFs with configurable languages and worker concurrency
  • Parsing uploaded document bytes in a web backend without touching disk

Under The Hood

Architecture - LiteParse is a Rust-core monorepo with thin per-language bindings. The parsing engine lives in crates/liteparse, wrapping a bundled pdfium (crates/pdfium, pdfium-sys) for PDF rendering and reconstructing spatial layout into structured output. The Python package (packages/python) is a maturin-built extension over crates/liteparse-python, exposing a compiled module (liteparse._liteparse) behind a Python LiteParse class (parser.py) with typed results (types.py) and a lit CLI (cli.py). Sibling crates provide napi (Node) and wasm builds from the same core.

Tech Stack - The heavy lifting is Rust (~83% of the repo) built via maturin, with pdfium bundled as libpdfium for cross-platform rendering. The Python surface targets 3.10-3.14, ships py.typed for full typing, and uses OCR via Tesseract with an optional HTTP OCR-server mode. Build and packaging span Cargo, maturin, and npm, with Dockerfiles and musl build notes for portable deployment.

Code Quality - The Python package configures strict mypy (strict = true, warn_return_any, warn_unused_ignores) and ships end-to-end test suites (test_parse_e2e, test_batch_e2e, test_screenshot_e2e) with shared fixtures in conftest.py. The broader repo carries CI badges, integration test data, and evaluation utilities, indicating a mature, actively maintained codebase backed by the LlamaIndex team.

API Design - The public API is deliberately small: construct LiteParse(…) with all options as constructor keyword arguments (output_format, ocr_enabled, target_pages, num_workers, etc.), then call parse() on a path or raw bytes and read result.text or iterate result.pages. The README documents Markdown/JSON/text output, byte parsing, and screenshots with runnable snippets, keeping the learning curve low for common document-to-text workflows.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search