kodexa 7.4.413721143850__tar.gz → 7.4.413774708374__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.
Files changed (50) hide show
  1. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/PKG-INFO +1 -1
  2. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/utils.py +3 -0
  3. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/platform/client.py +64 -41
  4. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/pyproject.toml +1 -1
  5. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/LICENSE +0 -0
  6. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/README.md +0 -0
  7. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/__init__.py +0 -0
  8. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/assistant/__init__.py +0 -0
  9. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/assistant/assistant.py +0 -0
  10. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/connectors/__init__.py +0 -0
  11. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/connectors/connectors.py +0 -0
  12. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/dataclasses/__init__.py +0 -0
  13. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
  14. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/__init__.py +0 -0
  15. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/base.py +0 -0
  16. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/entities/__init__.py +0 -0
  17. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/entities/check_response.py +0 -0
  18. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/entities/product.py +0 -0
  19. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/entities/product_group.py +0 -0
  20. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/entities/product_subscription.py +0 -0
  21. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/model.py +0 -0
  22. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/objects.py +0 -0
  23. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/model/persistence.py +0 -0
  24. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/pipeline/__init__.py +0 -0
  25. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/pipeline/pipeline.py +0 -0
  26. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/platform/__init__.py +0 -0
  27. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/platform/interaction.py +0 -0
  28. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/platform/kodexa.py +0 -0
  29. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/__init__.py +0 -0
  30. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/ast.py +0 -0
  31. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/core.py +0 -0
  32. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/lexrules.py +0 -0
  33. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/lextab.py +0 -0
  34. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/lextab.pyi +0 -0
  35. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/parserules.py +0 -0
  36. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/parserules.pyi +0 -0
  37. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/parsetab.py +0 -0
  38. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/selectors/parsetab.pyi +0 -0
  39. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/spatial/__init__.py +0 -0
  40. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/spatial/azure_models.py +0 -0
  41. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/spatial/bbox_common.py +0 -0
  42. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/spatial/table_form_common.py +0 -0
  43. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/steps/__init__.py +0 -0
  44. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/steps/common.py +0 -0
  45. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/testing/__init__.py +0 -0
  46. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/testing/test_components.py +0 -0
  47. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/testing/test_utils.py +0 -0
  48. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/training/__init__.py +0 -0
  49. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/training/train_utils.py +0 -0
  50. {kodexa-7.4.413721143850 → kodexa-7.4.413774708374}/kodexa/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.4.413721143850
3
+ Version: 7.4.413774708374
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -23,6 +23,9 @@ def get_pretty_text_from_lines(lines: list[ContentNode], scale, include_line_uui
23
23
 
24
24
  def get_max_width(lines: list[ContentNode], max_width=None) -> int:
25
25
  if max_width is None:
26
+ if lines is None or len(lines) == 0:
27
+ return 250
28
+
26
29
  # Find the line with the most words
27
30
  max_words_line = max(lines, key=lambda line: sum(len(word.get_all_content()) for word in line.select('//word')))
28
31
 
@@ -908,6 +908,21 @@ class OrganizationsEndpoint(EntitiesEndpoint):
908
908
  if organizations.number_of_elements == 0:
909
909
  return None
910
910
  return organizations.content[0]
911
+
912
+ def find_by_name(self, name) -> Optional["OrganizationEndpoint"]:
913
+ """
914
+ Find an organization by name.
915
+
916
+ Args:
917
+ name (str): The name of the organization.
918
+
919
+ Returns:
920
+ Optional[OrganizationEndpoint]: The organization if found, None otherwise.
921
+ """
922
+ organizations = self.list(filters=["name: '" + name + "'"])
923
+ if organizations.number_of_elements == 0:
924
+ return None
925
+ return organizations.content[0]
911
926
 
912
927
 
913
928
  class PageEndpoint(ClientEndpoint):
@@ -4711,6 +4726,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4711
4726
  friendly_names=False,
4712
4727
  include_ids=True,
4713
4728
  include_exceptions=False,
4729
+ inline_audits=False,
4714
4730
  ) -> str:
