kodexa 7.0.9115195405__py3-none-any.whl → 7.0.9196745246__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/client.py +27 -44
- {kodexa-7.0.9115195405.dist-info → kodexa-7.0.9196745246.dist-info}/METADATA +3 -3
- {kodexa-7.0.9115195405.dist-info → kodexa-7.0.9196745246.dist-info}/RECORD +5 -5
- {kodexa-7.0.9115195405.dist-info → kodexa-7.0.9196745246.dist-info}/LICENSE +0 -0
- {kodexa-7.0.9115195405.dist-info → kodexa-7.0.9196745246.dist-info}/WHEEL +0 -0
kodexa/platform/client.py
CHANGED
@@ -2151,13 +2151,13 @@ class ProjectTaxonomiesEndpoint(ProjectResourceEndpoint):
|
|
2151
2151
|
return TaxonomyEndpoint
|
2152
2152
|
|
2153
2153
|
|
2154
|
-
class
|
2154
|
+
class ProjectGuidanceSetsEndpoint(ProjectResourceEndpoint):
|
2155
2155
|
|
2156
2156
|
def get_type(self) -> str:
|
2157
2157
|
return "guidance"
|
2158
2158
|
|
2159
2159
|
def get_instance_class(self, object_dict=None):
|
2160
|
-
return
|
2160
|
+
return GuidanceSetsEndpoint
|
2161
2161
|
|
2162
2162
|
|
2163
2163
|
class ProjectDataFormEndpoint(ProjectResourceEndpoint):
|
@@ -2459,7 +2459,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2459
2459
|
stores: List["StoreEndpoint"] = None,
|
2460
2460
|
taxonomies: List["TaxonomyEndpoint"] = None,
|
2461
2461
|
data_forms: List["DataFormEndpoint"] = None,
|
2462
|
-
guidance: List["
|
2462
|
+
guidance: List["GuidanceSetsEndpoint"] = None,
|
2463
2463
|
dashboards: List["DashboardEndpoint"] = None,
|
2464
2464
|
):
|
2465
2465
|
"""Update the resources of the project.
|
@@ -2540,13 +2540,13 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2540
2540
|
return ProjectTaxonomiesEndpoint().set_client(self.client).set_project(self)
|
2541
2541
|
|
2542
2542
|
@property
|
2543
|
-
def guidance(self) -> "
|
2543
|
+
def guidance(self) -> "ProjectGuidanceEndpoint":
|
2544
2544
|
"""Get the guidance sets endpoint of the project.
|
2545
2545
|
|
2546
2546
|
Returns:
|
2547
2547
|
GuidanceSetsEndpoint: The guidance sets endpoint of the project.
|
2548
2548
|
"""
|
2549
|
-
return
|
2549
|
+
return ProjectGuidanceSetEndpoint().set_client(self.client).set_project(self)
|
2550
2550
|
|
2551
2551
|
@property
|
2552
2552
|
def assistants(self) -> ProjectAssistantsEndpoint:
|
@@ -2582,42 +2582,6 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
2582
2582
|
return [ProjectTag.model_validate(tag) for tag in response.json()]
|
2583
2583
|
|
2584
2584
|
|
2585
|
-
class GuidanceSetsEndpoint(EntitiesEndpoint):
|
2586
|
-
"""Represents a message endpoint"""
|
2587
|
-
|
2588
|
-
def get_type(self) -> str:
|
2589
|
-
"""
|
2590
|
-
Get the type of the endpoint.
|
2591
|
-
|
2592
|
-
Returns:
|
2593
|
-
str: The type of the endpoint, in this case "guidance".
|
2594
|
-
"""
|
2595
|
-
return "guidance"
|
2596
|
-
|
2597
|
-
def get_instance_class(self, object_dict=None):
|
2598
|
-
"""
|
2599
|
-
Get the instance class of the endpoint.
|
2600
|
-
|
2601
|
-
Args:
|
2602
|
-
object_dict (dict, optional): An optional dictionary object. Defaults to None.
|
2603
|
-
|
2604
|
-
Returns:
|
2605
|
-
GuidanceSetEndpoint: The instance class of the endpoint.
|
2606
|
-
"""
|
2607
|
-
return GuidanceSetEndpoint
|
2608
|
-
|
2609
|
-
def get_page_class(self, object_dict=None):
|
2610
|
-
"""
|
2611
|
-
Get the page class of the endpoint.
|
2612
|
-
|
2613
|
-
Args:
|
2614
|
-
object_dict (dict, optional): An optional dictionary object. Defaults to None.
|
2615
|
-
|
2616
|
-
Returns:
|
2617
|
-
PageGuidanceSetEndpoint: The page class of the endpoint.
|
2618
|
-
"""
|
2619
|
-
return PageGuidanceSetEndpoint
|
2620
|
-
|
2621
2585
|
|
2622
2586
|
class MessagesEndpoint(EntitiesEndpoint):
|
2623
2587
|
"""Represents a message endpoint"""
|
@@ -3003,9 +2967,9 @@ class StoresEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
|
3003
2967
|
raise ValueError(f"Unknown store type {object_dict['storeType']}")
|
3004
2968
|
|
3005
2969
|
|
3006
|
-
class
|
2970
|
+
class GuidanceSetsEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
3007
2971
|
"""
|
3008
|
-
Represents a guidance endpoint.
|
2972
|
+
Represents a guidance set endpoint.
|
3009
2973
|
|
3010
2974
|
This class is used to interact with the guidance endpoint of the API.
|
3011
2975
|
It provides methods to get the type, page class, and instance class of the endpoint,
|
@@ -6027,7 +5991,7 @@ OBJECT_TYPES = {
|
|
6027
5991
|
"name": "guidance",
|
6028
5992
|
"plural": "guidance",
|
6029
5993
|
"type": GuidanceSetEndpoint,
|
6030
|
-
"endpoint":
|
5994
|
+
"endpoint": GuidanceSetsEndpoint,
|
6031
5995
|
},
|
6032
5996
|
"modelRuntimes": {
|
6033
5997
|
"name": "modelRuntime",
|
@@ -6652,6 +6616,18 @@ class KodexaClient:
|
|
6652
6616
|
)
|
6653
6617
|
)
|
6654
6618
|
|
6619
|
+
for guidance in project.guidance.list():
|
6620
|
+
guidance_file = os.path.join(
|
6621
|
+
project_export_dir, f"guidance-{guidance.slug}-{guidance.version}.json"
|
6622
|
+
)
|
6623
|
+
with open(guidance_file, "w") as f:
|
6624
|
+
f.write(
|
6625
|
+
json.dumps(
|
6626
|
+
guidance.model_dump(mode="json", by_alias=True), indent=4
|
6627
|
+
)
|
6628
|
+
)
|
6629
|
+
|
6630
|
+
|
6655
6631
|
def import_project(self, organization: OrganizationEndpoint, import_path: str):
|
6656
6632
|
"""
|
6657
6633
|
A method to import a project.
|
@@ -6745,6 +6721,13 @@ class KodexaClient:
|
|
6745
6721
|
taxonomy.ref = None
|
6746
6722
|
taxonomies.append(organization.taxonomies.create(taxonomy))
|
6747
6723
|
|
6724
|
+
for guidance_file in glob.glob(os.path.join(import_path, "guidance-*.json")):
|
6725
|
+
with open(guidance_file, "r") as f:
|
6726
|
+
guidance = GuidanceSetEndpoint.model_validate(json.load(f))
|
6727
|
+
guidance.org_slug = None
|
6728
|
+
guidance.ref = None
|
6729
|
+
organization.guidance.create(guidance)
|
6730
|
+
|
6748
6731
|
import time
|
6749
6732
|
|
6750
6733
|
time.sleep(4)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: kodexa
|
3
|
-
Version: 7.0.
|
3
|
+
Version: 7.0.9196745246
|
4
4
|
Summary: Python SDK for the Kodexa Platform
|
5
5
|
Author: Austin Redenbaugh
|
6
6
|
Author-email: austin@kodexa.com
|
@@ -17,12 +17,12 @@ Requires-Dist: addict (>=2.4.0,<3.0.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: chevron (>=0.14.0,<0.15.0)
|
20
|
-
Requires-Dist: deepdiff (>=
|
20
|
+
Requires-Dist: deepdiff (>=7.0.1,<8.0.0)
|
21
21
|
Requires-Dist: msgpack (>=1.0.6,<2.0.0)
|
22
22
|
Requires-Dist: ply (>=3.11,<4.0)
|
23
23
|
Requires-Dist: pydantic (>=2.5.3,<3.0.0)
|
24
24
|
Requires-Dist: pydantic-yaml (>=1.0.0,<2.0.0)
|
25
|
-
Requires-Dist: pyfunctional (
|
25
|
+
Requires-Dist: pyfunctional (==1.5.0)
|
26
26
|
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
27
27
|
Requires-Dist: pyyaml (>=6.0,<7.0)
|
28
28
|
Requires-Dist: requests (>=2.28.1,<3.0.0)
|
@@ -14,7 +14,7 @@ kodexa/model/persistence.py,sha256=sx5FwTSsWMdAZpAs0-6PqyULHkQyNQClApUKJZ-ly8M,6
|
|
14
14
|
kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
|
15
15
|
kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
|
16
16
|
kodexa/platform/__init__.py,sha256=1O3oiWMg292NPL_NacKDnK1T3_R6cMorrPRue_9e-O4,216
|
17
|
-
kodexa/platform/client.py,sha256=
|
17
|
+
kodexa/platform/client.py,sha256=ZfdDS0L0DK6Zi88fe2cYCcCqQRLamv2ARXkXL4Z7xww,218016
|
18
18
|
kodexa/platform/interaction.py,sha256=6zpcwXKNZstUGNS6m4JsoRXAqCZPJHWI-ZN3co8nnF0,1055
|
19
19
|
kodexa/platform/kodexa.py,sha256=Bvf6x43FWsFuAuQ4N8TvjSZq6niEtBTESmFCWVPASeQ,34024
|
20
20
|
kodexa/selectors/__init__.py,sha256=xA9-4vpyaAZWPSk3bh2kvDLkdv6XEmm7PjFbpziiTIk,100
|
@@ -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.
|
42
|
-
kodexa-7.0.
|
43
|
-
kodexa-7.0.
|
44
|
-
kodexa-7.0.
|
41
|
+
kodexa-7.0.9196745246.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
42
|
+
kodexa-7.0.9196745246.dist-info/METADATA,sha256=hrUtBzWt19-MfOr84_rjc1nCP72GxIoKcYtbnERyqog,3486
|
43
|
+
kodexa-7.0.9196745246.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
44
|
+
kodexa-7.0.9196745246.dist-info/RECORD,,
|
File without changes
|
File without changes
|