kodexa 7.0.9209617492__tar.gz → 7.0.9701907009__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.
Files changed (44) hide show
  1. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/PKG-INFO +1 -1
  2. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/model.py +7 -3
  3. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/objects.py +27 -0
  4. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/platform/client.py +8 -1
  5. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/pyproject.toml +1 -1
  6. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/LICENSE +0 -0
  7. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/README.md +0 -0
  8. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/__init__.py +0 -0
  9. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/assistant/__init__.py +0 -0
  10. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/assistant/assistant.py +0 -0
  11. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/connectors/__init__.py +0 -0
  12. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/connectors/connectors.py +0 -0
  13. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/__init__.py +0 -0
  14. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/base.py +0 -0
  15. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/entities/__init__.py +0 -0
  16. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/entities/product.py +0 -0
  17. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/entities/product_subscription.py +0 -0
  18. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/model/persistence.py +0 -0
  19. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/pipeline/__init__.py +0 -0
  20. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/pipeline/pipeline.py +0 -0
  21. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/platform/__init__.py +0 -0
  22. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/platform/interaction.py +0 -0
  23. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/platform/kodexa.py +0 -0
  24. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/__init__.py +0 -0
  25. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/ast.py +0 -0
  26. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/core.py +0 -0
  27. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/lexrules.py +0 -0
  28. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/lextab.py +0 -0
  29. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/lextab.pyi +0 -0
  30. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/parserules.py +0 -0
  31. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/parserules.pyi +0 -0
  32. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/parsetab.py +0 -0
  33. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/selectors/parsetab.pyi +0 -0
  34. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/spatial/__init__.py +0 -0
  35. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/spatial/azure_models.py +0 -0
  36. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/spatial/bbox_common.py +0 -0
  37. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/spatial/table_form_common.py +0 -0
  38. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/steps/__init__.py +0 -0
  39. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/steps/common.py +0 -0
  40. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/testing/__init__.py +0 -0
  41. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/testing/test_components.py +0 -0
  42. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/testing/test_utils.py +0 -0
  43. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/training/__init__.py +0 -0
  44. {kodexa-7.0.9209617492 → kodexa-7.0.9701907009}/kodexa/training/train_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.9209617492
3
+ Version: 7.0.9701907009
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -559,9 +559,13 @@ class ContentNode(object):
559
559
  >>> new_page.add_feature('pagination','pageNum',1)
560
560
  """
561
561
  if self.has_feature(feature_type, name):
562
- raise Exception(
563
- f"Feature {feature_type}:{name} already exists on this node, use set_feature to update"
564
- )
562
+ existing_feature = self.get_feature(feature_type, name)
563
+ if isinstance(existing_feature.value, list):
564
+ existing_feature.value.append(value)
565
+ else:
566
+ existing_feature.value = [existing_feature.value, value]
567
+ self.update_feature(existing_feature)
568
+ return existing_feature
565
569
 
566
570
  # Make sure that we treat the value as list all the time
567
571
  new_feature = ContentFeature(
@@ -5102,6 +5102,28 @@ class Action(ExtensionPackProvided):
5102
5102
  metadata: Optional[ObjectMetadata] = None
5103
5103
 
5104
5104
 
5105
+ class TaxonFeatures(BaseModel):
5106
+ """
5107
+
5108
+ """
5109
+ model_config = ConfigDict(
5110
+ populate_by_name=True,
5111
+ use_enum_values=True,
5112
+ arbitrary_types_allowed=True,
5113
+ protected_namespaces=("model_config",),
5114
+ )
5115
+ """
5116
+ A Custom Event allows you to define an subtype of assistant event with options
5117
+ """
5118
+
5119
+ taxonPath: Optional[str] = Field(
5120
+ None, description="The path of the taxon to add the features to", pattern=r"^[a-zA-Z0-9\-_]{0,40}$"
5121
+ )
5122
+ options: Optional[List[Option]] = Field(
5123
+ None, description="The options to add as type features to the taxon"
5124
+ )
5125
+
5126
+
5105
5127
  class AssistantDefinition(ExtensionPackProvided):
5106
5128
  """
5107
5129
 
@@ -5137,6 +5159,11 @@ class AssistantDefinition(ExtensionPackProvided):
5137
5159
  alias="additionalTaxonOptions",
5138
5160
  description="This are additional properties that can be set on a label when the assistant is part of the project",
5139
5161
  )
5162
+ taxon_features: Optional[TaxonFeatures] = Field(
5163
+ None,
5164
+ alias="taxonFeatures",
5165
+ description="This are additional properties that can be set as part of the taxon in the taxonomy (not a label but at the taxon level) they will be stored under the type_features",
5166
+ )
5140
5167
  event_types: Optional[List[CustomEvent]] = Field(
5141
5168
  None,
5142
5169
  alias="eventTypes",
@@ -5432,19 +5432,21 @@ class DocumentStoreEndpoint(StoreEndpoint):
5432
5432
  document_family_response.json()
5433
5433
  ).set_client(self.client)
5434
5434
 
5435
- def stream_query(self, query: str = "*", sort=None):
5435
+ def stream_query(self, query: str = "*", sort=None, limit=None):
5436
5436
  """
5437
5437
  Stream the query for the document family.
5438
5438
 
5439
5439
  Args:
5440
5440
  query (str, optional): The query to run. Defaults to "*".
5441
5441
  sort (str, optional): Sorting order of the query. Defaults to None.
5442
+ limit (int, optional): The maximum number of items to return. Defaults to None.
5442
5443
 
5443
5444
  Returns:
5444
5445
  generator: A generator of the document families.
5445
5446
  """
5446
5447
  page_size = 5
5447
5448
  page = 1
5449
+ number_of_items = 0
5448
5450
 
5449
5451
  if not sort:
5450
5452
  sort = "id"
@@ -5456,7 +5458,12 @@ class DocumentStoreEndpoint(StoreEndpoint):
5456
5458
  if not page_response.content:
5457
5459
  break
5458
5460
  for document_family in page_response.content:
5461
+ number_of_items += 1
5462
+ if limit and number_of_items > limit:
5463
+ break
5464
+
5459
5465
  yield document_family
5466
+
5460
5467
  page += 1
5461
5468
 
5462
5469
  def query(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.0.09209617492"
3
+ version = "7.0.09701907009"
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"
File without changes