indexify 0.0.17__tar.gz → 0.0.20__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.17 → indexify-0.0.20}/PKG-INFO +2 -1
- {indexify-0.0.17 → indexify-0.0.20}/indexify/client.py +15 -5
- {indexify-0.0.17 → indexify-0.0.20}/pyproject.toml +2 -1
- {indexify-0.0.17 → indexify-0.0.20}/LICENSE.txt +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/README.md +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/__init__.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/data_containers.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/exceptions.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/extraction_policy.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/extractor.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/index.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/settings.py +0 -0
- {indexify-0.0.17 → indexify-0.0.20}/indexify/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: indexify
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.20
|
4
4
|
Summary: Python Client for Indexify
|
5
5
|
Home-page: https://github.com/tensorlakeai/indexify
|
6
6
|
License: Apache 2.0
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
15
15
|
Requires-Dist: httpx[http2] (>=0.26,<0.27)
|
16
|
+
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
16
17
|
Project-URL: Repository, https://github.com/tensorlakeai/indexify
|
17
18
|
Description-Content-Type: text/markdown
|
18
19
|
|
@@ -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}
|
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.
|
3
|
+
version = "0.0.20"
|
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"
|
@@ -11,6 +11,7 @@ repository = "https://github.com/tensorlakeai/indexify"
|
|
11
11
|
[tool.poetry.dependencies]
|
12
12
|
python = "^3.10.0"
|
13
13
|
httpx = { version = "^0.26", extras = ["http2"] }
|
14
|
+
pyyaml = "^6.0.1"
|
14
15
|
|
15
16
|
[tool.poetry.dev-dependencies]
|
16
17
|
black = "^22.3.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
|