kodexa 6.3.36867222293__py3-none-any.whl → 6.3.36922161794__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/objects.py CHANGED
@@ -1924,7 +1924,7 @@ class PipelineImplementationMetadata(BaseModel):
1924
1924
  None, description="The metadata for the steps in this pipeline"
1925
1925
  )
1926
1926
 
1927
- class SubscriptionType(Enum):
1927
+ class ConnectionType(Enum):
1928
1928
  """
1929
1929
  The type of assistant subscription, ie.
1930
1930
  STORE,
@@ -1940,7 +1940,7 @@ class SubscriptionType(Enum):
1940
1940
  CHANNEL = "CHANNEL"
1941
1941
 
1942
1942
 
1943
- class AssistantSubscriptionTemplate(BaseModel):
1943
+ class ProjectAssistantConnection(BaseModel):
1944
1944
  model_config = ConfigDict(
1945
1945
  populate_by_name=True,
1946
1946
  use_enum_values=True,
@@ -1950,8 +1950,10 @@ class AssistantSubscriptionTemplate(BaseModel):
1950
1950
  """
1951
1951
  A template for an assistant subscription
1952
1952
  """
1953
- ref: Optional[str] = Field(None, description="The reference to the metadata object to subscribe to")
1954
- type: Optional[SubscriptionType] = None
1953
+ sourceRef: Optional[str] = Field(None, description="The reference to the metadata object to source")
1954
+ sourceType: Optional[ConnectionType] = None
1955
+ targetRef: Optional[str] = Field(None, description="The reference to the metadata object to target")
1956
+ targetType: Optional[ConnectionType] = None
1955
1957
  subscription: Optional[str] = None
1956
1958
  active: Optional[bool] = True
1957
1959
 
@@ -1975,7 +1977,7 @@ class ProjectAssistant(BaseModel):
1975
1977
  stores: Optional[List[str]] = Field(default_factory=list)
1976
1978
  schedules: Optional[List[ScheduleDefinition]] = Field(default_factory=list)
1977
1979
  subscription: Optional[str] = None
1978
- subscriptions: Optional[List[AssistantSubscriptionTemplate]] = Field(default_factory=list)
1980
+ connections: Optional[List[ProjectAssistantConnection]] = Field(default_factory=list)
1979
1981
  logging_enabled: Optional[bool] = Field(None, alias="loggingEnabled")
1980
1982
  show_in_training: Optional[bool] = Field(None, alias="showInTraining")
1981
1983
  priority_hint: Optional[int] = Field(None, alias="priorityHint")
@@ -675,18 +675,6 @@ class PipelineStatistics:
675
675
 
676
676
  Attributes:
677
677
  documents_processed (int): The number of documents processed.
678
-
679
- """
680
-
681
- """A set of statistics for the processed document
682
-
683
- documents_processed
684
- document_exceptions
685
-
686
- Args:
687
-
688
- Returns:
689
-
690
678
  """
691
679
 
692
680
  def __init__(self):
kodexa/platform/client.py CHANGED
@@ -5537,9 +5537,6 @@ def process_response(response) -> requests.Response:
5537
5537
 
5538
5538
  raise Exception("Bad request " + response.text)
5539
5539
 
5540
- if response.status_code != 200:
5541
- raise Exception(f"Unexpected response ({response.status_code})")
5542
-
5543
5540
  return response
5544
5541
 
5545
5542
  #
kodexa/platform/kodexa.py CHANGED
@@ -356,14 +356,9 @@ class RemoteSession:
356
356
  verify=not KodexaPlatform.get_insecure(),
357
357
  )
358
358
 
359
- if r.status_code != 200:
360
- logger.warning("Unable to create session")
361
- logger.warning(r.text)
362
- raise Exception(
363
- "Unable to create a session, check your URL and access token"
364
- )
359
+ process_response(r)
365
360
 
366
- self.cloud_session = Dict(json.loads(r.text))
361
+ self.cloud_session = json.loads(r.text)
367
362
 
368
363
  def execution_action(self, document, options, attach_source, context):