4715
4731
  """Get the JSON export for the document family
4716
4732
 
@@ -4719,6 +4735,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4719
4735
  friendly_names (bool): Whether to use friendly names. Defaults to False
4720
4736
  include_ids (bool): Whether to include the IDs. Defaults to True
4721
4737
  include_exceptions (bool): Whether to include the exceptions. Defaults to False
4738
+ inline_audits (bool): Whether to include inline audit information
4722
4739
 
4723
4740
  Returns:
4724
4741
  str: The JSON
@@ -4735,6 +4752,7 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
4735
4752
  "projectId": project_id,
4736
4753
  "includeIds": include_ids,
4737
4754
  "includeExceptions": include_exceptions,
4755
+ "inlineAudits": inline_audits,
4738
4756
  }
4739
4757
 
4740
4758
  response = self.client.get(url, params=params)
@@ -6648,22 +6666,27 @@ class KodexaClient:
6648
6666
  Attributes:
6649
6667
  base_url (str): The base URL for the Kodexa platform.
6650
6668
  access_token (str): The access token for the Kodexa platform.
6651
- organizations (OrganizationsEndpoint): An endpoint for organizations.
6652
- projects (ProjectsEndpoint): An endpoint for projects.
6653
- workspaces (WorkspacesEndpoint): An endpoint for workspaces.
6654
- users (UsersEndpoint): An endpoint for users.
6655
- memberships (MembershipsEndpoint): An endpoint for memberships.
6656
- executions (ExecutionsEndpoint): An endpoint for executions.
6669
+
6670
+ assistants (AssistantsEndpoint): An endpoint for assistants.
6657
6671
  channels (ChannelsEndpoint): An endpoint for channels.
6672
+ executions (ExecutionsEndpoint): An endpoint for executions.
6673
+ memberships (MembershipsEndpoint): An endpoint for memberships.
6658
6674
  messages (MessagesEndpoint): An endpoint for messages.
6659
- assistants (AssistantsEndpoint): An endpoint for assistants.
6675
+ organizations (OrganizationsEndpoint): An endpoint for organizations.
6660
6676
  products (ProductsEndpoint): An endpoint for products.
6661
- tasks (TasksEndpoint): An endpoint for tasks.
6677
+ projects (ProjectsEndpoint): An endpoint for projects.
6662
6678
  retained_guidances (RetainedGuidancesEndpoint): An endpoint for retained guidances.
6679
+ task_activities (TaskActivitiesEndpoint): An endpoint for task activities.
6680
+ task_document_families (TaskDocumentFamiliesEndpoint): An endpoint for task document families.
6681
+ task_tags (TaskTagsEndpoint): An endpoint for task tags.
6682
+ tasks (TasksEndpoint): An endpoint for tasks.
6683
+ users (UsersEndpoint): An endpoint for users.
6684
+ workspaces (WorkspacesEndpoint): An endpoint for workspaces.
6663
6685
  """
6664
6686
 
6665
6687
  def __init__(self, url=None, access_token=None, profile=None):
6666
6688
  from kodexa import KodexaPlatform
6689
+ from kodexa.model.entities.product import ProductsEndpoint
6667
6690
 
6668
6691
  self.base_url = url if url is not None else KodexaPlatform.get_url(profile)
6669
6692
  self.access_token = (
@@ -6671,23 +6694,23 @@ class KodexaClient:
6671
6694
  if access_token is not None
6672
6695
  else KodexaPlatform.get_access_token(profile)
6673
6696
  )
6674
- self.organizations = OrganizationsEndpoint(self)
6675
- self.projects = ProjectsEndpoint(self)
6676
- self.workspaces = WorkspacesEndpoint(self)
6677
- self.users = UsersEndpoint(self)
6678
- self.memberships = MembershipsEndpoint(self)
6679
- self.executions = ExecutionsEndpoint(self)
6680
- self.channels = ChannelsEndpoint(self)
6697
+
6681
6698
  self.assistants = AssistantsEndpoint(self)
6682
- self.messages = MessagesEndpoint(self)
6683
- from kodexa.model.entities.product import ProductsEndpoint
6699
+ self.channels = ChannelsEndpoint(self)
6700
+ self.document_families = DocumentFamiliesEndpoint(self)
6701
+ self.executions = ExecutionsEndpoint(self)
6702
+ self.memberships = MembershipsEndpoint(self)
6703
+ self.messages = MessagesEndpoint(self)
6704
+ self.organizations = OrganizationsEndpoint(self)
6684
6705
  self.products = ProductsEndpoint(self)
