kuflow-temporal-workflow-kuflow 3.2.0__tar.gz → 3.2.2__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.
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/PKG-INFO +2 -2
- kuflow_temporal_workflow_kuflow-3.2.2/VERSION +1 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/models/_models.py +73 -1
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/pyproject.toml +2 -2
- kuflow_temporal_workflow_kuflow-3.2.0/VERSION +0 -1
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/README.md +0 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/__init__.py +0 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/_attributes.py +0 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/_uuid7.py +0 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/models/__init__.py +0 -0
- {kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/kuflow_temporal_workflow_kuflow/models/_enums.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: kuflow-temporal-workflow-kuflow
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.2
|
|
4
4
|
Summary: KuFlow SDK :: Temporal.io workflow utilities to interact with KuFlow
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: KuFlow S.L.
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Requires-Dist: kuflow-temporal-common (>=3.2.
|
|
16
|
+
Requires-Dist: kuflow-temporal-common (>=3.2.2,<4.0.0)
|
|
17
17
|
Project-URL: Documentation, https://docs.kuflow.com/
|
|
18
18
|
Project-URL: Homepage, https://kuflow.com/
|
|
19
19
|
Project-URL: Repository, https://github.com/kuflow/kuflow-sdk-python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.2.2
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
#
|
|
24
24
|
|
|
25
25
|
import datetime
|
|
26
|
+
from types import MappingProxyType
|
|
26
27
|
from typing import TYPE_CHECKING, Any, Optional
|
|
27
28
|
|
|
28
29
|
from kuflow_rest._generated import _serialization
|
|
@@ -39,19 +40,90 @@ class WorkflowRequest(_serialization.Model):
|
|
|
39
40
|
"process_id": {"key": "processId", "type": "str"},
|
|
40
41
|
"request_time": {"key": "requestTime", "type": "iso-8601"},
|
|
41
42
|
"request_time_zone": {"key": "requestTimeZone", "type": "str"},
|
|
43
|
+
"extras": {"key": "extras", "type": "{object}"},
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
def __init__(
|
|
46
|
+
def __init__(
|
|
47
|
+
self,
|
|
48
|
+
process_id: str,
|
|
49
|
+
request_time: datetime.datetime,
|
|
50
|
+
request_time_zone: str,
|
|
51
|
+
extras: Optional[dict[str, Any]] = None,
|
|
52
|
+
**kwargs: Any,
|
|
53
|
+
) -> None:
|
|
45
54
|
"""
|
|
46
55
|
Parameters:
|
|
47
56
|
process_id: Identifier of the related created process
|
|
48
57
|
request_time: Request time of the related created process
|
|
49
58
|
request_time_zone: Request time zone of the related created process
|
|
59
|
+
extras: Additional custom data associated with the request
|
|
50
60
|
"""
|
|
51
61
|
super().__init__(**kwargs)
|
|
52
62
|
self.process_id = process_id
|
|
53
63
|
self.request_time = request_time
|
|
54
64
|
self.request_time_zone = request_time_zone
|
|
65
|
+
self._extras: Optional[dict[str, Any]] = None
|
|
66
|
+
if extras is not None:
|
|
67
|
+
self.set_extras(extras)
|
|
68
|
+
|
|
69
|
+
def get_extras(self) -> MappingProxyType[str, Any]:
|
|
70
|
+
"""
|
|
71
|
+
Get the extras dictionary as an immutable mapping.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
An immutable view of the extras dictionary. If no extras are set, returns an empty mapping.
|
|
75
|
+
"""
|
|
76
|
+
if self._extras is None:
|
|
77
|
+
return MappingProxyType({})
|
|
78
|
+
return MappingProxyType(self._extras)
|
|
79
|
+
|
|
80
|
+
def set_extras(self, extras: Optional[dict[str, Any]]) -> None:
|
|
81
|
+
"""
|
|
82
|
+
Set the extras dictionary, replacing any existing extras.
|
|
83
|
+
|
|
84
|
+
Parameters:
|
|
85
|
+
extras: Dictionary of extra values to set. If None or empty, clears existing extras.
|
|
86
|
+
"""
|
|
87
|
+
if self._extras is None:
|
|
88
|
+
self._extras = {}
|
|
89
|
+
|
|
90
|
+
self._extras.clear()
|
|
91
|
+
|
|
92
|
+
if extras is not None and len(extras) > 0:
|
|
93
|
+
self._extras.update(extras)
|
|
94
|
+
|
|
95
|
+
def put_extra_item(self, name: str, value: Any) -> None:
|
|
96
|
+
"""
|
|
97
|
+
Add or update a single item in the extras dictionary.
|
|
98
|
+
|
|
99
|
+
Parameters:
|
|
100
|
+
name: The key for the extra item (required)
|
|
101
|
+
value: The value for the extra item (required)
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
ValueError: If name or value is None
|
|
105
|
+
"""
|
|
106
|
+
if name is None:
|
|
107
|
+
raise ValueError("'name' is required")
|
|
108
|
+
if value is None:
|
|
109
|
+
raise ValueError("'value' is required")
|
|
110
|
+
|
|
111
|
+
if self._extras is None:
|
|
112
|
+
self._extras = {}
|
|
113
|
+
|
|
114
|
+
self._extras[name] = value
|
|
115
|
+
|
|
116
|
+
def get_extra_item(self, name: str) -> Optional[Any]:
|
|
117
|
+
"""
|
|
118
|
+
Get a single item from the extras dictionary.
|
|
119
|
+
|
|
120
|
+
Parameters:
|
|
121
|
+
name: The key of the extra item to retrieve
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
The value associated with the given name, or None if not found
|
|
125
|
+
"""
|
|
126
|
+
return self.get_extras().get(name)
|
|
55
127
|
|
|
56
128
|
|
|
57
129
|
class WorkflowResponse(_serialization.Model):
|
{kuflow_temporal_workflow_kuflow-3.2.0 → kuflow_temporal_workflow_kuflow-3.2.2}/pyproject.toml
RENAMED
|
@@ -17,13 +17,13 @@ requires = ["poetry_core>=1.0.0"]
|
|
|
17
17
|
build-backend = "poetry.core.masonry.api"
|
|
18
18
|
|
|
19
19
|
[tool.poetry]
|
|
20
|
-
version = "3.2.
|
|
20
|
+
version = "3.2.2"
|
|
21
21
|
include = ["VERSION", "README.md", "CHANGELOG.md"]
|
|
22
22
|
packages = [{ include = "kuflow_temporal_workflow_kuflow" }]
|
|
23
23
|
requires-poetry = '>=2.0,<3.0'
|
|
24
24
|
|
|
25
25
|
[tool.poetry.dependencies]
|
|
26
|
-
kuflow-temporal-common = "^3.2.
|
|
26
|
+
kuflow-temporal-common = "^3.2.2"
|
|
27
27
|
|
|
28
28
|
[tool.poetry.group.dev.dependencies]
|
|
29
29
|
mypy = "^1.11.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|