kodexa 7.0.9584881808__py3-none-any.whl → 7.0.9706058442__py3-none-any.whl

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.
kodexa/model/model.py CHANGED
@@ -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(
kodexa/model/objects.py CHANGED
@@ -5072,6 +5072,13 @@ class ModelContentMetadata(BaseModel):
5072
5072
  alias="additionalTaxonOptions",
5073
5073
  description="This are additional properties that can be set on a label when the model is part of the project",
5074
5074
  )
5075
+
5076
+ taxon_features: Optional[TaxonFeatures] = Field(
5077
+ None,
5078
+ alias="taxonFeatures",
5079
+ 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",
5080
+ )
5081
+
5075
5082
  contents: Optional[List[str]] = Field(
5076
5083
  None,
5077
5084
  description="A list of the paths (with wildcards) that hold the content of this model",
@@ -5102,6 +5109,33 @@ class Action(ExtensionPackProvided):
5102
5109
  metadata: Optional[ObjectMetadata] = None
5103
5110
 
5104
5111
 
5112
+ class TaxonFeatures(BaseModel):
5113
+ """
5114
+
5115
+ """
5116
+ model_config = ConfigDict(
5117
+ populate_by_name=True,
5118
+ use_enum_values=True,
5119
+ arbitrary_types_allowed=True,
5120
+ protected_namespaces=("model_config",),
5121
+ )
5122
+ """
5123
+ A Custom Event allows you to define an subtype of assistant event with options
5124
+ """
5125
+
5126
+ taxonPath: Optional[str] = Field(
5127
+ None, description="The path of the taxon to add the features to", pattern=r"^[a-zA-Z0-9\-_]{0,40}$"
5128
+ )
5129
+ options: Optional[List[Option]] = Field(
5130
+ None, description="The options to add as type features to the taxon"
5131
+ )
5132
+ group_only: Optional[bool] = Field(
5133
+ None,
5134
+ alias="groupOnly",
5135
+ description="If true, the features will only be added to the group taxon",
5136
+ )
5137
+
5138
+
5105
5139
  class AssistantDefinition(ExtensionPackProvided):
5106
5140
  """
5107
5141
 
@@ -5137,6 +5171,11 @@ class AssistantDefinition(ExtensionPackProvided):
5137
5171
  alias="additionalTaxonOptions",
5138
5172
  description="This are additional properties that can be set on a label when the assistant is part of the project",
5139
5173
  )
5174
+ taxon_features: Optional[TaxonFeatures] = Field(
5175
+ None,
5176
+ alias="taxonFeatures",
5177
+ 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",
5178
+ )
5140
5179
  event_types: Optional[List[CustomEvent]] = Field(
5141
5180
  None,
5142
5181
  alias="eventTypes",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.9584881808
3
+ Version: 7.0.9706058442
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -8,8 +8,8 @@ kodexa/model/base.py,sha256=CaZK8nMhT1LdCpt4aLhebJGcorjq9qRID1FjnXnP14M,521
8
8
  kodexa/model/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  kodexa/model/entities/product.py,sha256=ZDpHuBE_9FJ-klnkyBvTfPwYOqBkM1wraZMtHqNA8FQ,3526
10
10
  kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
11
- kodexa/model/model.py,sha256=xAUPiW_1V9Kn9yitrvKFVuG_ms_N4HlAx23dwGln8Ro,115561
12
- kodexa/model/objects.py,sha256=tj6U5bcSOnKD4Pe3B-zhbM49X2BvM38MVRTxi38Up94,174414
11
+ kodexa/model/model.py,sha256=BURhrOEVTTlKkDJho5CEFeLR9Dyq157mztlvbAdL1d4,115769
12
+ kodexa/model/objects.py,sha256=RNp7uqTyCPlTLKnoikHQBAG6ujPbfuwgFR2S49djj9I,175785
13
13
  kodexa/model/persistence.py,sha256=sx5FwTSsWMdAZpAs0-6PqyULHkQyNQClApUKJZ-ly8M,62032
14
14
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
15
15
  kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
@@ -38,7 +38,7 @@ kodexa/testing/test_components.py,sha256=g5lP-GY0nTHuH5cIEw45vIejEeBaWkPKQGHL36j
38
38
  kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,14021
39
39
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
40
40
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- kodexa-7.0.9584881808.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
42
- kodexa-7.0.9584881808.dist-info/METADATA,sha256=iiPooTuDRtih7T3UqvaGNAZlZpUrp9gaCRBU62P1jIc,3486
43
- kodexa-7.0.9584881808.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
44
- kodexa-7.0.9584881808.dist-info/RECORD,,
41
+ kodexa-7.0.9706058442.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
42
+ kodexa-7.0.9706058442.dist-info/METADATA,sha256=ipVBsrAo4A5JbbcOMPRXUk3mW7_3BsuaQhk8ucGT2xc,3486
43
+ kodexa-7.0.9706058442.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
44
+ kodexa-7.0.9706058442.dist-info/RECORD,,