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.4.tar.gz (6.0 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.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: howdenparser-5.2.4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.12.9 Windows/11

File hashes

Hashes for howdenparser-5.2.4.tar.gz
Algorithm Hash digest
SHA256 088379e341d97e294f4915fa9d721f37ec5a5a87e3f6c733cb70a5a83b5927c9
MD5 d06889bfc05d7bee0a98d4331c22b371
BLAKE2b-256 9f2a55cc7e3e89b821a1fd3dfb3cc74f8aa9bc6d3b5c076892de286845f9ee33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: howdenparser-5.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.12.9 Windows/11

File hashes

Hashes for howdenparser-5.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 342dd184f1c95cef9bbcdd129e92973ad21a89631a24a924ffb58bd25df4583f
MD5 f46ebd2dfc673fd71a06329210e57e5a
BLAKE2b-256 a44064bf8aec4d3b47523013bc5f5d80526337e928677a18ccb95ae3b8f12d8e

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