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.1
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.1.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| howdenparser-7.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / howdenparser-7.0.1.tar.gz
| Download URL | howdenparser-7.0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f584a548eb61bc314e75cf43831ea7fdd4718e976d3031f504711528a48ac19
|
|
BLAKE2b-256 checksum How to use checksums |
37eb1d981f69023a06b09f048fcdb151b9dfc1f36a0e363af929502fcc00b5dd
|
| 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.1-py3-none-any.whl
| Download URL | howdenparser-7.0.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15978f4a5b320bc6f4a35634fb06120fc344c0000bf8ebac005b3b51b4151691
|
|
BLAKE2b-256 checksum How to use checksums |
d2f8b80499e35444181e0de4e378ba4bda83e7abd8f73aab5c519ca672e97490
|
| 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}
|