kodexa 7.0.7830325303__py3-none-any.whl → 7.0.7898633185__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
@@ -2918,6 +2918,23 @@ class ProjectWorkspace(BaseModel):
2918
2918
  )
2919
2919
 
2920
2920
 
2921
+ class ChannelParticipant(BaseModel):
2922
+ """
2923
+
2924
+ """
2925
+ model_config = ConfigDict(
2926
+ populate_by_name=True,
2927
+ use_enum_values=True,
2928
+ arbitrary_types_allowed=True,
2929
+ )
2930
+ """
2931
+ A participant in a channel
2932
+ """
2933
+
2934
+ user: Optional[User] = None
2935
+ assistant: Optional[Assistant] = None
2936
+
2937
+
2921
2938
  class Channel(BaseModel):
2922
2939
  """
2923
2940
 
@@ -2936,6 +2953,8 @@ class Channel(BaseModel):
2936
2953
  workspace: Optional[Workspace] = None
2937
2954
  project: Optional[Project] = None
2938
2955
  name: Optional[str] = None
2956
+ is_private: Optional[bool] = Field(None, alias="isPrivate")
2957
+ participants: Optional[List[ChannelParticipant]] = Field(None, alias="participants")
2939
2958
 
2940
2959
 
2941
2960
  class MessageBlock(BaseModel):
kodexa/platform/kodexa.py CHANGED
@@ -213,6 +213,34 @@ class KodexaPlatform:
213
213
 
214
214
  return [org_slug, slug, version]
215
215
 
216
+ @classmethod
217
+ def configure(cls, kodexa_url, access_token, profile=None, insecure=False):
218
+ """
219
+ Configure kodexa access to platform
220
+
221
+ Args
222
+ kodexa_url (str): The URL of the Kodexa platform.
223
+ access_token (str): The access token to use.
224
+ profile (str, optional): The profile to use. Defaults to None.
225
+ insecure (bool, optional): Whether to use insecure connection. Defaults to False.
226
+ """
227
+ kodexa_config = get_config(profile)
228
+ if profile and profile in kodexa_config:
229
+ kodexa_config = get_config(profile)
230
+ kodexa_config[profile] = {
231
+ "url": kodexa_url,
232
+ "access_token": access_token,
233
+ "insecure": insecure,
234
+ }
235
+ else:
236
+ kodexa_config = {
237
+ "url": kodexa_url,
238
+ "access_token": access_token,
239
+ "insecure": insecure
240
+ }
241
+
242
+ save_config(kodexa_config)
243
+
216
244
  @classmethod
217
245
  def login(cls, kodexa_url, username, password, profile=None, insecure=False):
218
246
  """
@@ -518,13 +546,13 @@ class RemotePipeline:
518
546
  """Allow you to interact with a pipeline that has been deployed to an instance of Kodexa Platform"""
519
547
 
520
548
  def __init__(
521
- self,
522
- slug,
523
- connector,
524
- version=None,
525
- attach_source=True,
526
- parameters=None,
527
- auth=None,
549
+ self,
550
+ slug,
551
+ connector,
552
+ version=None,
553
+ attach_source=True,
554
+ parameters=None,
555
+ auth=None,
528
556
  ):
529
557
  logger.info(f"Initializing a new pipeline {slug}")
530
558
 
@@ -588,7 +616,7 @@ class RemotePipeline:
588
616
 
589
617
  @staticmethod
590
618
  def from_file(
591
- slug: str, file_path: str, unpack: bool = False, *args, **kwargs
619
+ slug: str, file_path: str, unpack: bool = False, *args, **kwargs
592
620
  ) -> RemotePipeline:
