indexify 0.0.27__tar.gz → 0.0.28__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.
- {indexify-0.0.27 → indexify-0.0.28}/PKG-INFO +1 -1
- {indexify-0.0.27 → indexify-0.0.28}/indexify/client.py +2 -1
- {indexify-0.0.27 → indexify-0.0.28}/indexify/extraction_policy.py +7 -0
- {indexify-0.0.27 → indexify-0.0.28}/pyproject.toml +1 -1
- {indexify-0.0.27 → indexify-0.0.28}/LICENSE.txt +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/README.md +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/__init__.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/data_containers.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/error.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/exceptions.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/extractor.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/index.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/settings.py +0 -0
- {indexify-0.0.27 → indexify-0.0.28}/indexify/utils.py +0 -0
@@ -622,7 +622,8 @@ class IndexifyClient:
|
|
622
622
|
json=req,
|
623
623
|
headers={"Content-Type": "application/json"},
|
624
624
|
)
|
625
|
-
|
625
|
+
response.raise_for_status()
|
626
|
+
return response.json()["content_id"]
|
626
627
|
|
627
628
|
def wait_for_extraction(self, content_ids: Union[str, List[str]]):
|
628
629
|
"""
|
@@ -33,11 +33,13 @@ class ExtractionPolicy:
|
|
33
33
|
class ExtractionGraph:
|
34
34
|
id: str
|
35
35
|
name: str
|
36
|
+
description: str
|
36
37
|
extraction_policies: List[ExtractionPolicy]
|
37
38
|
|
38
39
|
@classmethod
|
39
40
|
def from_dict(cls, json: dict):
|
40
41
|
json["id"] = json.get("id", None)
|
42
|
+
json["description"] = json.get("description", None)
|
41
43
|
if "namespace" in json.keys():
|
42
44
|
json.pop("namespace")
|
43
45
|
return ExtractionGraph(**json)
|
@@ -47,6 +49,11 @@ class ExtractionGraph:
|
|
47
49
|
import yaml
|
48
50
|
|
49
51
|
return ExtractionGraph.from_dict(yaml.load(spec, Loader=yaml.FullLoader))
|
52
|
+
|
53
|
+
@staticmethod
|
54
|
+
def from_yaml_file(path: str):
|
55
|
+
with open(path, "r") as f:
|
56
|
+
return ExtractionGraph.from_yaml(f.read())
|
50
57
|
|
51
58
|
def to_dict(self) -> dict:
|
52
59
|
filtered_dict = {k: v for k, v in asdict(self).items() if v is not None}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "indexify"
|
3
|
-
version = "0.0.
|
3
|
+
version = "0.0.28"
|
4
4
|
description = "Python Client for Indexify"
|
5
5
|
authors = ["Diptanu Gon Choudhury <diptanuc@gmail.com>", "Lucas Jackson <lucas@tensorlake.ai>", "Vijay Parthasarathy <vijay2win@gmail.com>"]
|
6
6
|
license = "Apache 2.0"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|