indexify 0.0.27__py3-none-any.whl → 0.0.28__py3-none-any.whl

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/client.py CHANGED
@@ -622,7 +622,8 @@ class IndexifyClient:
622
622
  json=req,
623
623
  headers={"Content-Type": "application/json"},
624
624
  )
625
- return response.json()
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
  Metadata-Version: 2.1
2
2
  Name: indexify
3
- Version: 0.0.27
3
+ Version: 0.0.28
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -1,14 +1,14 @@
1
1
  indexify/__init__.py,sha256=Y40-Ur_tL7kGGs-reh9BTfEYGe-KyGxgdg-CmoFsXRQ,473
2
- indexify/client.py,sha256=NwEvU-9FU2U-UkhlKjfVmIUJ9E9DcSIjIJYE4AEqwJA,22109
2
+ indexify/client.py,sha256=qECQvvVPvzMDra8OQ-94u7J5ABFWSEmEx_uIEdJ3RiU,22159
3
3
  indexify/data_containers.py,sha256=r1wxJPtsmXbyKvb17fqxm-dPjKz51oZ62f8A8Zxls1c,361
4
4
  indexify/error.py,sha256=3umTeYb0ugtUyehV1ibfvaeACxAONPyWPc-1HRN4d1M,856
5
5
  indexify/exceptions.py,sha256=vjd5SPPNFIEW35GorSIodsqvm9RKHQm9kdp8t9gv-WM,111
6
- indexify/extraction_policy.py,sha256=dIyQK3N-QOpQ0BPjiZ_635o8A5ITNxaz1syQ_FPaE0k,1851
6
+ indexify/extraction_policy.py,sha256=POluredrBw6DzTN0OyfPLaLFP5-2DoWGRK0V6w68R28,2080
7
7
  indexify/extractor.py,sha256=sWFLlXHgEfWlmiKAXN6ytUt_uG7th-XGNHqz-TG39gs,1216
8
8
  indexify/index.py,sha256=RvxYhJXEth-GKvqzlMiz5PuN1eIbZk84pt20piA1Gsw,504
9
9
  indexify/settings.py,sha256=LSaWZ0ADIVmUv6o6dHWRC3-Ry5uLbCw2sBSg1e_U7UM,99
10
10
  indexify/utils.py,sha256=rDN2lrsAs9noJEIjfx6ukmC2SAIyrlUt7QU-kaBjujM,125
11
- indexify-0.0.27.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
- indexify-0.0.27.dist-info/METADATA,sha256=Hz-3CZFY5Nz99brOcraBKR8moLhghxgoHOugofABP_c,1798
13
- indexify-0.0.27.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- indexify-0.0.27.dist-info/RECORD,,
11
+ indexify-0.0.28.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ indexify-0.0.28.dist-info/METADATA,sha256=3r9wATECrfXFfmI68yU2cUOtrOBR4nT_ajPnag8IdZg,1798
13
+ indexify-0.0.28.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ indexify-0.0.28.dist-info/RECORD,,