593
621
  """Creates a new pipeline using a file path as a source.
594
622
 
@@ -626,13 +654,13 @@ class RemotePipeline:
626
654
 
627
655
  @staticmethod
628
656
  def from_folder(
629
- slug: str,
630
- folder_path: str,
631
- filename_filter: str = "*",
632
- recursive: bool = False,
633
- unpack: bool = False,
634
- relative: bool = False,
635
- caller_path: str = get_caller_dir(),
657
+ slug: str,
658
+ folder_path: str,
659
+ filename_filter: str = "*",
660
+ recursive: bool = False,
661
+ unpack: bool = False,
662
+ relative: bool = False,
663
+ caller_path: str = get_caller_dir(),
636
664
  ) -> RemotePipeline:
637
665
  """Creates a pipeline that will run against a set of local files from a folder.
638
666
 
@@ -816,7 +844,7 @@ class EventHelper:
816
844
  return io.BytesIO(co_response.content)
817
845
 
818
846
  def put_content_object(
819
- self, content_object: ContentObject, content
847
+ self, content_object: ContentObject, content
820
848
  ) -> ContentObject:
821
849
  """Puts a content object to the Kodexa platform.
822
850
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.7830325303
3
+ Version: 7.0.7898633185
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -6,14 +6,14 @@ 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=CaZK8nMhT1LdCpt4aLhebJGcorjq9qRID1FjnXnP14M,521
8
8
  kodexa/model/model.py,sha256=mCjDaM0hOIcJtDs4xgWpeqzK5N2Kd7A4MPb0SPClASw,114892
9
- kodexa/model/objects.py,sha256=QYzfdVl2ll-d5_ZJ7rcDCRzH5nxS8oi5NCHBS1xxDI0,171311
9
+ kodexa/model/objects.py,sha256=ZQji0rAfiotLXWZF6JMgnKKtuZKZiLmWmJbh5jI-TqU,171778
10
10
  kodexa/model/persistence.py,sha256=wyN_xpzHwPBQOMCe5dlDcWpFSTCngF4SQZFQAelFMr4,59502
11
11
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
12
12
  kodexa/pipeline/pipeline.py,sha256=cIRFOoJkguIYgNzx6FYrODdBpcY25CM_SULsqSsHeXE,24323
13
13
  kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
14
14
  kodexa/platform/client.py,sha256=35d1XIhHM7FD1X8bq2xEzKOzUZB0rOag8XeXJLrK6p4,210158
15
15
  kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
16
- kodexa/platform/kodexa.py,sha256=g9Vcp2CtPn6haCQLc7TEmQmROQ1x8Bdpxfx1iK1KTqU,32292
16
+ kodexa/platform/kodexa.py,sha256=o1EK8HgT7-y7E3Lf3sVe_5TDP0jnnQ7cl0jbMAdYLfQ,33349
17
17
  kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
18
18
  kodexa/selectors/ast.py,sha256=gG-1st841IntgBE5V7p3Cq9azaym2jV5lB_AIywQTCI,13269
19
19
  kodexa/selectors/core.py,sha256=kkt02DN20gXeaDGoGubPPeeTV7rCr4sxTyELrI0l1YU,3691
@@ -35,7 +35,7 @@ kodexa/testing/test_components.py,sha256=4BnzCCOA5v__82mB1TIBPHfNIGJbkZz9PiTZiNK
35
35
  kodexa/testing/test_utils.py,sha256=IWLKBvMHATzrsoO9PQFGcwoGcuZykhAS3QRddfzb_XE,14043
36
36
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
37
37
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- kodexa-7.0.7830325303.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
39
- kodexa-7.0.7830325303.dist-info/METADATA,sha256=ihcV2Zcptg5bUQRR2Q4ntk-VzQrKioT5ZAm48VXGMsw,4067
40
- kodexa-7.0.7830325303.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
41
- kodexa-7.0.7830325303.dist-info/RECORD,,
38
+ kodexa-7.0.7898633185.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
39
+ kodexa-7.0.7898633185.dist-info/METADATA,sha256=bbpjI1IPk3Uynj3ass54qmtL4SR8RteefwgKxOxq3tc,4067
40
+ kodexa-7.0.7898633185.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
41
+ kodexa-7.0.7898633185.dist-info/RECORD,,