prefect-client 3.4.7.dev7__py3-none-any.whl → 3.4.7.dev8__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.
- prefect/_build_info.py +3 -3
- prefect/artifacts.py +51 -2
- prefect/events/schemas/labelling.py +2 -0
- prefect/settings/context.py +17 -14
- prefect/utilities/collections.py +6 -6
- prefect/utilities/engine.py +11 -6
- prefect/workers/base.py +2 -0
- {prefect_client-3.4.7.dev7.dist-info → prefect_client-3.4.7.dev8.dist-info}/METADATA +1 -1
- {prefect_client-3.4.7.dev7.dist-info → prefect_client-3.4.7.dev8.dist-info}/RECORD +11 -11
- {prefect_client-3.4.7.dev7.dist-info → prefect_client-3.4.7.dev8.dist-info}/WHEEL +0 -0
- {prefect_client-3.4.7.dev7.dist-info → prefect_client-3.4.7.dev8.dist-info}/licenses/LICENSE +0 -0
prefect/_build_info.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Generated by versioningit
|
2
|
-
__version__ = "3.4.7.
|
3
|
-
__build_date__ = "2025-06-
|
4
|
-
__git_commit__ = "
|
2
|
+
__version__ = "3.4.7.dev8"
|
3
|
+
__build_date__ = "2025-06-25 08:09:28.547496+00:00"
|
4
|
+
__git_commit__ = "f2c59127b60d3a91a1da167603522185fac2be50"
|
5
5
|
__dirty__ = False
|
prefect/artifacts.py
CHANGED
@@ -55,7 +55,7 @@ class Artifact(ArtifactRequest):
|
|
55
55
|
client: The PrefectClient
|
56
56
|
|
57
57
|
Returns:
|
58
|
-
|
58
|
+
The created artifact.
|
59
59
|
"""
|
60
60
|
|
61
61
|
local_client_context = asyncnullcontext(client) if client else get_client()
|
@@ -93,7 +93,7 @@ class Artifact(ArtifactRequest):
|
|
93
93
|
client: The PrefectClient
|
94
94
|
|
95
95
|
Returns:
|
96
|
-
|
96
|
+
The created artifact.
|
97
97
|
"""
|
98
98
|
|
99
99
|
# Create sync client since this is a sync method.
|
@@ -417,6 +417,23 @@ def create_link_artifact(
|
|
417
417
|
|
418
418
|
Returns:
|
419
419
|
The table artifact ID.
|
420
|
+
|
421
|
+
Example:
|
422
|
+
```python
|
423
|
+
from prefect import flow
|
424
|
+
from prefect.artifacts import create_link_artifact
|
425
|
+
|
426
|
+
@flow
|
427
|
+
def my_flow():
|
428
|
+
create_link_artifact(
|
429
|
+
link="https://www.prefect.io",
|
430
|
+
link_text="Prefect",
|
431
|
+
key="prefect-link",
|
432
|
+
description="This is a link to the Prefect website",
|
433
|
+
)
|
434
|
+
|
435
|
+
my_flow()
|
436
|
+
```
|
420
437
|
"""
|
421
438
|
new_artifact = LinkArtifact(
|
422
439
|
key=key,
|
@@ -475,6 +492,22 @@ def create_markdown_artifact(
|
|
475
492
|
|
476
493
|
Returns:
|
477
494
|
The table artifact ID.
|
495
|
+
|
496
|
+
Example:
|
497
|
+
```python
|
498
|
+
from prefect import flow
|
499
|
+
from prefect.artifacts import create_markdown_artifact
|
500
|
+
|
501
|
+
@flow
|
502
|
+
def my_flow():
|
503
|
+
create_markdown_artifact(
|
504
|
+
markdown="## Prefect",
|
505
|
+
key="prefect-markdown",
|
506
|
+
description="This is a markdown artifact",
|
507
|
+
)
|
508
|
+
|
509
|
+
my_flow()
|
510
|
+
```
|
478
511
|
"""
|
479
512
|
new_artifact = MarkdownArtifact(
|
480
513
|
key=key,
|
@@ -533,6 +566,22 @@ def create_table_artifact(
|
|
533
566
|
|
534
567
|
Returns:
|
535
568
|
The table artifact ID.
|
569
|
+
|
570
|
+
Example:
|
571
|
+
```python
|
572
|
+
from prefect import flow
|
573
|
+
from prefect.artifacts import create_table_artifact
|
574
|
+
|
575
|
+
@flow
|
576
|
+
def my_flow():
|
577
|
+
create_table_artifact(
|
578
|
+
table=[{"name": "John", "age": 30}, {"name": "Jane", "age": 25}],
|
579
|
+
key="prefect-table",
|
580
|
+
description="This is a table artifact",
|
581
|
+
)
|
582
|
+
|
583
|
+
my_flow()
|
584
|
+
```
|
536
585
|
"""
|
537
586
|
|
538
587
|
new_artifact = TableArtifact(
|
@@ -8,6 +8,7 @@ class LabelDiver:
|
|
8
8
|
presenting the labels as a graph of objects that may be accessed by attribute. For
|
9
9
|
example:
|
10
10
|
|
11
|
+
```python
|
11
12
|
diver = LabelDiver({
|
12
13
|
'hello.world': 'foo',
|
13
14
|
'hello.world.again': 'bar'
|
@@ -15,6 +16,7 @@ class LabelDiver:
|
|
15
16
|
|
16
17
|
assert str(diver.hello.world) == 'foo'
|
17
18
|
assert str(diver.hello.world.again) == 'bar'
|
19
|
+
```
|
18
20
|
|
19
21
|
"""
|
20
22
|
|
prefect/settings/context.py
CHANGED
@@ -33,20 +33,23 @@ def temporary_settings(
|
|
33
33
|
See `Settings.copy_with_update` for details on different argument behavior.
|
34
34
|
|
35
35
|
Examples:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
36
|
+
|
37
|
+
```python
|
38
|
+
from prefect.settings import PREFECT_API_URL
|
39
|
+
|
40
|
+
with temporary_settings(updates={PREFECT_API_URL: "foo"}):
|
41
|
+
assert PREFECT_API_URL.value() == "foo"
|
42
|
+
|
43
|
+
with temporary_settings(set_defaults={PREFECT_API_URL: "bar"}):
|
44
|
+
assert PREFECT_API_URL.value() == "foo"
|
45
|
+
|
46
|
+
with temporary_settings(restore_defaults={PREFECT_API_URL}):
|
47
|
+
assert PREFECT_API_URL.value() is None
|
48
|
+
|
49
|
+
with temporary_settings(set_defaults={PREFECT_API_URL: "bar"})
|
50
|
+
assert PREFECT_API_URL.value() == "bar"
|
51
|
+
assert PREFECT_API_URL.value() is None
|
52
|
+
```
|
50
53
|
"""
|
51
54
|
import prefect.context
|
52
55
|
|
prefect/utilities/collections.py
CHANGED
@@ -629,12 +629,12 @@ def get_from_dict(
|
|
629
629
|
The fetched value if the key exists, or the default value if it does not.
|
630
630
|
|
631
631
|
Examples:
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
2
|
636
|
-
|
637
|
-
|
632
|
+
|
633
|
+
```python
|
634
|
+
get_from_dict({'a': {'b': {'c': [1, 2, 3, 4]}}}, 'a.b.c[1]') # 2
|
635
|
+
get_from_dict({'a': {'b': [0, {'c': [1, 2]}]}}, ['a', 'b', 1, 'c', 1]) # 2
|
636
|
+
get_from_dict({'a': {'b': [0, {'c': [1, 2]}]}}, 'a.b.1.c.2', 'default') # 'default'
|
637
|
+
```
|
638
638
|
"""
|
639
639
|
if isinstance(keys, str):
|
640
640
|
keys = keys.replace("[", ".").replace("]", "").split(".")
|
prefect/utilities/engine.py
CHANGED
@@ -72,9 +72,12 @@ async def collect_task_run_inputs(
|
|
72
72
|
found.
|
73
73
|
|
74
74
|
Examples:
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
|
76
|
+
```python
|
77
|
+
task_inputs = {
|
78
|
+
k: await collect_task_run_inputs(v) for k, v in parameters.items()
|
79
|
+
}
|
80
|
+
```
|
78
81
|
"""
|
79
82
|
# TODO: This function needs to be updated to detect parameters and constants
|
80
83
|
|
@@ -120,9 +123,11 @@ def collect_task_run_inputs_sync(
|
|
120
123
|
found.
|
121
124
|
|
122
125
|
Examples:
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
+
```python
|
127
|
+
task_inputs = {
|
128
|
+
k: collect_task_run_inputs_sync(v) for k, v in parameters.items()
|
129
|
+
}
|
130
|
+
```
|
126
131
|
"""
|
127
132
|
# TODO: This function needs to be updated to detect parameters and constants
|
128
133
|
|
prefect/workers/base.py
CHANGED
@@ -208,10 +208,12 @@ class BaseJobConfiguration(BaseModel):
|
|
208
208
|
Defaults to using the job configuration parameter name as the template variable name.
|
209
209
|
|
210
210
|
e.g.
|
211
|
+
```python
|
211
212
|
{
|
212
213
|
key1: '{{ key1 }}', # default variable template
|
213
214
|
key2: '{{ template2 }}', # `template2` specifically provide as template
|
214
215
|
}
|
216
|
+
```
|
215
217
|
"""
|
216
218
|
configuration: dict[str, Any] = {}
|
217
219
|
properties = cls.model_json_schema()["properties"]
|
@@ -2,12 +2,12 @@ prefect/.prefectignore,sha256=awSprvKT0vI8a64mEOLrMxhxqcO-b0ERQeYpA2rNKVQ,390
|
|
2
2
|
prefect/AGENTS.md,sha256=qmCZAuKIF9jQyp5TrW_T8bsM_97-QaiCoQp71A_b2Lg,1008
|
3
3
|
prefect/__init__.py,sha256=iCdcC5ZmeewikCdnPEP6YBAjPNV5dvfxpYCTpw30Hkw,3685
|
4
4
|
prefect/__main__.py,sha256=WFjw3kaYJY6pOTA7WDOgqjsz8zUEUZHCcj3P5wyVa-g,66
|
5
|
-
prefect/_build_info.py,sha256=
|
5
|
+
prefect/_build_info.py,sha256=vtIbRKEkWF6yy5x3d3LhHvxh02unYDsxXxlBnW3k6Dc,185
|
6
6
|
prefect/_result_records.py,sha256=S6QmsODkehGVSzbMm6ig022PYbI6gNKz671p_8kBYx4,7789
|
7
7
|
prefect/_versioning.py,sha256=YqR5cxXrY4P6LM1Pmhd8iMo7v_G2KJpGNdsf4EvDFQ0,14132
|
8
8
|
prefect/_waiters.py,sha256=Ia2ITaXdHzevtyWIgJoOg95lrEXQqNEOquHvw3T33UQ,9026
|
9
9
|
prefect/agent.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
10
|
-
prefect/artifacts.py,sha256=
|
10
|
+
prefect/artifacts.py,sha256=ZdMLJeJGK82hibtRzbsVa-g95dMa0D2UP1LiESoXmf4,23951
|
11
11
|
prefect/automations.py,sha256=ZzPxn2tINdlXTQo805V4rIlbXuNWxd7cdb3gTJxZIeY,12567
|
12
12
|
prefect/cache_policies.py,sha256=jH1aDW6vItTcsEytuTCrNYyjbq87IQPwdOgF0yxiUts,12749
|
13
13
|
prefect/context.py,sha256=2yhyJmomB0S8n18vCYZIykqZFmUAiqTH06qigAsoGtk,32648
|
@@ -166,7 +166,7 @@ prefect/events/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
166
166
|
prefect/events/schemas/automations.py,sha256=GVAfgyNoTxr8NpEw_Ao-1Prfd_MSsrhrLsXv6SLKUdY,14775
|
167
167
|
prefect/events/schemas/deployment_triggers.py,sha256=OX9g9eHe0nqJ3PtVEzqs9Ub2LaOHMA4afLZSvSukKGU,3191
|
168
168
|
prefect/events/schemas/events.py,sha256=r8sSx2Q1A0KIofnZR_Bri7YT1wzXKV3YS-LnxpeIXHE,9270
|
169
|
-
prefect/events/schemas/labelling.py,sha256=
|
169
|
+
prefect/events/schemas/labelling.py,sha256=McGy7dq6Ry2GY3ejnMQnkuL_h77F5MnHXQkyCdePlLU,3103
|
170
170
|
prefect/infrastructure/__init__.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
171
171
|
prefect/infrastructure/base.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
172
172
|
prefect/infrastructure/provisioners/__init__.py,sha256=NTDdbkBE37FiBcroja5huuyWr4xYljjQp3ZnD7oplrA,1801
|
@@ -245,7 +245,7 @@ prefect/server/api/ui/task_runs.py,sha256=6CMrHmY-ybJGHXz7YlVVP2ZTmvq7w-XA9GUHqC
|
|
245
245
|
prefect/settings/__init__.py,sha256=3jDLzExmq9HsRWo1kTSE16BO_3B3JlVsk5pR0s4PWEQ,2136
|
246
246
|
prefect/settings/base.py,sha256=VtBSwBLowLvtBVDq3ZY5oKAwosMqsDMt2gcXLAiFf5k,9682
|
247
247
|
prefect/settings/constants.py,sha256=5NjVLG1Km9J9I-a6wrq-qmi_dTkPdwEk3IrY9bSxWvw,281
|
248
|
-
prefect/settings/context.py,sha256=
|
248
|
+
prefect/settings/context.py,sha256=VtMJsBtjwq_P3La9_SRYedBkyjmMNqV_4X_U4h_-6wM,2142
|
249
249
|
prefect/settings/legacy.py,sha256=KG00GwaURl1zbwfCKAjwNRdJjB2UdTyo80gYF7U60jk,5693
|
250
250
|
prefect/settings/profiles.py,sha256=Mk-fcfDUuJx5zIpp87Ar8d9jLFTgCOM83vEJWgmECBc,12795
|
251
251
|
prefect/settings/profiles.toml,sha256=kTvqDNMzjH3fsm5OEI-NKY4dMmipor5EvQXRB6rPEjY,522
|
@@ -297,12 +297,12 @@ prefect/utilities/_git.py,sha256=bPYWQdr9xvH0BqxR1ll1RkaSb3x0vhwylhYD5EilkKU,863
|
|
297
297
|
prefect/utilities/annotations.py,sha256=0Elqgq6LR7pQqezNqT5wb6U_0e2pDO_zx6VseVL6kL8,4396
|
298
298
|
prefect/utilities/asyncutils.py,sha256=xcfeNym2j3WH4gKXznON2hI1PpUTcwr_BGc16IQS3C4,19789
|
299
299
|
prefect/utilities/callables.py,sha256=57adLaN2QGJEE0YCdv1jS1L5R3vi4IuzPiNVZ7cCcEk,25930
|
300
|
-
prefect/utilities/collections.py,sha256=
|
300
|
+
prefect/utilities/collections.py,sha256=HP1s3B1d10woWzzRG8GU5Qwvq5yp4dKQ97u9Szz-d0k,23248
|
301
301
|
prefect/utilities/compat.py,sha256=nnPA3lf2f4Y-l645tYFFNmj5NDPaYvjqa9pbGKZ3WKE,582
|
302
302
|
prefect/utilities/context.py,sha256=23SDMgdt07SjmB1qShiykHfGgiv55NBzdbMXM3fE9CI,1447
|
303
303
|
prefect/utilities/dispatch.py,sha256=u6GSGSO3_6vVoIqHVc849lsKkC-I1wUl6TX134GwRBo,6310
|
304
304
|
prefect/utilities/dockerutils.py,sha256=6DLVyzE195IzeQSWERiK1t3bDMnYBLe0zXIpMQ4r0c0,21659
|
305
|
-
prefect/utilities/engine.py,sha256=
|
305
|
+
prefect/utilities/engine.py,sha256=4__SXJb_Rl9PrKFYALWTPzzpE_VUAlvWaA6xyQCucSo,28357
|
306
306
|
prefect/utilities/filesystem.py,sha256=Pwesv71PGFhf3lPa1iFyMqZZprBjy9nEKCVxTkf_hXw,5710
|
307
307
|
prefect/utilities/generics.py,sha256=o77e8a5iwmrisOf42wLp2WI9YvSw2xDW4vFdpdEwr3I,543
|
308
308
|
prefect/utilities/hashing.py,sha256=7jRy26s46IJAFRmVnCnoK9ek9N4p_UfXxQQvu2tW6dM,2589
|
@@ -323,13 +323,13 @@ prefect/utilities/schema_tools/__init__.py,sha256=At3rMHd2g_Em2P3_dFQlFgqR_EpBwr
|
|
323
323
|
prefect/utilities/schema_tools/hydration.py,sha256=NkRhWkNfxxFmVGhNDfmxdK_xeKaEhs3a42q83Sg9cT4,9436
|
324
324
|
prefect/utilities/schema_tools/validation.py,sha256=Wix26IVR-ZJ32-6MX2pHhrwm3reB-Q4iB6_phn85OKE,10743
|
325
325
|
prefect/workers/__init__.py,sha256=EaM1F0RZ-XIJaGeTKLsXDnfOPHzVWk5bk0_c4BVS44M,64
|
326
|
-
prefect/workers/base.py,sha256=
|
326
|
+
prefect/workers/base.py,sha256=umyfDUcyn1Ao4FCrtDH52t1KXLLIy0k3LYNIjPNxbGw,62388
|
327
327
|
prefect/workers/block.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
328
328
|
prefect/workers/cloud.py,sha256=dPvG1jDGD5HSH7aM2utwtk6RaJ9qg13XjkA0lAIgQmY,287
|
329
329
|
prefect/workers/process.py,sha256=Yi5D0U5AQ51wHT86GdwtImXSefe0gJf3LGq4r4z9zwM,11090
|
330
330
|
prefect/workers/server.py,sha256=2pmVeJZiVbEK02SO6BEZaBIvHMsn6G8LzjW8BXyiTtk,1952
|
331
331
|
prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
|
332
|
-
prefect_client-3.4.7.
|
333
|
-
prefect_client-3.4.7.
|
334
|
-
prefect_client-3.4.7.
|
335
|
-
prefect_client-3.4.7.
|
332
|
+
prefect_client-3.4.7.dev8.dist-info/METADATA,sha256=cmb5kLIW8kQyoy34VabdVPMInMhwbOKr08OAj6rwq_M,7517
|
333
|
+
prefect_client-3.4.7.dev8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
334
|
+
prefect_client-3.4.7.dev8.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
|
335
|
+
prefect_client-3.4.7.dev8.dist-info/RECORD,,
|
File without changes
|
{prefect_client-3.4.7.dev7.dist-info → prefect_client-3.4.7.dev8.dist-info}/licenses/LICENSE
RENAMED
File without changes
|