kodexa 7.4.417153383425__tar.gz → 7.4.417159307192__tar.gz
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-7.4.417153383425 → kodexa-7.4.417159307192}/PKG-INFO +1 -1
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/platform/client.py +30 -19
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/pyproject.toml +1 -1
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/LICENSE +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/README.md +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/dataclasses/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/base.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/model.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/objects.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/platform/manifest.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/utils/__init__.py +0 -0
@@ -1298,12 +1298,6 @@ class TasksEndpoint(EntitiesEndpoint):
|
|
1298
1298
|
response = self.client.post(url, create_body)
|
1299
1299
|
process_response(response)
|
1300
1300
|
|
1301
|
-
try:
|
1302
|
-
logger.info(f"create_with_template response: {response}")
|
1303
|
-
logger.info(f"create_with_template response.json(): {response.json()}")
|
1304
|
-
except Exception as e:
|
1305
|
-
logger.error(f"Error logging create_with_template response: {e}")
|
1306
|
-
|
1307
1301
|
return TaskEndpoint.model_validate(response.json()).set_client(self.client)
|
1308
1302
|
|
1309
1303
|
class TaskTemplateEndpoint(EntityEndpoint, TaskTemplate):
|
@@ -6461,15 +6455,9 @@ class TaxonomiesEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
|
6461
6455
|
def process_response(response) -> requests.Response:
|
6462
6456
|
"""
|
6463
6457
|
This function processes the server response. It checks the status code of the response and raises an exception with
|
6464
|
-
a specific message depending on the status code.
|
6465
|
-
If the status code is
|
6466
|
-
If the status code is
|
6467
|
-
If the status code is 500, it raises an "Internal server error" exception.
|
6468
|
-
If the status code is 400, it checks if the response has a JSON body with an "errors" field.
|
6469
|
-
If so, it raises an exception with a message containing all the errors.
|
6470
|
-
If not, it raises a "Bad request" exception.
|
6471
|
-
If the status code is anything other than 200, it raises an "Unexpected response" exception.
|
6472
|
-
If the status code is 200, it returns the response as is.
|
6458
|
+
a specific message depending on the status code.
|
6459
|
+
If the status code is anything other than 20X, it raises an exception.
|
6460
|
+
If the status code is 20X, it returns the response as is.
|
6473
6461
|
|
6474
6462
|
Args:
|
6475
6463
|
response (requests.Response): The server response to process.
|
@@ -6480,16 +6468,39 @@ def process_response(response) -> requests.Response:
|
|
6480
6468
|
Raises:
|
6481
6469
|
Exception: If the status code is not 200, an exception is raised with a message specific to the status code.
|
6482
6470
|
"""
|
6471
|
+
if response.status_code in [301, 302]:
|
6472
|
+
raise Exception(f"Redirected ({response.text})")
|
6473
|
+
|
6483
6474
|
if response.status_code == 401:
|
6484
6475
|
raise Exception(f"Unauthorized ({response.text})")
|
6476
|
+
|
6477
|
+
if response.status_code == 403:
|
6478
|
+
raise Exception(f"Forbidden ({response.text})")
|
6479
|
+
|
6485
6480
|
if response.status_code == 404:
|
6486
6481
|
raise Exception(f"Not found ({response.text})")
|
6487
|
-
|
6488
|
-
raise Exception(f"Redirected ({response.text})")
|
6482
|
+
|
6489
6483
|
if response.status_code == 405:
|
6490
6484
|
raise Exception("Method not allowed")
|
6485
|
+
|
6486
|
+
if response.status_code == 409:
|
6487
|
+
raise Exception(f"Conflict ({response.text})")
|
6488
|
+
|
6489
|
+
if response.status_code == 422:
|
6490
|
+
raise Exception(f"Unprocessable entity ({response.text})")
|
6491
|
+
|
6491
6492
|
if response.status_code == 500:
|
6492
6493
|
raise Exception("Internal server error: \n" + response.text)
|
6494
|
+
|
6495
|
+
if response.status_code == 502:
|
6496
|
+
raise Exception(f"Bad gateway ({response.text})")
|
6497
|
+
|
6498
|
+
if response.status_code == 503:
|
6499
|
+
raise Exception(f"Service unavailable ({response.text})")
|
6500
|
+
|
6501
|
+
if response.status_code == 504:
|
6502
|
+
raise Exception(f"Gateway timeout ({response.text})")
|
6503
|
+
|
6493
6504
|
if response.status_code == 400:
|
6494
6505
|
if response.json() and response.json().get("errors"):
|
6495
6506
|
messages = []
|
@@ -6497,7 +6508,7 @@ def process_response(response) -> requests.Response:
|
|
6497
6508
|
messages.append(f"{key}: {value}")
|
6498
6509
|
raise Exception(", ".join(messages))
|
6499
6510
|
|
6500
|
-
raise Exception("Bad request
|
6511
|
+
raise Exception(f"Bad request {response.text}")
|
6501
6512
|
|
6502
6513
|
return response
|
6503
6514
|
|
@@ -6932,7 +6943,7 @@ class KodexaClient:
|
|
6932
6943
|
Returns:
|
6933
6944
|
PlatformOverview: The PlatformOverview instance.
|
6934
6945
|
"""
|
6935
|
-
return PlatformOverview.model_validate(self.get("/api").json())
|
6946
|
+
return PlatformOverview.model_validate(self.get("/api/overview").json())
|
6936
6947
|
|
6937
6948
|
def change_password(self, old_password: str, new_password: str):
|
6938
6949
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.417159307192"
|
4
4
|
description = "Python SDK for the Kodexa Platform"
|
5
5
|
authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
|
6
6
|
readme = "README.md"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/dataclasses/templates/llm_data_class.j2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.417153383425 → kodexa-7.4.417159307192}/kodexa/model/entities/product_subscription.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|