Skip to main content

One interface to parse any document: pick an engine (mineru, docling, unstructured, markitdown, lite) and get clean markdown out.

Project description

parse-anything

One interface to parse any document. Pick an engine — MinerU, Docling, unstructured, MarkItDown, or the PyMuPDF lite path — pass a file path, get clean markdown/text back. OCR runs on PaddleOCR (PP-OCRv5, default) or Tesseract.

from parse_anything import parse

result = parse("report.pdf", engine="miner-u")
print(result.content)          # markdown
print(result.duration_s)       # seconds
parse-anything report.pdf --engine miner-u -o report.md
parse-anything scan.png  --engine ocr --ocr paddle
parse-anything deck.pptx                     # auto-picks the best installed engine

Install

Core has zero dependencies; each engine is an optional extra:

pip install -e .[all]                        # everything
pip install -e .[mineru]                     # MinerU (scanned/complex PDFs)
pip install -e .[docling]                    # Docling (structure fidelity)
pip install -e .[unstructured]               # unstructured (broadest formats)
pip install -e .[markitdown]                 # MarkItDown (office/web -> md)
pip install -e .[lite]                       # PyMuPDF fast path
pip install -e .[paddle]                     # PaddleOCR (PP-OCRv5)
pip install -e .[tesseract]                  # pytesseract (+ install the tesseract binary)

Windows Tesseract binary: UB-Mannheim build or choco install tesseract.

Engines

--engine Backed by Reach for it when
mineru / miner-u MinerU scanned or complex PDFs — formulas, tables, multi-column; OCR built on PaddleOCR models
docling Docling you care about reading order, tables, office formats
unstructured unstructured odd formats: email, html, mixed batches
markitdown MarkItDown fast docx/pptx/xlsx/html → markdown (no OCR)
lite / liteparse PyMuPDF4LLM speed on PDFs that already have a text layer
ocr PaddleOCR / Tesseract images or fully scanned docs, raw text out
auto (default) picks the best installed engine for the file type

OCR

--ocr paddle (default) uses PaddleOCR PP-OCRv5 — the current open-source benchmark leader. --ocr tesseract is the portable fallback. --ocr none skips OCR (text-layer extraction only).

Logging

Progress prints to stderr by default (auto-selected engine, OCR page-by-page, live MinerU subprocess output with a heartbeat on long runs). -v for debug detail, -q to silence it. As a library, nothing prints unless you call logging.basicConfig(...) yourself.

See SKILLS.md for the full skill contract (inputs, outputs, failure modes).

Layout

src/parse_anything/
├── __init__.py        # parse(path, engine=..., ocr=...) public API
├── factory.py         # engine registry, aliases, auto-selection
├── result.py          # ParseResult
├── cli.py             # parse-anything CLI
├── engines/           # one module per backend (lazy imports)
└── ocr/               # paddle + tesseract backends, PDF rasterization

Tests

pip install -e .[dev]
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parse_anything-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parse_anything-0.1.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file parse_anything-0.1.0.tar.gz.

File metadata

  • Download URL: parse_anything-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for parse_anything-0.1.0.tar.gz
Algorithm Hash digest
SHA256 500f5213b4e54a59e9d7a730325acbf81641c6c1aeac413a1656ff550717f713
MD5 e2288be508b94fb6e0e527675f9ec64e
BLAKE2b-256 3c774ed33ff97aa55069e790795ba6268c73ae0c4a489eb6fb64efebff9e11a1

See more details on using hashes here.

File details

Details for the file parse_anything-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: parse_anything-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for parse_anything-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 593b87c36c4a8862c93c2330c4b760831f2a2eab8f841147370e66f16c052ac8
MD5 8291ebcb550f5f6613b8669eee221fbf
BLAKE2b-256 88cd00eb2b8171ac5398e35212b10faaa4bd41b238744daa02eb61f312ac8566

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page