kodexa 7.0.11275546208__py3-none-any.whl → 7.0.11276748448__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/platform/kodexa.py CHANGED
@@ -16,6 +16,7 @@ from typing import Dict
16
16
 
17
17
  import requests
18
18
  from appdirs import AppDirs
19
+ from mistune.plugins.formatting import insert
19
20
 
20
21
  from kodexa.connectors import get_source
21
22
  from kodexa.connectors.connectors import get_caller_dir, FolderConnector
@@ -884,7 +885,7 @@ class EventHelper:
884
885
  ContentObject: The posted content object.
885
886
  """
886
887
  files = {"content": content}
887
- data = {"contentObjectJson": json.dumps(content_object.dict(by_alias=True))}
888
+ data = {"contentObjectJson": json.dumps(content_object.model_dump(by_alias=True))}
888
889
  logger.info("Posting back content object to execution object")
889
890
  co_response = requests.post(
890
891
  f"{KodexaPlatform.get_url()}/api/sessions/{self.event.session_id}/executions/{self.event.execution.id}/objects",
@@ -901,7 +902,7 @@ class EventHelper:
901
902
 
902
903
  return ContentObject.model_validate(co_response.json())
903
904
 
904
- def build_pipeline_context(self) -> PipelineContext:
905
+ def build_pipeline_context(self, event) -> PipelineContext:
905
906
  """Builds a pipeline context.
906
907
 
907
908
  Returns:
@@ -911,7 +912,10 @@ class EventHelper:
911
912
  context={}, content_provider=self, execution_id=self.event.execution.id
912
913
  )
913
914
 
914
- if isinstance(self.event, DocumentFamilyEvent):
915
+ if isinstance(event, dict):
916
+ event = self.get_base_event(event)
917
+
918
+ if isinstance(event, DocumentFamilyEvent):
915
919
  # Can we get the document family
916
920
  dfe:DocumentFamilyEvent = self.event
917
921
  if dfe.document_family:
@@ -919,7 +923,7 @@ class EventHelper:
919
923
  context.document_family = dfe.document_family
920
924
  logger.info(f"Getting document store for family: {context.document_family.store_ref}")
921
925
  context.document_store = KodexaClient().get_object_by_ref("store", context.document_family.store_ref)
922
- if isinstance(self.event, ContentEvent):
926
+ if isinstance(event, ContentEvent):
923
927
  ce:ContentEvent = self.event
924
928
  if ce.content_object:
925
929
  logger.info(f"Setting content object for context: {ce.content_object}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.11275546208
3
+ Version: 7.0.11276748448
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -19,7 +19,7 @@ kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,2
19
19
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
20
20
  kodexa/platform/client.py,sha256=VqEx7mwspekMFkOi64aOiLozhB2t_Uk68JI64Uq8BrM,226549
21
21
  kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
22
- kodexa/platform/kodexa.py,sha256=qWxKg4WAHCf9ZgPeFeJVIv6zkFMIgqZk8VoftHc5EeY,34709
22
+ kodexa/platform/kodexa.py,sha256=02n9GEsshJLcqDQbFTRwFBfVB1S8UlZh_1jwmMGXW0Q,34842
23
23
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
24
24
  kodexa/selectors/ast.py,sha256=gG-1st841IntgBE5V7p3Cq9azaym2jV5lB_AIywQTCI,13269
25
25
  kodexa/selectors/core.py,sha256=kkt02DN20gXeaDGoGubPPeeTV7rCr4sxTyELrI0l1YU,3691
@@ -42,7 +42,7 @@ kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,
42
42
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
43
43
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
45
- kodexa-7.0.11275546208.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
- kodexa-7.0.11275546208.dist-info/METADATA,sha256=vFDQjeNzPRbs37bZjiVD8IPuGvU4WNQaI00EBTc-B_M,3529
47
- kodexa-7.0.11275546208.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
- kodexa-7.0.11275546208.dist-info/RECORD,,
45
+ kodexa-7.0.11276748448.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
+ kodexa-7.0.11276748448.dist-info/METADATA,sha256=HNHDyiBjTflGPS_x4S4uhDWn-CrwgMN0mpbA-GrhxoY,3529
47
+ kodexa-7.0.11276748448.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
+ kodexa-7.0.11276748448.dist-info/RECORD,,