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.

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

License

MIT — see LICENSE.

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.1.tar.gz (18.3 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.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parse_anything-0.1.1.tar.gz
  • Upload date:
  • Size: 18.3 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.1.tar.gz
Algorithm Hash digest
SHA256 ab72c35e79c588f0586cfe8e73add3b9f1e400fe57caf706badf9b9e6f4a3dea
MD5 70ec14b6d82b35fa064992efca80ec3d
BLAKE2b-256 faede17bc2dde6b871fcf64509b8bac5dc8b165b0dd457839b0ca9113f2bf528

See more details on using hashes here.

File details

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

File metadata

  • Download URL: parse_anything-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2effd49d0632f0d63ebb99c418b3a97fca6b6e6479ceacc14502652956003b6
MD5 780526b995031a2bc0d435f68c5f2cc5
BLAKE2b-256 91289f232559292f5fde0b0aa40975dcf514fabda369b749028438ca57bb89bc

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