kodexa 7.4.417132965764__tar.gz → 7.4.417158523961__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.417132965764 → kodexa-7.4.417158523961}/PKG-INFO +1 -1
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/platform/client.py +30 -12
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/pyproject.toml +1 -1
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/LICENSE +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/README.md +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/dataclasses/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/base.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/model.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/objects.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/platform/manifest.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.417132965764 → kodexa-7.4.417158523961}/kodexa/utils/__init__.py +0 -0
@@ -1297,6 +1297,7 @@ class TasksEndpoint(EntitiesEndpoint):
|
|
1297
1297
|
}
|
1298
1298
|
response = self.client.post(url, create_body)
|
1299
1299
|
process_response(response)
|
1300
|
+
|
1300
1301
|
return TaskEndpoint.model_validate(response.json()).set_client(self.client)
|
1301
1302
|
|
1302
1303
|
class TaskTemplateEndpoint(EntityEndpoint, TaskTemplate):
|
@@ -6454,15 +6455,9 @@ class TaxonomiesEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
|
|
6454
6455
|
def process_response(response) -> requests.Response:
|
6455
6456
|
"""
|
6456
6457
|
This function processes the server response. It checks the status code of the response and raises an exception with
|
6457
|
-
a specific message depending on the status code.
|
6458
|
-
If the status code is
|
6459
|
-
If the status code is
|
6460
|
-
If the status code is 500, it raises an "Internal server error" exception.
|
6461
|
-
If the status code is 400, it checks if the response has a JSON body with an "errors" field.
|
6462
|
-
If so, it raises an exception with a message containing all the errors.
|
6463
|
-
If not, it raises a "Bad request" exception.
|
6464
|
-
If the status code is anything other than 200, it raises an "Unexpected response" exception.
|
6465
|
-
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.
|
6466
6461
|
|
6467
6462
|
Args:
|
6468
6463
|
response (requests.Response): The server response to process.
|
@@ -6473,16 +6468,39 @@ def process_response(response) -> requests.Response:
|
|
6473
6468
|
Raises:
|
6474
6469
|
Exception: If the status code is not 200, an exception is raised with a message specific to the status code.
|
6475
6470
|
"""
|
6471
|
+
if response.status_code in [301, 302]:
|
6472
|
+
raise Exception(f"Redirected ({response.text})")
|
6473
|
+
|
6476
6474
|
if response.status_code == 401:
|
6477
6475
|
raise Exception(f"Unauthorized ({response.text})")
|
6476
|
+
|
6477
|
+
if response.status_code == 403:
|
6478
|
+
raise Exception(f"Forbidden ({response.text})")
|
6479
|
+
|
6478
6480
|
if response.status_code == 404:
|
6479
6481
|
raise Exception(f"Not found ({response.text})")
|
6480
|
-
|
6481
|
-
raise Exception(f"Redirected ({response.text})")
|
6482
|
+
|
6482
6483
|
if response.status_code == 405:
|
6483
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
|
+
|
6484
6492
|
if response.status_code == 500:
|
6485
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
|
+
|
6486
6504
|
if response.status_code == 400:
|
6487
6505
|
if response.json() and response.json().get("errors"):
|
6488
6506
|
messages = []
|
@@ -6490,7 +6508,7 @@ def process_response(response) -> requests.Response:
|
|
6490
6508
|
messages.append(f"{key}: {value}")
|
6491
6509
|
raise Exception(", ".join(messages))
|
6492
6510
|
|
6493
|
-
raise Exception("Bad request
|
6511
|
+
raise Exception(f"Bad request {response.text}")
|
6494
6512
|
|
6495
6513
|
return response
|
6496
6514
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.417158523961"
|
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.417132965764 → kodexa-7.4.417158523961}/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.417132965764 → kodexa-7.4.417158523961}/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
|