HowdenParser 0.1.5__tar.gz → 0.1.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.3
2
+ Name: HowdenParser
3
+ Version: 0.1.11
4
+ Summary: A simple configuration manager with Pydantic and JSON export.
5
+ License: MIT
6
+ Keywords: config,configuration,pydantic,json
7
+ Author: JesperThoftIllemannJ
8
+ Author-email: jesper.jaeger@howdendanmark.dk
9
+ Requires-Python: >=3.12,<4.0
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Dist: fitz (>=0.0.1.dev2,<0.0.2)
15
+ Requires-Dist: langchain (>=0.3.27,<0.4.0)
16
+ Requires-Dist: llama-parse (>=0.6.58,<0.7.0)
17
+ Requires-Dist: mistralai (>=1.9.3,<2.0.0)
18
+ Requires-Dist: transformers (>=4.55.2,<5.0.0)
19
+ Project-URL: Documentation, https://github.com/yourusername/config
20
+ Project-URL: Homepage, https://github.com/yourusername/config
21
+ Project-URL: Repository, https://github.com/yourusername/config
22
+ Description-Content-Type: text/markdown
23
+
24
+ # OCR & LLM Parser
25
+
26
+ A powerful Python package for parsing and processing documents using multiple providers:
27
+ - **Mistral OCR** — Extracts text from PDFs and images with high accuracy.
28
+ - **LangChain** — Processes or summarizes text using LLMs.
29
+ - **Llama Parser** — Advanced parsing with Markdown or text output.
30
+ - **HuggingFace** — OCR and document question answering with transformer models.
31
+
32
+ The package provides a **unified interface** so you can switch between providers easily using a **factory pattern**.
33
+
34
+ ---
35
+
36
+ ## 🚀 Features
37
+ - Extract text from PDFs or images
38
+ - Summarize or process text using LLMs
39
+ - Support for **Markdown** or **plain text** output
40
+ - Plug-and-play factory to switch providers without changing much code
41
+ - Handles environment variable loading for API keys automatically
42
+
43
+ ---
44
+
45
+ # 🔑 Tokens
46
+
47
+ Create a .env file in your project root and add the API keys for the services you want to use.
48
+
49
+ ### Mistral OCR
50
+ MISTRAL-OCR-API-TOKEN=your_mistral_api_key
51
+
52
+ ### Llama Parser
53
+ LLAMA-PARSER-API-TOKEN=your_llama_parser_api_key
54
+
55
+ ### HuggingFace
56
+ HF-API-TOKEN=your_huggingface_api_key
57
+
58
+ Only include the keys for the providers you plan to use.
59
+
60
+ ---
61
+
62
+ # 🛠️ Usage
63
+
64
+ from HowdenParser import ParserFactory
65
+
66
+ from pathlib import Path
67
+
68
+ parser = ParserFactory.get_parser("mistralocr:", result_type="md")
69
+ text = parser.parse(Path("document.pdf"))
70
+ print(text)
71
+
72
+ if HowdenConfig package being used
73
+
74
+
75
+ parser = ParserFactory.get_parser("mistralocr:", **config.parameter.dump_model())
76
+
77
+ text = parser.parse(Path("document.pdf"))
78
+
79
+
@@ -0,0 +1,55 @@
1
+ # OCR & LLM Parser
2
+
3
+ A powerful Python package for parsing and processing documents using multiple providers:
4
+ - **Mistral OCR** — Extracts text from PDFs and images with high accuracy.
5
+ - **LangChain** — Processes or summarizes text using LLMs.
6
+ - **Llama Parser** — Advanced parsing with Markdown or text output.
7
+ - **HuggingFace** — OCR and document question answering with transformer models.
8
+
9
+ The package provides a **unified interface** so you can switch between providers easily using a **factory pattern**.
10
+
11
+ ---
12
+
13
+ ## 🚀 Features
14
+ - Extract text from PDFs or images
15
+ - Summarize or process text using LLMs
16
+ - Support for **Markdown** or **plain text** output
17
+ - Plug-and-play factory to switch providers without changing much code
18
+ - Handles environment variable loading for API keys automatically
19
+
20
+ ---
21
+
22
+ # 🔑 Tokens
23
+
24
+ Create a .env file in your project root and add the API keys for the services you want to use.
25
+
26
+ ### Mistral OCR
27
+ MISTRAL-OCR-API-TOKEN=your_mistral_api_key
28
+
29
+ ### Llama Parser
30
+ LLAMA-PARSER-API-TOKEN=your_llama_parser_api_key
31
+
32
+ ### HuggingFace
33
+ HF-API-TOKEN=your_huggingface_api_key
34
+
35
+ Only include the keys for the providers you plan to use.
36
+
37
+ ---
38
+
39
+ # 🛠️ Usage
40
+
41
+ from HowdenParser import ParserFactory
42
+
43
+ from pathlib import Path
44
+
45
+ parser = ParserFactory.get_parser("mistralocr:", result_type="md")
46
+ text = parser.parse(Path("document.pdf"))
47
+ print(text)
48
+
49
+ if HowdenConfig package being used
50
+
51
+
52
+ parser = ParserFactory.get_parser("mistralocr:", **config.parameter.dump_model())
53
+
54
+ text = parser.parse(Path("document.pdf"))
55
+
@@ -1,10 +1,20 @@
1
+ [project]
2
+ name = "HowdenParser"
3
+ description = ""
4
+ readme = "README.md"
5
+ requires-python = ">=3.12,<4.0"
6
+ dependencies = [ "mistralai (>=1.9.3,<2.0.0)", "llama-parse (>=0.6.58,<0.7.0)", "langchain (>=0.3.27,<0.4.0)", "transformers (>=4.55.2,<5.0.0)", "fitz (>=0.0.1.dev2,<0.0.2)",]
7
+ [[project.authors]]
8
+ name = "JesperThoftIllemannJ"
9
+ email = "jesper.jaeger@howdendanmark.dk"
10
+
1
11
  [build-system]
2
12
  requires = [ "poetry-core>=2.0.0,<3.0.0",]
3
13
  build-backend = "poetry.core.masonry.api"
4
14
 
5
15
  [tool.poetry]
6
16
  name = "HowdenParser"
7
- version = "0.1.5"
17
+ version = "0.1.11"
8
18
  description = "A simple configuration manager with Pydantic and JSON export."
9
19
  authors = [ "JesperThoftIllemannJ <jesper.jaeger@howdendanmark.dk>",]
10
20
  readme = "README.md"
@@ -16,3 +26,5 @@ documentation = "https://github.com/yourusername/config"
16
26
  [[tool.poetry.packages]]
17
27
  include = "HowdenParser"
18
28
 
29
+ [tool.poetry.group.dev.dependencies]
30
+ toml = "^0.10.2"
@@ -1,28 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: HowdenParser
3
- Version: 0.1.5
4
- Summary: A simple configuration manager with Pydantic and JSON export.
5
- License: MIT
6
- Keywords: config,configuration,pydantic,json
7
- Author: JesperThoftIllemannJ
8
- Author-email: jesper.jaeger@howdendanmark.dk
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 2
11
- Classifier: Programming Language :: Python :: 2.7
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.4
14
- Classifier: Programming Language :: Python :: 3.5
15
- Classifier: Programming Language :: Python :: 3.6
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: 3.13
23
- Project-URL: Documentation, https://github.com/yourusername/config
24
- Project-URL: Homepage, https://github.com/yourusername/config
25
- Project-URL: Repository, https://github.com/yourusername/config
26
- Description-Content-Type: text/markdown
27
-
28
- .\build.ps1
@@ -1 +0,0 @@
1
- .\build.ps1