Preview
Loading Mistral OCR Wrapper
Portfolio Entertainment System
Tools

Mistral OCR Wrapper

Studio:IndependentRole:Python Developer

Open-source Python wrapper for Mistral OCR that keeps tables, charts and images in the markdown output.

Tech Stack

  • Python

what i did

An open-source Python wrapper around the Mistral API for OCR on documents where visual structure matters, such as tables, charts and diagrams. It outputs markdown with the image clippings embedded, ready for documentation and knowledge pipelines.

Links

Project Repository | Medium Article

Key Features

  • Hides the Mistral SDK setup and boilerplate behind a small wrapper.
  • Built for documents where tables and charts need to be kept alongside the extracted text.
  • Extracted image clippings are embedded in the markdown output as Base64.
  • The whole API is two async functions:
# OCR an image
await mistral_client.ocr_image("path/to/image.png")

# OCR a PDF
await mistral_client.ocr_pdf("path/to/document.pdf")