kodexa 7.4.412519057986__tar.gz → 7.4.412519531447__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.412519057986 → kodexa-7.4.412519531447}/PKG-INFO +1 -1
  2. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/entities/product.py +58 -7
  3. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/pyproject.toml +1 -1
  4. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/LICENSE +0 -0
  5. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/README.md +0 -0
  6. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/__init__.py +0 -0
  7. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/assistant/__init__.py +0 -0
  8. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/assistant/assistant.py +0 -0
  9. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/connectors/__init__.py +0 -0
  10. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/connectors/connectors.py +0 -0
  11. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/dataclasses/__init__.py +0 -0
  12. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
  13. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/__init__.py +0 -0
  14. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/base.py +0 -0
  15. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/entities/__init__.py +0 -0
  16. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/entities/check_response.py +0 -0
  17. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/entities/product_group.py +0 -0
  18. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/entities/product_subscription.py +0 -0
  19. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/model.py +0 -0
  20. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/objects.py +0 -0
  21. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/persistence.py +0 -0
  22. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/model/utils.py +0 -0
  23. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/pipeline/__init__.py +0 -0
  24. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/pipeline/pipeline.py +0 -0
  25. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/platform/__init__.py +0 -0
  26. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/platform/client.py +0 -0
  27. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/platform/interaction.py +0 -0
  28. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/platform/kodexa.py +0 -0
  29. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/__init__.py +0 -0
  30. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/ast.py +0 -0
  31. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/core.py +0 -0
  32. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/lexrules.py +0 -0
  33. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/lextab.py +0 -0
  34. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/lextab.pyi +0 -0
  35. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/parserules.py +0 -0
  36. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/parserules.pyi +0 -0
  37. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/parsetab.py +0 -0
  38. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/selectors/parsetab.pyi +0 -0
  39. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/spatial/__init__.py +0 -0
  40. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/spatial/azure_models.py +0 -0
  41. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/spatial/bbox_common.py +0 -0
  42. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/spatial/table_form_common.py +0 -0
  43. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/steps/__init__.py +0 -0
  44. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/steps/common.py +0 -0
  45. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/testing/__init__.py +0 -0
  46. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/testing/test_components.py +0 -0
  47. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/testing/test_utils.py +0 -0
  48. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/training/__init__.py +0 -0
  49. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/training/train_utils.py +0 -0
  50. {kodexa-7.4.412519057986 → kodexa-7.4.412519531447}/kodexa/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.4.412519057986
3
+ Version: 7.4.412519531447
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -1,13 +1,16 @@
1
- from typing import Optional, List
1
+ from decimal import Decimal
2
+ from typing import Optional, List, Set
2
3
 
3
4
  from pydantic import BaseModel, ConfigDict, Field
5
+
4
6
  from kodexa.model.base import StandardDateTime
5
7
  from kodexa.platform.client import EntityEndpoint, PageEndpoint, EntitiesEndpoint
6
8
  from .product_group import ProductGroup
7
9
 
8
- class Product(BaseModel):
9
- """
10
10
 
11
+ class ProjectTemplateMetadata(BaseModel):
12
+ """
13
+ A project template metadata entity
11
14
  """
12
15
  model_config = ConfigDict(
13
16
  populate_by_name=True,
@@ -15,10 +18,40 @@ class Product(BaseModel):
15
18
  arbitrary_types_allowed=True,
16
19
  protected_namespaces=("model_config",),
17
20
  )
21
+
22
+ id: str
23
+
24
+
25
+ class ProductProjectTemplate(BaseModel):
18
26
  """
19
- A product
27
+ A product project template entity representing the relationship between products and project templates
20
28
  """
29
+ model_config = ConfigDict(
30
+ populate_by_name=True,
31
+ use_enum_values=True,
32
+ arbitrary_types_allowed=True,
33
+ protected_namespaces=("model_config",),
34
+ )
21
35
 
36
+ id: Optional[str] = None
37
+ uuid: Optional[str] = None
38
+ change_sequence: Optional[int] = Field(None, alias="changeSequence")
39
+ created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
40
+ updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
41
+ display_order: Optional[int] = Field(None, alias="displayOrder")
42
+ project_template_metadata: Optional[ProjectTemplateMetadata] = Field(None, alias="projectTemplateMetadata")
43
+
44
+
45
+ class Product(BaseModel):
46
+ """
47
+ A product entity representing a product in the Kodexa platform
48
+ """
49
+ model_config = ConfigDict(
50
+ populate_by_name=True,
51
+ use_enum_values=True,
52
+ arbitrary_types_allowed=True,
53
+ protected_namespaces=("model_config",),
54
+ )
22
55
 
23
56
  id: Optional[str] = None
24
57
  uuid: Optional[str] = None
@@ -28,7 +61,26 @@ class Product(BaseModel):
28
61
  name: str
29
62
  description: Optional[str] = None
30
63
  overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown")
31
- product_group: ProductGroup
64
+ product_group: ProductGroup = Field(..., alias="productGroup")
65
+ parent: Optional['Product'] = None
66
+ image_url: Optional[str] = Field(None, alias="imageUrl")
67
+ price_id: Optional[str] = Field(None, alias="priceId")
68
+ price: Optional[Decimal] = None
69
+ number_of_credits: Optional[int] = Field(None, alias="numberOfCredits")
70
+ price_suffix: Optional[str] = Field(None, alias="priceSuffix")
71
+ has_quantity: bool = Field(False, alias="hasQuantity")
72
+ active: bool = True
73
+ order: Optional[int] = None
74
+ promoted: Optional[bool] = None
75
+ product_project_templates: Optional[Set[ProductProjectTemplate]] = Field(None, alias="productProjectTemplates")
76
+ search_text: Optional[str] = None
77
+
78
+ def update_search_text(self):
79
+ """Updates the search text for the product"""
80
+ if self.product_group:
81
+ self.search_text = f"{self.name.lower()} {self.product_group.name.lower()}"
82
+ else:
83
+ self.search_text = self.name.lower()
32
84
 
33
85
 
34
86
  class ProductEndpoint(Product, EntityEndpoint):
@@ -54,7 +106,7 @@ class ProductEndpoint(Product, EntityEndpoint):
54
106
 
55
107
  class PageProduct(BaseModel):
56
108
  """
57
-
109
+ Represents a paginated list of products
58
110
  """
59
111
  model_config = ConfigDict(
60
112
  populate_by_name=True,
@@ -67,7 +119,6 @@ class PageProduct(BaseModel):
67
119
  size: Optional[int] = None
68
120
  content: Optional[List[Product]] = None
69
121
  number: Optional[int] = None
70
-
71
122
  number_of_elements: Optional[int] = Field(None, alias="numberOfElements")
72
123
  first: Optional[bool] = None
73
124
  last: Optional[bool] = None
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.4.412519057986"
3
+ version = "7.4.412519531447"
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"