kodexa 6.0.193__tar.gz → 6.0.195__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-6.0.193 → kodexa-6.0.195}/PKG-INFO +1 -1
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/model/objects.py +45 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/platform/client.py +59 -2
- {kodexa-6.0.193 → kodexa-6.0.195}/pyproject.toml +1 -1
- {kodexa-6.0.193 → kodexa-6.0.195}/setup.py +1 -1
- {kodexa-6.0.193 → kodexa-6.0.195}/LICENSE +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/README.md +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/assistant/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/assistant/assistant.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/connectors/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/connectors/connectors.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/model/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/model/base.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/model/model.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/model/persistence.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/platform/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/platform/kodexa.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/ast.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/core.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/lextab.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/parserules.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/spatial/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/steps/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/steps/common.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/testing/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/testing/test_components.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/testing/test_utils.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/training/__init__.py +0 -0
- {kodexa-6.0.193 → kodexa-6.0.195}/kodexa/training/train_utils.py +0 -0
@@ -1649,6 +1649,38 @@ class FeatureSet(KodexaBaseModel):
|
|
1649
1649
|
node_features: Optional[List[NodeFeatures]] = Field(None, alias='nodeFeatures')
|
1650
1650
|
|
1651
1651
|
|
1652
|
+
class DocumentViewState(KodexaBaseModel):
|
1653
|
+
id: Optional[str] = Field(None, description='The ID of the document view')
|
1654
|
+
index: Optional[int] = None
|
1655
|
+
document_family_id: Optional[str] = Field(None, alias='documentFamilyId')
|
1656
|
+
properties: Optional[Dict[str, Any]] = None
|
1657
|
+
|
1658
|
+
|
1659
|
+
class DataFormState(KodexaBaseModel):
|
1660
|
+
id: Optional[str] = Field(None, description='The ID of the document view')
|
1661
|
+
index: Optional[int] = None
|
1662
|
+
properties: Optional[Dict[str, Any]] = None
|
1663
|
+
|
1664
|
+
data_form_ref: Optional[str] = Field(None, alias='dataFormRef')
|
1665
|
+
document_family_ids: Optional[List[str]] = Field(None, alias='documentFamilyIds')
|
1666
|
+
data_object_ids: Optional[List[str]] = Field(None, alias='dataObjectIds')
|
1667
|
+
|
1668
|
+
|
1669
|
+
class WorkspaceStorage(KodexaBaseModel):
|
1670
|
+
document_view_states: Optional[List[DocumentViewState]] = Field(None, alias='documentViewStates')
|
1671
|
+
data_form_states: Optional[List[DataFormState]] = Field(None, alias='dataFormStates')
|
1672
|
+
|
1673
|
+
|
1674
|
+
class Workspace(KodexaBaseModel):
|
1675
|
+
id: Optional[str] = Field(None, description='The ID of the workspace')
|
1676
|
+
uuid: Optional[str] = None
|
1677
|
+
created_on: Optional[datetime] = Field(None, alias='createdOn')
|
1678
|
+
updated_on: Optional[datetime] = Field(None, alias='updatedOn')
|
1679
|
+
project: Optional[Project] = None
|
1680
|
+
name: Optional[str] = None
|
1681
|
+
description: Optional[str] = None
|
1682
|
+
|
1683
|
+
|
1652
1684
|
class DataAttribute(KodexaBaseModel):
|
1653
1685
|
id: Optional[str] = Field(None, description='The ID of the object')
|
1654
1686
|
uuid: Optional[str] = None
|
@@ -1835,6 +1867,19 @@ class PageProject(KodexaBaseModel):
|
|
1835
1867
|
empty: Optional[bool] = None
|
1836
1868
|
|
1837
1869
|
|
1870
|
+
class PageWorkspace(KodexaBaseModel):
|
1871
|
+
total_pages: Optional[int] = Field(None, alias='totalPages')
|
1872
|
+
total_elements: Optional[int] = Field(None, alias='totalElements')
|
1873
|
+
size: Optional[int] = None
|
1874
|
+
content: Optional[List[Workspace]] = None
|
1875
|
+
number: Optional[int] = None
|
1876
|
+
pageable: Optional[PageableObject] = None
|
1877
|
+
number_of_elements: Optional[int] = Field(None, alias='numberOfElements')
|
1878
|
+
first: Optional[bool] = None
|
1879
|
+
last: Optional[bool] = None
|
1880
|
+
empty: Optional[bool] = None
|
1881
|
+
|
1882
|
+
|
1838
1883
|
class PageOrganization(KodexaBaseModel):
|
1839
1884
|
total_pages: Optional[int] = Field(None, alias='totalPages')
|
1840
1885
|
total_elements: Optional[int] = Field(None, alias='totalElements')
|
@@ -32,7 +32,7 @@ from kodexa.model.objects import PageStore, PageTaxonomy, PageProject, PageOrgan
|
|
32
32
|
PageDataObject, Assistant, ProjectTemplate, PageExtensionPack, DeploymentOptions, PageMembership, Membership, \
|
33
33
|
PageDocumentFamily, ProjectResourcesUpdate, DataAttribute, PageNote, PageDataForm, DataForm, Store, PageExecution, \
|
34
34
|
Dashboard, PageAction, PagePipeline, DocumentStatus, ModelTraining, PageModelTraining, ContentException, Option, \
|
35
|
-
CustomEvent, ProjectTag, PageDataException, DataException, ReprocessRequest
|
35
|
+
CustomEvent, ProjectTag, PageDataException, DataException, ReprocessRequest, PageWorkspace, Workspace
|
36
36
|
|
37
37
|
logger = logging.getLogger()
|
38
38
|
|
@@ -587,6 +587,14 @@ class PageProjectEndpoint(PageProject, PageEndpoint):
|
|
587
587
|
return "project"
|
588
588
|
|
589
589
|
|
590
|
+
class PageWorkspaceEndpoint(PageWorkspace, PageEndpoint):
|
591
|
+
"""Represents a page workspace endpoints"""
|
592
|
+
|
593
|
+
def get_type(self) -> Optional[str]:
|
594
|
+
"""Get the type of the endpoint"""
|
595
|
+
return "workspace"
|
596
|
+
|
597
|
+
|
590
598
|
class PageProjectTemplateEndpoint(PageProjectTemplate, PageEndpoint):
|
591
599
|
pass
|
592
600
|
|
@@ -929,6 +937,30 @@ class ProjectModelStoresEndpoint(ProjectResourceEndpoint):
|
|
929
937
|
return ModelStoreEndpoint
|
930
938
|
|
931
939
|
|
940
|
+
class WorkspaceEndpoint(EntityEndpoint, Workspace):
|
941
|
+
"""Represents a workspace endpoint"""
|
942
|
+
|
943
|
+
def get_type(self) -> str:
|
944
|
+
"""Get the type of the endpoint"""
|
945
|
+
return "workspaces"
|
946
|
+
|
947
|
+
def add_document_family(self, document_family: DocumentFamily):
|
948
|
+
url = f"/api/workspaces/{self.id}/documentFamilies"
|
949
|
+
response = self.client.post(url, body=document_family.to_dict())
|
950
|
+
process_response(response)
|
951
|
+
|
952
|
+
def remove_document_family(self, document_family: DocumentFamily):
|
953
|
+
url = f"/api/workspaces/{self.id}/documentFamilies/{document_family.id}"
|
954
|
+
response = self.client.delete(url)
|
955
|
+
process_response(response)
|
956
|
+
|
957
|
+
def list_document_families(self, page_size=10, page=1) -> PageDocumentFamilyEndpoint:
|
958
|
+
url = f"/api/workspaces/{self.id}/documentFamilies"
|
959
|
+
response = self.client.get(url, {"pageSize": page_size, "page": page})
|
960
|
+
process_response(response)
|
961
|
+
return PageDocumentFamilyEndpoint.parse_obj(response.json()).set_client(self.client)
|
962
|
+
|
963
|
+
|
932
964
|
class ProjectEndpoint(EntityEndpoint, Project):
|
933
965
|
"""Represents a project endpoint"""
|
934
966
|
|
@@ -990,6 +1022,22 @@ class ProjectEndpoint(EntityEndpoint, Project):
|
|
990
1022
|
return [ProjectTag.parse_obj(tag) for tag in response.json()]
|
991
1023
|
|
992
1024
|
|
1025
|
+
class WorkspacesEndpoint(EntitiesEndpoint):
|
1026
|
+
"""Represents a workspaces endpoint"""
|
1027
|
+
|
1028
|
+
def get_type(self) -> str:
|
1029
|
+
"""Get the type of the endpoint"""
|
1030
|
+
return f"workspaces"
|
1031
|
+
|
1032
|
+
def get_instance_class(self, object_dict=None) -> Type[BaseModel]:
|
1033
|
+
"""Get the instance class of the endpoint"""
|
1034
|
+
return WorkspaceEndpoint
|
1035
|
+
|
1036
|
+
def get_page_class(self, object_dict=None) -> Type[BaseModel]:
|
1037
|
+
"""Get the page class of the endpoint"""
|
1038
|
+
return PageWorkspaceEndpoint
|
1039
|
+
|
1040
|
+
|
993
1041
|
class ProjectsEndpoint(EntitiesEndpoint):
|
994
1042
|
"""Represents a projects endpoint"""
|
995
1043
|
|
@@ -2418,6 +2466,13 @@ OBJECT_TYPES = {
|
|
2418
2466
|
"endpoint": ProjectsEndpoint,
|
2419
2467
|
"global": True
|
2420
2468
|
},
|
2469
|
+
"workspaces": {
|
2470
|
+
"name": "workspace",
|
2471
|
+
"plural": "workspaces",
|
2472
|
+
"type": WorkspaceEndpoint,
|
2473
|
+
"endpoint": WorkspacesEndpoint,
|
2474
|
+
"global": True
|
2475
|
+
},
|
2421
2476
|
"projectTemplates": {
|
2422
2477
|
"name": "projectTemplate",
|
2423
2478
|
"plural": "projectTemplates",
|
@@ -2511,6 +2566,7 @@ class KodexaClient:
|
|
2511
2566
|
self.access_token = access_token if access_token is not None else KodexaPlatform.get_access_token()
|
2512
2567
|
self.organizations = OrganizationsEndpoint(self)
|
2513
2568
|
self.projects = ProjectsEndpoint(self)
|
2569
|
+
self.workspaces = WorkspacesEndpoint(self)
|
2514
2570
|
self.users = UsersEndpoint(self)
|
2515
2571
|
self.memberships = MembershipsEndpoint(self)
|
2516
2572
|
self.executions = ExecutionsEndpoint(self)
|
@@ -2778,7 +2834,8 @@ class KodexaClient:
|
|
2778
2834
|
"dashboard": DashboardEndpoint,
|
2779
2835
|
"execution": ExecutionEndpoint,
|
2780
2836
|
"assistant": AssistantDefinitionEndpoint,
|
2781
|
-
"exception": DataExceptionEndpoint
|
2837
|
+
"exception": DataExceptionEndpoint,
|
2838
|
+
"workspace": WorkspaceEndpoint,
|
2782
2839
|
}
|
2783
2840
|
|
2784
2841
|
if component_type in known_components:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "6.0.
|
3
|
+
version = "6.0.195"
|
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"
|
@@ -37,7 +37,7 @@ install_requires = \
|
|
37
37
|
|
38
38
|
setup_kwargs = {
|
39
39
|
'name': 'kodexa',
|
40
|
-
'version': '6.0.
|
40
|
+
'version': '6.0.195',
|
41
41
|
'description': 'Python SDK for the Kodexa Platform',
|
42
42
|
'long_description': '# Kodexa\n\n[](https://github.com/kodexa-ai/kodexa/actions/workflows/main.yml)\n\n\n\nKodexa is a platform for building intelligent document processing pipelines. It is a set of tools and services that\nallow you to build a pipeline that can take a document, extract the content, and then process it to extract the\ninformation you need.\n\nIt is built on a set of core principles:\n\n* **Document Centric** - Kodexa is built around the idea of a document. A document is a collection of content\n nodes that are connected together. This is a powerful model that allows you to build pipelines that can\n extract content from a wide range of sources.\n\n* **Pipeline Oriented** - Kodexa is built around the idea of a pipeline. A pipeline is a series of steps that\n can be executed on a document. This allows you to build a pipeline that can extract content from a wide range\n of sources.\n\n* **Extensible** - Kodexa is built around the idea of a pipeline. A pipeline is a series of steps that can be executed\n on a document. This allows you to build a pipeline that can extract content from a wide range of sources.\n\n* **Label Driven** - Kodexa focuses on the idea of labels. Labels are a way to identify content within a document\n and then use that content to drive the processing of the document.\n\n# Python SDK\n\nThis repository contains the Python SDK for Kodexa. The SDK is the primary way to interact with Kodexa. It allows you to\ndefine actions, models, and pipelines that can be executed on Kodexa. It also includes a complete SDK client for\nworking with a Kodexa platform instance.\n\n## Documentation & Examples\n\nDocumentation is available at the [Kodexa Documentation Portal](https://docs.kodexa.com)\n\n## Current Development\n\nThe main branch is 6.0 which is a production release.\n\n## Set-up\n\nWe use poetry to manage our dependencies, so you can install them with:\n\n poetry install\n\nYou can then run the tests with:\n\n poetry run pytest\n\n# Contributing\n\nWe welcome contributions to the Kodexa platform. Please see our [contributing guide](CONTRIBUTING.md) for more details.\n\n# License\n\nApache 2.0\n',
|
43
43
|
'author': 'Austin Redenbaugh',
|
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
|
File without changes
|
File without changes
|
File without changes
|