Skip to main content

OCR & LLM Parser

A powerful Python package for parsing and processing documents using multiple providers:

  • Mistral OCR — Extracts text from PDFs and images with high accuracy.
  • LangChain — Processes or summarizes text using LLMs.
  • Llama Parser — Advanced parsing with Markdown or text output.
  • HuggingFace — OCR and document question answering with transformer models.

The package provides a unified interface so you can switch between providers easily using a factory pattern.


🚀 Features

  • Extract text from PDFs or images
  • Summarize or process text using LLMs
  • Support for Markdown or plain text output
  • Plug-and-play factory to switch providers without changing much code
  • Handles environment variable loading for API keys automatically

🔑 Tokens

Create a .env file in your project root and add the API keys for the services you want to use.

Mistral OCR

MISTRAL-OCR-API-TOKEN=your_mistral_api_key

Llama Parser

LLAMA-PARSER-API-TOKEN=your_llama_parser_api_key

HuggingFace

HF-API-TOKEN=your_huggingface_api_key

Only include the keys for the providers you plan to use.


🛠️ Usage

from HowdenParser import ParserFactory

from pathlib import Path

parser = ParserFactory.get_parser("mistralocr:", result_type="md") text = parser.parse(Path("document.pdf")) print(text)

if HowdenConfig package being used

config: Config = Config(parameter=Parameter())

parser = Parser.create(config.parameter)

text = parser.parse(Path("document.pdf"))

Metadata

Release files for HowdenParser 5.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HowdenParser 5.2.4
File Size Uploaded Provenance Actions
howdenparser-5.2.4.tar.gz 6.0 kB Without provenance Details for howdenparser-5.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for HowdenParser 5.2.4
File Interpreter ABI Platform Actions
howdenparser-5.2.4-py3-none-any.whl Python 3 none any Details for howdenparser-5.2.4-py3-none-any.whl

Total release size: 14.6 kB

Release files / howdenparser-5.2.4.tar.gz

Download URL howdenparser-5.2.4.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
088379e341d97e294f4915fa9d721f37ec5a5a87e3f6c733cb70a5a83b5927c9
BLAKE2b-256 checksum
How to use checksums
9f2a55cc7e3e89b821a1fd3dfb3cc74f8aa9bc6d3b5c076892de286845f9ee33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.0 CPython/3.12.9 Windows/11

Release files / howdenparser-5.2.4-py3-none-any.whl

Download URL howdenparser-5.2.4-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
342dd184f1c95cef9bbcdd129e92973ad21a89631a24a924ffb58bd25df4583f
BLAKE2b-256 checksum
How to use checksums
a44064bf8aec4d3b47523013bc5f5d80526337e928677a18ccb95ae3b8f12d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.0 CPython/3.12.9 Windows/11

Security for HowdenParser 5.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.2.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page