369
364
  """
@@ -847,10 +842,7 @@ class EventHelper:
847
842
  verify=not KodexaPlatform.get_insecure(),
848
843
  )
849
844
 
850
- if co_response.status_code != 200:
851
- logger.info("Unable to post back object")
852
- logger.error(co_response.text)
853
- raise Exception("Unable to post back content object")
845
+ process_response(co_response)
854
846
 
855
847
  logger.info("Object posted back")
856
848
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 6.3.36867222293
3
+ Version: 6.3.36922161794
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -17,7 +17,6 @@ Requires-Dist: addict (==2.4.0)
17
17
  Requires-Dist: appdirs (>=1.4.4,<2.0.0)
18
18
  Requires-Dist: better-exceptions (>=0.3.3,<0.4.0)
19
19
  Requires-Dist: deepdiff (==6.5.0)
20
- Requires-Dist: jupyter (>=1.0.0,<2.0.0)
21
20
  Requires-Dist: msgpack (==1.0.6)
22
21
  Requires-Dist: ply (>=3.11,<4.0)
23
22
  Requires-Dist: pydantic (==v2.3.0)
@@ -6,13 +6,13 @@ kodexa/connectors/connectors.py,sha256=FpUZDkSyHld2b9eYRuVOWzaFtuGoaRuPXXicJB7TH
6
6
  kodexa/model/__init__.py,sha256=rtLXYJBxB-rnukhslN9rlqoB3--1H3253HyHGbD_Gc8,796
7
7
  kodexa/model/base.py,sha256=KJEupciN3Zrl4ALcSqXmIOQQO2twEdkjXp-M3gEu9z4,489
8
8
  kodexa/model/model.py,sha256=GIHdQkFhE2xu8oLBgSXhZ_bvECcnS6_qrqwCtSbqnZI,114148
9
- kodexa/model/objects.py,sha256=lJR2PwLl2fi373rc50AUbIsjXnrYyu71BTY0CiyhVac,155307
9
+ kodexa/model/objects.py,sha256=koL87BrU3P8ZwVlCvEvSM23QJb7i6A-mFsMor_wiHBc,155454
10
10
  kodexa/model/persistence.py,sha256=TajtXfHp7dL85R5ui9A2h6rLMecDUr6OYZHVgm8CVJw,57360
11
11
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
12
- kodexa/pipeline/pipeline.py,sha256=lgwrENi1HtTd6mN6ys7SjVfiJbwMU6DTmN43fR9OF-c,24462
12
+ kodexa/pipeline/pipeline.py,sha256=cIRFOoJkguIYgNzx6FYrODdBpcY25CM_SULsqSsHeXE,24323
13
13
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
14
- kodexa/platform/client.py,sha256=CaOWUmruNcWnYrQwbv8dtru-eA7B576jhP0Z6kWVwu4,202048
15
- kodexa/platform/kodexa.py,sha256=9bQAQsdz9Q47aJ_RvLUji6OVy1vL6UrbDfQoPk19fkw,32682
14
+ kodexa/platform/client.py,sha256=yJO2T7MleJrYeDPfK8VTqUapZPzv5MzYZ4rx9E1sQIw,201938
15
+ kodexa/platform/kodexa.py,sha256=g9Vcp2CtPn6haCQLc7TEmQmROQ1x8Bdpxfx1iK1KTqU,32292
16
16
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
17
17
  kodexa/selectors/ast.py,sha256=gG-1st841IntgBE5V7p3Cq9azaym2jV5lB_AIywQTCI,13269
18
18
  kodexa/selectors/core.py,sha256=kkt02DN20gXeaDGoGubPPeeTV7rCr4sxTyELrI0l1YU,3691
@@ -34,7 +34,7 @@ kodexa/testing/test_components.py,sha256=4BnzCCOA5v__82mB1TIBPHfNIGJbkZz9PiTZiNK
34
34
  kodexa/testing/test_utils.py,sha256=IWLKBvMHATzrsoO9PQFGcwoGcuZykhAS3QRddfzb_XE,14043
35
35
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
36
36
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- kodexa-6.3.36867222293.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
- kodexa-6.3.36867222293.dist-info/METADATA,sha256=bgg20wAxOe4pWnPD7zanBiVJ7PqRkhmWKloyD45YNaQ,4043
39
- kodexa-6.3.36867222293.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
40
- kodexa-6.3.36867222293.dist-info/RECORD,,
37
+ kodexa-6.3.36922161794.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
38
+ kodexa-6.3.36922161794.dist-info/METADATA,sha256=fodfLhU-gkMiA2DqmyabWosBz_czzh5p_cFrEIGyq0U,4003
39
+ kodexa-6.3.36922161794.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
40
+ kodexa-6.3.36922161794.dist-info/RECORD,,