6685
- self.tasks = TasksEndpoint(self)
6706
+ self.projects = ProjectsEndpoint(self)
6686
6707
  self.retained_guidances = RetainedGuidancesEndpoint(self)
6687
- self.task_document_families = TaskDocumentFamiliesEndpoint(self)
6688
6708
  self.task_activities = TaskActivitiesEndpoint(self)
6709
+ self.task_document_families = TaskDocumentFamiliesEndpoint(self)
6689
6710
  self.task_tags = TaskTagsEndpoint(self)
6690
- self.document_families = DocumentFamiliesEndpoint(self)
6711
+ self.tasks = TasksEndpoint(self)
6712
+ self.users = UsersEndpoint(self)
6713
+ self.workspaces = WorkspacesEndpoint(self)
6691
6714
 
6692
6715
  @staticmethod
6693
6716
  def login(url, token):
@@ -7258,36 +7281,36 @@ class KodexaClient:
7258
7281
  from kodexa.model.entities.product_subscription import ProductSubscriptionEndpoint
7259
7282
  from kodexa.model.entities.check_response import CheckResponseEndpoint
7260
7283
  known_components = {
7261
- "taxonomy": TaxonomyEndpoint,
7262
- "pipeline": PipelineEndpoint,
7263
7284
  "action": ActionEndpoint,
7264
- "projectTemplate": ProjectTemplateEndpoint,
7265
- "modelRuntime": ModelRuntimeEndpoint,
7266
- "extensionPack": ExtensionPackEndpoint,
7267
- "user": UserEndpoint,
7268
- "project": ProjectEndpoint,
7269
- "membership": MembershipEndpoint,
7270
- "documentFamily": DocumentFamilyEndpoint,
7271
- "organization": OrganizationEndpoint,
7272
- "dataForm": DataFormEndpoint,
7273
- "dashboard": DashboardEndpoint,
7274
- "execution": ExecutionEndpoint,
7275
7285
  "assistant": AssistantDefinitionEndpoint,
7286
+ "channel": ChannelEndpoint,
7287
+ "checkResponse": CheckResponseEndpoint,
7288
+ "dashboard": DashboardEndpoint,
7289
+ "dataForm": DataFormEndpoint,
7290
+ "documentFamily": DocumentFamilyEndpoint,
7276
7291
  "exception": DataExceptionEndpoint,
7277
- "workspace": WorkspaceEndpoint,
7292
+ "execution": ExecutionEndpoint,
7293
+ "extensionPack": ExtensionPackEndpoint,
7294
+ "guidance": GuidanceSetEndpoint,
7295
+ "membership": MembershipEndpoint,
7278
7296
  "message": MessageEndpoint,
7297
+ "modelRuntime": ModelRuntimeEndpoint,
7298
+ "organization": OrganizationEndpoint,
7299
+ "pipeline": PipelineEndpoint,
7300
+ "product": ProductEndpoint,
7301
+ "productSubscription": ProductSubscriptionEndpoint,
7302
+ "project": ProjectEndpoint,
7303
+ "projectTemplate": ProjectTemplateEndpoint,
7279
7304
  "prompt": PromptEndpoint,
7280
- "guidance": GuidanceSetEndpoint,
7281
7305
  "retainedGuidance": RetainedGuidanceEndpoint,
7282
- "channel": ChannelEndpoint,
7283
- "product": ProductEndpoint,
7284
7306
  "task": TaskEndpoint,
7285
- "productSubscription": ProductSubscriptionEndpoint,
7286
- "checkResponse": CheckResponseEndpoint,
7287
- "taskTemplate": TaskTemplateEndpoint,
7288
- "taskDocumentFamily": TaskDocumentFamilyEndpoint,
7289
7307
  "taskActivity": TaskActivityEndpoint,
7308
+ "taskDocumentFamily": TaskDocumentFamilyEndpoint,
7290
7309
  "taskTag": TaskTagEndpoint,
7310
+ "taskTemplate": TaskTemplateEndpoint,
7311
+ "taxonomy": TaxonomyEndpoint,
7312
+ "user": UserEndpoint,
7313
+ "workspace": WorkspaceEndpoint,
7291
7314
  }
7292
7315
 
7293
7316
  if component_type in known_components:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.4.413721143850"
3
+ version = "7.4.413774708374"
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"