indexify 0.0.9__tar.gz → 0.0.10__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.9
3
+ Version: 0.0.10
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -1,10 +1,12 @@
1
1
  from .index import Index
2
2
  from .client import IndexifyClient
3
3
  from .extraction_policy import ExtractionPolicy
4
+ from .client import IndexifyClient, Document
4
5
  from .settings import DEFAULT_SERVICE_URL
5
6
 
6
7
  __all__ = [
7
8
  "Index",
9
+ "Document",
8
10
  "IndexifyClient",
9
11
  "ExtractionPolicy",
10
12
  "DEFAULT_SERVICE_URL",
@@ -50,7 +50,7 @@ class IndexifyClient:
50
50
  response = self.get(f"namespaces/{self.namespace}")
51
51
  response.raise_for_status()
52
52
  resp_json = response.json()
53
- # initialize extractor_bindings
53
+ # initialize extraction_policies
54
54
  for eb in resp_json["namespace"]["extraction_policies"]:
55
55
  self.extraction_policies.append(ExtractionPolicy.from_dict(eb))
56
56
 
@@ -404,5 +404,6 @@ class IndexifyClient:
404
404
  response = self.post(
405
405
  f"namespaces/{self.namespace}/upload_file",
406
406
  files={"file": f},
407
+ timeout=None,
407
408
  )
408
409
  response.raise_for_status()
@@ -16,22 +16,15 @@ class ExtractorSchema:
16
16
  outputs: dict[str, Union[EmbeddingSchema, dict]]
17
17
 
18
18
 
19
- @dataclass
20
- class Extractor:
21
- name: str
22
- description: str
23
- input_params: dict
24
- outputs: ExtractorSchema
25
-
26
-
27
19
  class Extractor:
28
20
  def __init__(
29
- self, name: str, description: str, input_params: dict, outputs: ExtractorSchema
21
+ self, name: str, description: str, input_params: dict, outputs: ExtractorSchema, input_mime_types: list[str]
30
22
  ):
31
23
  self.name = name
32
24
  self.description = description
33
25
  self.input_params = input_params
34
26
  self.outputs = outputs
27
+ self.input_mime_types = input_mime_types
35
28
 
36
29
  @classmethod
37
30
  def from_dict(cls, data):
@@ -39,11 +32,12 @@ class Extractor:
39
32
  name=data["name"],
40
33
  description=data["description"],
41
34
  input_params=data["input_params"],
35
+ input_mime_types=data["input_mime_types"],
42
36
  outputs=data["outputs"],
43
37
  )
44
38
 
45
39
  def __repr__(self) -> str:
46
- return f"Extractor(name={self.name}, description={self.description}, input_params={self.input_params}, outputs={self.outputs})"
40
+ return f"Extractor(name={self.name}, description={self.description}, input_params={self.input_params}, input_mime_types={self.input_mime_types}, outputs={self.outputs})"
47
41
 
48
42
  def __str__(self) -> str:
49
43
  return self.__repr__()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "indexify"
3
- version = "0.0.9"
3
+ version = "0.0.10"
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
File without changes