kodexa 7.0.8897197016__tar.gz → 7.0.8901087762__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.0.8897197016 → kodexa-7.0.8901087762}/PKG-INFO +1 -1
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/platform/client.py +43 -41
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/pyproject.toml +1 -1
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/LICENSE +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/README.md +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/base.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/model.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/objects.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/model/persistence.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/core.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/steps/common.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/training/__init__.py +0 -0
- {kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/kodexa/training/train_utils.py +0 -0
@@ -888,44 +888,6 @@ class OrganizationsEndpoint(EntitiesEndpoint):
|
|
888
888
|
return None
|
889
889
|
return organizations.content[0]
|
890
890
|
|
891
|
-
def get_subscriptions(self, page: int = 1, page_size: int = 10) -> "PageProductSubscriptionEndpoint":
|
892
|
-
"""
|
893
|
-
Get the subscriptions of the organization.
|
894
|
-
|
895
|
-
Returns:
|
896
|
-
The subscriptions of the organization.
|
897
|
-
"""
|
898
|
-
url = f"/api/productSubscriptions"
|
899
|
-
params = {
|
900
|
-
filter: f"organization.id: '{self.organization.id}'",
|
901
|
-
}
|
902
|
-
response = self.client.get(url, params=params)
|
903
|
-
|
904
|
-
from kodexa.model.entities.product_subscription import PageProductSubscriptionEndpoint
|
905
|
-
return PageProductSubscriptionEndpoint.model_validate(response.json()).set_client(self.client)
|
906
|
-
|
907
|
-
def remove_subscription(self, subscription_id: str) -> None:
|
908
|
-
"""
|
909
|
-
Remove a subscription from the organization.
|
910
|
-
|
911
|
-
Args:
|
912
|
-
subscription_id (str): The id of the subscription to remove.
|
913
|
-
"""
|
914
|
-
url = f"/api/productSubscriptions/{subscription_id}"
|
915
|
-
self.client.delete(url)
|
916
|
-
|
917
|
-
def add_subscription(self, product: "Product") -> None:
|
918
|
-
"""
|
919
|
-
Add a subscription to the organization.
|
920
|
-
|
921
|
-
Args:
|
922
|
-
product (Product): The product to subscribe to.
|
923
|
-
"""
|
924
|
-
url = f"/api/productSubscriptions"
|
925
|
-
from kodexa.model.entities.product_subscription import ProductSubscription
|
926
|
-
new_product_subscription = ProductSubscription(organization=self.organization, product=product)
|
927
|
-
self.client.post(url, body=new_product_subscription.model_dump_json(by_alias=True))
|
928
|
-
|
929
891
|
|
930
892
|
class PageEndpoint(ClientEndpoint):
|
931
893
|
"""
|
@@ -1672,6 +1634,45 @@ class OrganizationEndpoint(Organization, EntityEndpoint):
|
|
1672
1634
|
response = self.client.get(url, params={"page": page, "pageSize": page_size, "query": query})
|
1673
1635
|
return PageAssistantDefinitionEndpoint.model_validate(response.json()).set_client(self.client)
|
1674
1636
|
|
1637
|
+
def get_subscriptions(self, page: int = 1, page_size: int = 10) -> "PageProductSubscriptionEndpoint":
|
1638
|
+
"""
|
1639
|
+
Get the subscriptions of the organization.
|
1640
|
+
|
1641
|
+
Returns:
|
1642
|
+
The subscriptions of the organization.
|
1643
|
+
"""
|
1644
|
+
url = f"/api/productSubscriptions"
|
1645
|
+
params = {
|
1646
|
+
filter: f"organization.id: '{self.id}'",
|
1647
|
+
}
|
1648
|
+
response = self.client.get(url, params=params)
|
1649
|
+
|
1650
|
+
from kodexa.model.entities.product_subscription import PageProductSubscriptionEndpoint
|
1651
|
+
return PageProductSubscriptionEndpoint.model_validate(response.json()).set_client(self.client)
|
1652
|
+
|
1653
|
+
def remove_subscription(self, subscription_id: str) -> None:
|
1654
|
+
"""
|
1655
|
+
Remove a subscription from the organization.
|
1656
|
+
|
1657
|
+
Args:
|
1658
|
+
subscription_id (str): The id of the subscription to remove.
|
1659
|
+
"""
|
1660
|
+
url = f"/api/productSubscriptions/{subscription_id}"
|
1661
|
+
self.client.delete(url)
|
1662
|
+
|
1663
|
+
def add_subscription(self, product: "Product") -> None:
|
1664
|
+
"""
|
1665
|
+
Add a subscription to the organization.
|
1666
|
+
|
1667
|
+
Args:
|
1668
|
+
product (Product): The product to subscribe to.
|
1669
|
+
"""
|
1670
|
+
url = f"/api/productSubscriptions"
|
1671
|
+
from kodexa.model.entities.product_subscription import ProductSubscription
|
1672
|
+
new_product_subscription = ProductSubscription(organization=self.detach(), product=product)
|
1673
|
+
print(new_product_subscription.model_dump_json(by_alias=True))
|
1674
|
+
self.client.post(url, body=json.loads(new_product_subscription.model_dump_json(by_alias=True)))
|
1675
|
+
|
1675
1676
|
|
1676
1677
|
class ComponentsEndpoint(ClientEndpoint):
|
1677
1678
|
"""
|
@@ -6127,9 +6128,10 @@ class ExtractionEngineEndpoint:
|
|
6127
6128
|
"""
|
6128
6129
|
response = self.client.post(
|
6129
6130
|
"/api/extractionEngine/extract",
|
6130
|
-
data={"taxonomyJson": taxonomy.model_dump_json()},
|
6131
|
+
data={"taxonomyJson": taxonomy.model_dump_json(by_alias=True)},
|
6131
6132
|
files={"document": document.to_kddb()},
|
6132
6133
|
)
|
6134
|
+
print(response.json())
|
6133
6135
|
return [
|
6134
6136
|
DataObject.model_validate(data_object) for data_object in response.json()
|
6135
6137
|
]
|
@@ -6150,7 +6152,7 @@ class ExtractionEngineEndpoint:
|
|
6150
6152
|
response = self.client.post(
|
6151
6153
|
"/api/extractionEngine/extract",
|
6152
6154
|
params="full",
|
6153
|
-
data={"taxonomyJson": taxonomy.model_dump_json()},
|
6155
|
+
data={"taxonomyJson": taxonomy.model_dump_json(by_alias=True)},
|
6154
6156
|
files={"document": document.to_kddb()},
|
6155
6157
|
)
|
6156
6158
|
return {
|
@@ -6181,7 +6183,7 @@ class ExtractionEngineEndpoint:
|
|
6181
6183
|
response = self.client.post(
|
6182
6184
|
"/api/extractionEngine/extract",
|
6183
6185
|
params={"format": format},
|
6184
|
-
data={"taxonomyJson": taxonomy.model_dump_json()},
|
6186
|
+
data={"taxonomyJson": taxonomy.model_dump_json(by_alias=True)},
|
6185
6187
|
files={"document": document.to_kddb()},
|
6186
6188
|
)
|
6187
6189
|
return response.text
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.0.
|
3
|
+
version = "7.0.08901087762"
|
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
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.0.8897197016 → kodexa-7.0.8901087762}/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
|