Skip to main content

A simple configuration manager with Pydantic and JSON export.

Project description

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"))

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

howdenparser-5.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

howdenparser-5.2.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file howdenparser-5.2.1.tar.gz.

File metadata

  • Download URL: howdenparser-5.2.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.3 Windows/11

File hashes

Hashes for howdenparser-5.2.1.tar.gz
Algorithm Hash digest
SHA256 4dae83a28fd2359231aec90b0df040e67dba536e99018196098b7fd7f951f277
MD5 2929976d7e33ca2690d6ad80ae9102f5
BLAKE2b-256 c022b4d27470d4681c4a1e26f3f58204f29c367b1909b07cc38a07cf2102fd93

See more details on using hashes here.

File details

Details for the file howdenparser-5.2.1-py3-none-any.whl.

File metadata

  • Download URL: howdenparser-5.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.3 Windows/11

File hashes

Hashes for howdenparser-5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95da906afb4e85ed257225486aea803b88a1ff45de57edf3476a9151879a080b
MD5 a7e181c2b945657c4f7a6dc40f2824ef
BLAKE2b-256 6f99d65a71f56d6a348eea8928a33060f25772c15e271c8742ae27179011c08b

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