indexify 0.0.17__tar.gz → 0.0.19__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: indexify
3
- Version: 0.0.17
3
+ Version: 0.0.19
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -128,7 +128,7 @@ class IndexifyClient:
128
128
  return client
129
129
 
130
130
  def _request(self, method: str, **kwargs) -> httpx.Response:
131
- response = self._client.request(method, **kwargs)
131
+ response = self._client.request(method,timeout=None, **kwargs)
132
132
  try:
133
133
  response.raise_for_status()
134
134
  except httpx.HTTPStatusError as exc:
@@ -475,7 +475,7 @@ class IndexifyClient:
475
475
  - path (str): relative path to the file to be uploaded
476
476
  """
477
477
  with open(path, "rb") as f:
478
- response = self.put(f"namespaces/{self.namespace}/content/{document_id}", files={"file": f}, timeout=None)
478
+ response = self.put(f"namespaces/{self.namespace}/content/{document_id}", files={"file": f})
479
479
  response.raise_for_status()
480
480
 
481
481
  def get_structured_data(self, content_id: str) -> dict:
@@ -525,7 +525,6 @@ class IndexifyClient:
525
525
  files={"file": f},
526
526
  data=labels,
527
527
  params=params,
528
- timeout=None,
529
528
  )
530
529
  response.raise_for_status()
531
530
  response_json = response.json()
@@ -538,7 +537,18 @@ class IndexifyClient:
538
537
  response = self.get(f"namespaces/{self.namespace}/schemas")
539
538
  response.raise_for_status()
540
539
  return response.json()
540
+
541
+ def get_content_tree(self, content_id:str):
542
+ """
543
+ Get content tree for a given content id
541
544
 
545
+ Args:
546
+ - content_id (str): id of content
547
+ """
548
+ response = self.get(f"namespaces/{self.namespace}/content/{content_id}/content-tree")
549
+ response.raise_for_status()
550
+ return response.json()
551
+
542
552
  def sql_query(self, query: str):
543
553
  """
544
554
  Execute a SQL query.
@@ -560,8 +570,8 @@ class IndexifyClient:
560
570
  rows.append(data)
561
571
  return SqlQueryResult(result=rows)
562
572
 
563
- def ingest_remote_file(self, url: str, mime_type: str, labels: Dict[str, str]):
564
- req = {"url": url, "mime_type": mime_type, "labels": labels}
573
+ def ingest_remote_file(self, url: str, mime_type: str, labels: Dict[str, str], id=None):
574
+ req = {"url": url, "mime_type": mime_type, "labels": labels, "id": id}
565
575
  response = self.post(
566
576
  f"namespaces/{self.namespace}/ingest_remote_file",
567
577
  json=req,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "indexify"
3
- version = "0.0.17"
3
+ version = "0.0.19"
4
4
  description = "Python Client for Indexify"
5
5
  authors = ["Diptanu Gon Choudhury <diptanuc@gmail.com>", "Vijay Parthasarathy <vijay2win@gmail.com>"]
6
6
  license = "Apache 2.0"
File without changes
File without changes
File without changes
File without changes