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 7.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| howdenparser-7.0.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| howdenparser-7.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / howdenparser-7.0.0.tar.gz
| Download URL | howdenparser-7.0.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bbeb6c86fd49f323f5748b4a618edbb523bf09c9a2c3dd9617c2305782e9aed
|
|
BLAKE2b-256 checksum How to use checksums |
81f37ccf40387a3ccd5adffdc436d5612dab35bf9093161f5e578f2c27837b3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / howdenparser-7.0.0-py3-none-any.whl
| Download URL | howdenparser-7.0.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c93ddb2a20c5f2a37f34359b1b3c9572f0fdfb0621bf401772feb85146f43990
|
|
BLAKE2b-256 checksum How to use checksums |
754fb8dab5a1b8b9d8e7a79c71c2dbd7a181d2a7ce3c6413662901bc1d97f911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|