ddeutil-workflow 0.0.64__py3-none-any.whl → 0.0.65__py3-none-any.whl
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.
- ddeutil/workflow/__about__.py +1 -1
- ddeutil/workflow/__init__.py +1 -1
- ddeutil/workflow/api/routes/job.py +2 -2
- ddeutil/workflow/conf.py +0 -4
- ddeutil/workflow/{exceptions.py → errors.py} +49 -11
- ddeutil/workflow/job.py +249 -118
- ddeutil/workflow/params.py +11 -11
- ddeutil/workflow/result.py +86 -10
- ddeutil/workflow/reusables.py +15 -17
- ddeutil/workflow/stages.py +676 -450
- ddeutil/workflow/utils.py +33 -0
- ddeutil/workflow/workflow.py +163 -664
- {ddeutil_workflow-0.0.64.dist-info → ddeutil_workflow-0.0.65.dist-info}/METADATA +14 -12
- ddeutil_workflow-0.0.65.dist-info/RECORD +28 -0
- {ddeutil_workflow-0.0.64.dist-info → ddeutil_workflow-0.0.65.dist-info}/WHEEL +1 -1
- ddeutil_workflow-0.0.64.dist-info/RECORD +0 -28
- {ddeutil_workflow-0.0.64.dist-info → ddeutil_workflow-0.0.65.dist-info}/entry_points.txt +0 -0
- {ddeutil_workflow-0.0.64.dist-info → ddeutil_workflow-0.0.65.dist-info}/licenses/LICENSE +0 -0
- {ddeutil_workflow-0.0.64.dist-info → ddeutil_workflow-0.0.65.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ddeutil-workflow
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.65
|
4
4
|
Summary: Lightweight workflow orchestration
|
5
5
|
Author-email: ddeutils <korawich.anu@gmail.com>
|
6
6
|
License: MIT
|
@@ -23,7 +23,7 @@ Requires-Python: >=3.9.13
|
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
License-File: LICENSE
|
25
25
|
Requires-Dist: ddeutil[checksum]>=0.4.8
|
26
|
-
Requires-Dist: ddeutil-io[toml,yaml]>=0.2.
|
26
|
+
Requires-Dist: ddeutil-io[toml,yaml]>=0.2.14
|
27
27
|
Requires-Dist: pydantic==2.11.4
|
28
28
|
Requires-Dist: pydantic-extra-types==2.10.4
|
29
29
|
Requires-Dist: python-dotenv==1.1.0
|
@@ -222,32 +222,35 @@ value (This config can override by extra parameters with `registry_caller` key).
|
|
222
222
|
|
223
223
|
```python
|
224
224
|
from ddeutil.workflow import Result, CallerSecret, tag
|
225
|
-
from ddeutil.workflow.
|
225
|
+
from ddeutil.workflow.errors import StageError
|
226
226
|
from pydantic import BaseModel
|
227
227
|
|
228
|
+
|
228
229
|
class AwsCredential(BaseModel):
|
229
230
|
path: str
|
230
231
|
access_client_id: str
|
231
232
|
access_client_secret: CallerSecret
|
232
233
|
|
234
|
+
|
233
235
|
class RestAuth(BaseModel):
|
234
236
|
type: str
|
235
237
|
keys: CallerSecret
|
236
238
|
|
239
|
+
|
237
240
|
@tag("requests", alias="get-api-with-oauth-to-s3")
|
238
241
|
def get_api_with_oauth_to_s3(
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
242
|
+
method: str,
|
243
|
+
url: str,
|
244
|
+
body: dict[str, str],
|
245
|
+
auth: RestAuth,
|
246
|
+
writing_node: str,
|
247
|
+
aws: AwsCredential,
|
248
|
+
result: Result,
|
246
249
|
) -> dict[str, int]:
|
247
250
|
result.trace.info("[CALLER]: Start get data via RestAPI to S3.")
|
248
251
|
result.trace.info(f"... {method}: {url}")
|
249
252
|
if method != "post":
|
250
|
-
|
253
|
+
raise StageError(f"RestAPI does not support for {method} action.")
|
251
254
|
# NOTE: If you want to use secret, you can use `auth.keys.get_secret_value()`.
|
252
255
|
return {"records": 1000}
|
253
256
|
```
|
@@ -282,7 +285,6 @@ it will use default value and do not raise any error to you.
|
|
282
285
|
| **CONF_PATH** | Core | `./conf` | The config path that keep all template `.yaml` files. |
|
283
286
|
| **TIMEZONE** | Core | `Asia/Bangkok` | A Timezone string value that will pass to `ZoneInfo` object. |
|
284
287
|
| **STAGE_DEFAULT_ID** | Core | `false` | A flag that enable default stage ID that use for catch an execution output. |
|
285
|
-
| **STAGE_RAISE_ERROR** | Core | `false` | A flag that all stage raise StageException from stage execution. |
|
286
288
|
| **MAX_CRON_PER_WORKFLOW** | Core | `5` | |
|
287
289
|
| **MAX_QUEUE_COMPLETE_HIST** | Core | `16` | |
|
288
290
|
| **GENERATE_ID_SIMPLE_MODE** | Core | `true` | A flog that enable generating ID with `md5` algorithm. |
|
@@ -0,0 +1,28 @@
|
|
1
|
+
ddeutil/workflow/__about__.py,sha256=HQ_82TqpLyt4QUTSUNDK94y4NkrRcrX9-AKR-fDwuWU,28
|
2
|
+
ddeutil/workflow/__cron.py,sha256=BOKQcreiex0SAigrK1gnLxpvOeF3aca_rQwyz9Kfve4,28751
|
3
|
+
ddeutil/workflow/__init__.py,sha256=JfFZlPRDgR2J0rb0SRejt1OSrOrD3GGv9Um14z8MMfs,901
|
4
|
+
ddeutil/workflow/__main__.py,sha256=x-sYedl4T8p6054aySk-EQX6vhytvPR0HvaBNYxMzp0,364
|
5
|
+
ddeutil/workflow/__types.py,sha256=uNfoRbVmNK5O37UUMVnqcmoghD9oMS1q9fXC0APnjSI,4584
|
6
|
+
ddeutil/workflow/conf.py,sha256=VKtnD-Duuf_tPOCUfM6oa86-CrqeCj8kiQbzPLPUXx0,14807
|
7
|
+
ddeutil/workflow/errors.py,sha256=evZYwNrvAvY1jpCqqZFkBCdaZ7GN-JbYJMYL6tJmm-0,2980
|
8
|
+
ddeutil/workflow/event.py,sha256=S2eJAZZx_V5TuQ0l417hFVCtjWXnfNPZBgSCICzxQ48,11041
|
9
|
+
ddeutil/workflow/job.py,sha256=9toh8L9MlQqyy3U3WYierdA03ohf0LOhffaPIOY2IYU,39126
|
10
|
+
ddeutil/workflow/logs.py,sha256=iVtyl8i69y7t07tAuWkihc54WlkHCcBy_Ur0WtzJ_lM,31367
|
11
|
+
ddeutil/workflow/params.py,sha256=Pco3DyjptC5Jkx53dhLL9xlIQdJvNAZs4FLzMUfXpbQ,12402
|
12
|
+
ddeutil/workflow/result.py,sha256=aUMIXw2nYbCDfFZqj9ABr_b7ZLo1GftTaaW8ATh618g,7855
|
13
|
+
ddeutil/workflow/reusables.py,sha256=jPrOCbxagqRvRFGXJzIyDa1wKV5AZ4crZyJ10cldQP0,21620
|
14
|
+
ddeutil/workflow/stages.py,sha256=rorKBjdyUAxALtelNJrvc5plJp1WCV35NMkii3XMw2A,102094
|
15
|
+
ddeutil/workflow/utils.py,sha256=slhBbsBNl0yaSk9EOiCK6UL-o7smgHVsLT7svRqAWXU,10436
|
16
|
+
ddeutil/workflow/workflow.py,sha256=YP1st2y3YCUscsuFpjf3fQgYMOnQbBhiY0s6PW1Lpng,27637
|
17
|
+
ddeutil/workflow/api/__init__.py,sha256=0UIilYwW29RL6HrCRHACSWvnATJVLSJzXiCMny0bHQk,2627
|
18
|
+
ddeutil/workflow/api/logs.py,sha256=NMTnOnsBrDB5129329xF2myLdrb-z9k1MQrmrP7qXJw,1818
|
19
|
+
ddeutil/workflow/api/routes/__init__.py,sha256=jC1pM7q4_eo45IyO3hQbbe6RnL9B8ibRq_K6aCMP6Ag,434
|
20
|
+
ddeutil/workflow/api/routes/job.py,sha256=32TkNm7QY9gt6fxIqEPjDqPgc8XqDiMPjUb7disSrCw,2143
|
21
|
+
ddeutil/workflow/api/routes/logs.py,sha256=QJH8IF102897WLfCJ29-1g15wl29M9Yq6omroZfbahs,5305
|
22
|
+
ddeutil/workflow/api/routes/workflows.py,sha256=Gmg3e-K5rfi95pbRtWI_aIr5C089sIde_vefZVvh3U0,4420
|
23
|
+
ddeutil_workflow-0.0.65.dist-info/licenses/LICENSE,sha256=nGFZ1QEhhhWeMHf9n99_fdt4vQaXS29xWKxt-OcLywk,1085
|
24
|
+
ddeutil_workflow-0.0.65.dist-info/METADATA,sha256=ujjqpMK3NkLSGMjPJdg30Cs3oGMJB8pBQd-eGWllYX4,16685
|
25
|
+
ddeutil_workflow-0.0.65.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
26
|
+
ddeutil_workflow-0.0.65.dist-info/entry_points.txt,sha256=qDTpPSauL0ciO6T4iSVt8bJeYrVEkkoEEw_RlGx6Kgk,63
|
27
|
+
ddeutil_workflow-0.0.65.dist-info/top_level.txt,sha256=m9M6XeSWDwt_yMsmH6gcOjHZVK5O0-vgtNBuncHjzW4,8
|
28
|
+
ddeutil_workflow-0.0.65.dist-info/RECORD,,
|
@@ -1,28 +0,0 @@
|
|
1
|
-
ddeutil/workflow/__about__.py,sha256=u0hgLvitHp32P7aLr3vGCiFbiGUkcbr4qFyevZfSorQ,28
|
2
|
-
ddeutil/workflow/__cron.py,sha256=BOKQcreiex0SAigrK1gnLxpvOeF3aca_rQwyz9Kfve4,28751
|
3
|
-
ddeutil/workflow/__init__.py,sha256=g-NTBGwIJaXmvuWoIRuUE65nqsIuXEM2CGWlLSszVmM,905
|
4
|
-
ddeutil/workflow/__main__.py,sha256=x-sYedl4T8p6054aySk-EQX6vhytvPR0HvaBNYxMzp0,364
|
5
|
-
ddeutil/workflow/__types.py,sha256=uNfoRbVmNK5O37UUMVnqcmoghD9oMS1q9fXC0APnjSI,4584
|
6
|
-
ddeutil/workflow/conf.py,sha256=trcsW2_jVeSFT_f58H_s99n2h8oRLIurRIF1ZrEjPYg,14927
|
7
|
-
ddeutil/workflow/event.py,sha256=S2eJAZZx_V5TuQ0l417hFVCtjWXnfNPZBgSCICzxQ48,11041
|
8
|
-
ddeutil/workflow/exceptions.py,sha256=_USvPsqPDkjmZycfjahpWHFhE-5fA6KRoc6ii0jRsVA,2401
|
9
|
-
ddeutil/workflow/job.py,sha256=Php1b3n6c-jddel8PTSa61kAW22QBTetzoLVR4XXM4E,35240
|
10
|
-
ddeutil/workflow/logs.py,sha256=iVtyl8i69y7t07tAuWkihc54WlkHCcBy_Ur0WtzJ_lM,31367
|
11
|
-
ddeutil/workflow/params.py,sha256=1u8gXs1ZyMq-2eD9H8L7Yjfu5t7b_OzjA0fJvhxdYWY,12505
|
12
|
-
ddeutil/workflow/result.py,sha256=4M9VCcveI8Yz6ZrnI-67SZlry-Z8G7e0hziy1k-pklk,5906
|
13
|
-
ddeutil/workflow/reusables.py,sha256=PP1K264a4YeFpEFsXVLicAFSjHdDXnPVAGmASXJpVmc,21706
|
14
|
-
ddeutil/workflow/stages.py,sha256=kS4g7N7kg31kEoveI6cZ9bzk_V0hm87lzyZpGU4-fss,93525
|
15
|
-
ddeutil/workflow/utils.py,sha256=1i82dWXCnbpEXhYtztNz6IPy7uOyNDY2BZcXJCAfzno,9611
|
16
|
-
ddeutil/workflow/workflow.py,sha256=8Z_h8OtNHkaGf8MJixTHNeXsyA4mBlYtHDqj0oEVFBs,44858
|
17
|
-
ddeutil/workflow/api/__init__.py,sha256=0UIilYwW29RL6HrCRHACSWvnATJVLSJzXiCMny0bHQk,2627
|
18
|
-
ddeutil/workflow/api/logs.py,sha256=NMTnOnsBrDB5129329xF2myLdrb-z9k1MQrmrP7qXJw,1818
|
19
|
-
ddeutil/workflow/api/routes/__init__.py,sha256=jC1pM7q4_eo45IyO3hQbbe6RnL9B8ibRq_K6aCMP6Ag,434
|
20
|
-
ddeutil/workflow/api/routes/job.py,sha256=PWDbIvvoPKbG7JQHwM80e6YIB7nnsGeZaqNSOTQE99k,2155
|
21
|
-
ddeutil/workflow/api/routes/logs.py,sha256=QJH8IF102897WLfCJ29-1g15wl29M9Yq6omroZfbahs,5305
|
22
|
-
ddeutil/workflow/api/routes/workflows.py,sha256=Gmg3e-K5rfi95pbRtWI_aIr5C089sIde_vefZVvh3U0,4420
|
23
|
-
ddeutil_workflow-0.0.64.dist-info/licenses/LICENSE,sha256=nGFZ1QEhhhWeMHf9n99_fdt4vQaXS29xWKxt-OcLywk,1085
|
24
|
-
ddeutil_workflow-0.0.64.dist-info/METADATA,sha256=ytJpKiesulHXeHt1JaSuaeOsp8o6D7b37r8bMuwnXCg,16957
|
25
|
-
ddeutil_workflow-0.0.64.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
26
|
-
ddeutil_workflow-0.0.64.dist-info/entry_points.txt,sha256=qDTpPSauL0ciO6T4iSVt8bJeYrVEkkoEEw_RlGx6Kgk,63
|
27
|
-
ddeutil_workflow-0.0.64.dist-info/top_level.txt,sha256=m9M6XeSWDwt_yMsmH6gcOjHZVK5O0-vgtNBuncHjzW4,8
|
28
|
-
ddeutil_workflow-0.0.64.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|