HowdenParser 5.2.0__tar.gz → 5.2.2__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.
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parser.py +14 -1
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parsers/llama_parser.py +3 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/PKG-INFO +2 -2
- {howdenparser-5.2.0 → howdenparser-5.2.2}/pyproject.toml +2 -2
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/__init__.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parameter/__init__.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parameter/llamaparser.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parameter/mistralocr.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parsers/__init__.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parsers/langchain_parser.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/HowdenParser/parsers/mistral_parser.py +0 -0
- {howdenparser-5.2.0 → howdenparser-5.2.2}/README.md +0 -0
|
@@ -6,7 +6,7 @@ from inspect import signature, Signature
|
|
|
6
6
|
from typing import Any
|
|
7
7
|
import json
|
|
8
8
|
import hashlib
|
|
9
|
-
|
|
9
|
+
from pathlib import Path
|
|
10
10
|
dotenv.load_dotenv()
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
@@ -54,6 +54,19 @@ class BaseParser(ABC):
|
|
|
54
54
|
hashed = hashlib.sha256(attrs_str.encode()).hexdigest()[:8]
|
|
55
55
|
return hashed
|
|
56
56
|
|
|
57
|
+
@staticmethod
|
|
58
|
+
def write_parameters(parameter: dict, folder_file_path: Path) -> None:
|
|
59
|
+
folder_file_path.write_text(
|
|
60
|
+
json.dumps(
|
|
61
|
+
parameter,
|
|
62
|
+
indent=2,
|
|
63
|
+
sort_keys=True,
|
|
64
|
+
ensure_ascii=True,
|
|
65
|
+
),
|
|
66
|
+
encoding="utf-8",
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
57
70
|
class Parser(BaseParser):
|
|
58
71
|
"""Factory + registry interface for all parsers."""
|
|
59
72
|
|
|
@@ -86,3 +86,6 @@ class LlamaParser(BaseParser, name="llamaparser"):
|
|
|
86
86
|
|
|
87
87
|
def __call__(self, file_path: Path) -> str:
|
|
88
88
|
return self.parse(file_path)
|
|
89
|
+
|
|
90
|
+
def write_json_hyperparameter(self, folder_file_path: Path) -> None:
|
|
91
|
+
self.write_parameters(self._input_params, folder_file_path)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: HowdenParser
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.2
|
|
4
4
|
Summary: A simple configuration manager with Pydantic and JSON export.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: config,configuration,pydantic,json
|
|
@@ -11,7 +11,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
-
Requires-Dist: langchain (>=
|
|
14
|
+
Requires-Dist: langchain (>=1.1.3,<2.0.0)
|
|
15
15
|
Requires-Dist: llama-parse (>=0.6.58,<0.7.0)
|
|
16
16
|
Requires-Dist: mistralai (>=1.9.3,<2.0.0)
|
|
17
17
|
Requires-Dist: pdf2image (>=1.17.0,<2.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "HowdenParser"
|
|
3
|
-
version = "5.2.
|
|
3
|
+
version = "5.2.2"
|
|
4
4
|
description = "A simple configuration manager with Pydantic and JSON export."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12,<3.14"
|
|
@@ -19,9 +19,9 @@ documentation = "https://github.com/yourusername/config"
|
|
|
19
19
|
dependencies = [
|
|
20
20
|
"mistralai (>=1.9.3,<2.0.0)",
|
|
21
21
|
"llama-parse (>=0.6.58,<0.7.0)",
|
|
22
|
-
"langchain (>=0.3.27,<0.4.0)",
|
|
23
22
|
"pypdf2 (>=3.0.1,<4.0.0)",
|
|
24
23
|
"pdf2image (>=1.17.0,<2.0.0)",
|
|
24
|
+
"langchain (>=1.1.3,<2.0.0)",
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
[project.license]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|