kodexa 7.4.412795054059__tar.gz → 7.4.412806034916__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/PKG-INFO +1 -1
  2. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/platform/client.py +37 -8
  3. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/pyproject.toml +1 -1
  4. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/LICENSE +0 -0
  5. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/README.md +0 -0
  6. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/__init__.py +0 -0
  7. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/assistant/__init__.py +0 -0
  8. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/assistant/assistant.py +0 -0
  9. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/connectors/__init__.py +0 -0
  10. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/connectors/connectors.py +0 -0
  11. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/dataclasses/__init__.py +0 -0
  12. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
  13. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/__init__.py +0 -0
  14. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/base.py +0 -0
  15. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/entities/__init__.py +0 -0
  16. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/entities/check_response.py +0 -0
  17. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/entities/product.py +0 -0
  18. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/entities/product_group.py +0 -0
  19. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/entities/product_subscription.py +0 -0
  20. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/model.py +0 -0
  21. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/objects.py +0 -0
  22. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/persistence.py +0 -0
  23. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/model/utils.py +0 -0
  24. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/pipeline/__init__.py +0 -0
  25. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/pipeline/pipeline.py +0 -0
  26. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/platform/__init__.py +0 -0
  27. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/platform/interaction.py +0 -0
  28. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/platform/kodexa.py +0 -0
  29. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/__init__.py +0 -0
  30. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/ast.py +0 -0
  31. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/core.py +0 -0
  32. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/lexrules.py +0 -0
  33. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/lextab.py +0 -0
  34. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/lextab.pyi +0 -0
  35. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/parserules.py +0 -0
  36. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/parserules.pyi +0 -0
  37. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/parsetab.py +0 -0
  38. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/selectors/parsetab.pyi +0 -0
  39. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/spatial/__init__.py +0 -0
  40. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/spatial/azure_models.py +0 -0
  41. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/spatial/bbox_common.py +0 -0
  42. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/spatial/table_form_common.py +0 -0
  43. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/steps/__init__.py +0 -0
  44. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/steps/common.py +0 -0
  45. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/testing/__init__.py +0 -0
  46. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/testing/test_components.py +0 -0
  47. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/testing/test_utils.py +0 -0
  48. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/training/__init__.py +0 -0
  49. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/training/train_utils.py +0 -0
  50. {kodexa-7.4.412795054059 → kodexa-7.4.412806034916}/kodexa/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.4.412795054059
3
+ Version: 7.4.412806034916
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -4577,7 +4577,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4577
4577
 
4578
4578
  def unlock(self):
4579
4579
  """
4580
- Lock the document family.
4580
+ Unlock the document family.
4581
4581
  """
4582
4582
  url = f"/api/stores/{self.store_ref.replace(':', '/')}/families/{self.id}/unlock"
4583
4583
  response = self.client.put(url)
@@ -4616,6 +4616,35 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4616
4616
  url = f"/api/documentFamilies/{self.id}/externalData"
4617
4617
  response = self.client.put(url, body=external_data)
4618
4618
  return response.json()
4619
+
4620
+ def get_json(
4621
+ self,
4622
+ project_id: str,
4623
+ friendly_names=False,
4624
+ ) -> str:
4625
+ """Get the JSON export for the document family
4626
+
4627
+ Args:
4628
+ project_id str: The project ID
4629
+ friendly_names (bool): Whether to use friendly names. Defaults to False
4630
+
4631
+ Returns:
4632
+ str: The JSON
4633
+ """
4634
+ if project_id is None:
4635
+ raise Exception(
4636
+ f"Project ID is required"
4637
+ )
4638
+
4639
+ url = f"/api/stores/{self.store_ref.replace(':', '/')}/families/{self.id}/dataObjects"
4640
+ params = {
4641
+ "format": "json",
4642
+ "friendlyNames": friendly_names,
4643
+ "projectId": project_id,
4644
+ }
4645
+
4646
+ response = self.client.get(url, params=params)
4647
+ return response.text
4619
4648
 
4620
4649
  def export(self) -> bytes:
4621
4650
  """
@@ -4651,6 +4680,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4651
4680
  mixin: Optional[str] = None,
4652
4681
  label: Optional[str] = None,
4653
4682
  timeout: int = 60,
4683
+ polling_delay_in_seconds: int = 5,
4654
4684
  ) -> "DocumentFamilyEndpoint":
4655
4685
  """
4656
4686
  Wait for the document family to be ready.
@@ -4659,6 +4689,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4659
4689
  mixin (Optional[str]): The mixin. Defaults to None.
4660
4690
  label (Optional[str]): The label. Defaults to None.
4661
4691
  timeout (int): The timeout. Defaults to 60.
4692
+ polling_delay_in_seconds (int): The polling delay in seconds. Defaults to 5. 5 is the minimum value.
4662
4693
 
4663
4694
  Returns:
4664
4695
  DocumentFamilyEndpoint: The updated document family endpoint.
@@ -4667,6 +4698,9 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4667
4698
  "Waiting for mixin and/or label to be available on document family %s",
4668
4699
  self.id,
4669
4700
  )
4701
+ if polling_delay_in_seconds < 5:
4702
+ polling_delay_in_seconds = 5
4703
+
4670
4704
  start = time.time()
4671
4705
  while time.time() - start < timeout:
4672
4706
  url = f"/api/stores/{self.store_ref.replace(':', '/')}/families/{self.id}"
@@ -4680,7 +4714,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4680
4714
  ):
4681
4715
  return updated_document_family
4682
4716
 
4683
- time.sleep(5)
4717
+ time.sleep(polling_delay_in_seconds)
4684
4718
 
4685
4719
  raise Exception(f"Not available on document family {self.id}")
4686
4720
 
@@ -5108,7 +5142,6 @@ class DataStoreEndpoint(StoreEndpoint):
5108
5142
  path: Optional[str] = None,
5109
5143
  root_name: str = "",
5110
5144
  friendly_names=True,
5111
- project_id: Optional[str] = None,
5112
5145
  ) -> str:
5113
5146
  """Get the data objects export of the store
5114
5147
 
@@ -5118,7 +5151,6 @@ class DataStoreEndpoint(StoreEndpoint):
5118
5151
  path (Optional[str]): The path to the data object
5119
5152
  root_name (str): The root name of the data objects export
5120
5153
  friendly_names (bool): Whether to use friendly names. Defaults to True
5121
- project_id (Optional[str]): The project ID
5122
5154
 
5123
5155
  Returns:
5124
5156
  str: The data objects export of the store
@@ -5134,16 +5166,13 @@ class DataStoreEndpoint(StoreEndpoint):
5134
5166
 
5135
5167
  if path:
5136
5168
  params["path"] = path
5137
-
5138
- if project_id:
5139
- params["projectId"] = project_id
5140
5169
 
5141
5170
  if output_format == "csv" and not path:
5142
5171
  raise ValueError("CSV output requires a path")
5143
5172
 
5144
5173
  response = self.client.get(url, params=params)
5145
5174
  return response.text
5146
-
5175
+
5147
5176
  def get_taxonomies(self) -> List[Taxonomy]:
5148
5177
  """Get the taxonomies of the store
5149
5178
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.4.412795054059"
3
+ version = "7.4.412806034916"
4
4
  description = "Python SDK for the Kodexa Platform"
5
5
  authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
6
6
  readme = "README.md"