prefect-client 3.1.14__py3-none-any.whl → 3.1.15__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/__main__.py +4 -0
- prefect/_experimental/lineage.py +40 -22
- prefect/_internal/concurrency/services.py +1 -1
- prefect/_version.py +3 -3
- prefect/artifacts.py +408 -105
- prefect/blocks/core.py +1 -1
- prefect/blocks/notifications.py +5 -0
- prefect/client/schemas/actions.py +11 -1
- prefect/client/schemas/schedules.py +4 -4
- prefect/deployments/base.py +13 -16
- prefect/deployments/runner.py +117 -4
- prefect/events/clients.py +39 -0
- prefect/flow_engine.py +119 -0
- prefect/flows.py +252 -9
- prefect/runtime/task_run.py +37 -9
- prefect/tasks.py +8 -6
- prefect/utilities/render_swagger.py +1 -1
- prefect/utilities/templating.py +7 -0
- {prefect_client-3.1.14.dist-info → prefect_client-3.1.15.dist-info}/METADATA +1 -1
- {prefect_client-3.1.14.dist-info → prefect_client-3.1.15.dist-info}/RECORD +23 -22
- {prefect_client-3.1.14.dist-info → prefect_client-3.1.15.dist-info}/LICENSE +0 -0
- {prefect_client-3.1.14.dist-info → prefect_client-3.1.15.dist-info}/WHEEL +0 -0
- {prefect_client-3.1.14.dist-info → prefect_client-3.1.15.dist-info}/top_level.txt +0 -0
prefect/flows.py
CHANGED
@@ -82,6 +82,7 @@ from prefect.types import BANNED_CHARACTERS, WITHOUT_BANNED_CHARACTERS
|
|
82
82
|
from prefect.types.entrypoint import EntrypointType
|
83
83
|
from prefect.utilities.annotations import NotSet
|
84
84
|
from prefect.utilities.asyncutils import (
|
85
|
+
run_coro_as_sync,
|
85
86
|
run_sync_in_worker_thread,
|
86
87
|
sync_compatible,
|
87
88
|
)
|
@@ -97,7 +98,7 @@ from prefect.utilities.filesystem import relative_path_to_current_platform
|
|
97
98
|
from prefect.utilities.hashing import file_hash
|
98
99
|
from prefect.utilities.importtools import import_object, safe_load_namespace
|
99
100
|
|
100
|
-
from ._internal.compatibility.async_dispatch import is_in_async_context
|
101
|
+
from ._internal.compatibility.async_dispatch import async_dispatch, is_in_async_context
|
101
102
|
from ._internal.pydantic.v2_schema import is_v2_type
|
102
103
|
from ._internal.pydantic.v2_validated_func import V2ValidatedFunction
|
103
104
|
from ._internal.pydantic.v2_validated_func import (
|
@@ -654,8 +655,7 @@ class Flow(Generic[P, R]):
|
|
654
655
|
serialized_parameters[key] = f"<{type(value).__name__}>"
|
655
656
|
return serialized_parameters
|
656
657
|
|
657
|
-
|
658
|
-
async def to_deployment(
|
658
|
+
async def ato_deployment(
|
659
659
|
self,
|
660
660
|
name: str,
|
661
661
|
interval: Optional[
|
@@ -684,7 +684,7 @@ class Flow(Generic[P, R]):
|
|
684
684
|
_sla: Optional[Union[SlaTypes, list[SlaTypes]]] = None, # experimental
|
685
685
|
) -> "RunnerDeployment":
|
686
686
|
"""
|
687
|
-
|
687
|
+
Asynchronously creates a runner deployment object for this flow.
|
688
688
|
|
689
689
|
Args:
|
690
690
|
name: The name to give the created deployment.
|
@@ -740,7 +740,7 @@ class Flow(Generic[P, R]):
|
|
740
740
|
_raise_on_name_with_banned_characters(name)
|
741
741
|
|
742
742
|
if self._storage and self._entrypoint:
|
743
|
-
return await RunnerDeployment.
|
743
|
+
return await RunnerDeployment.afrom_storage(
|
744
744
|
storage=self._storage,
|
745
745
|
entrypoint=self._entrypoint,
|
746
746
|
name=name,
|
@@ -761,7 +761,142 @@ class Flow(Generic[P, R]):
|
|
761
761
|
work_queue_name=work_queue_name,
|
762
762
|
job_variables=job_variables,
|
763
763
|
_sla=_sla,
|
764
|
-
)
|
764
|
+
)
|
765
|
+
else:
|
766
|
+
return RunnerDeployment.from_flow(
|
767
|
+
flow=self,
|
768
|
+
name=name,
|
769
|
+
interval=interval,
|
770
|
+
cron=cron,
|
771
|
+
rrule=rrule,
|
772
|
+
paused=paused,
|
773
|
+
schedules=schedules,
|
774
|
+
concurrency_limit=concurrency_limit,
|
775
|
+
tags=tags,
|
776
|
+
triggers=triggers,
|
777
|
+
parameters=parameters or {},
|
778
|
+
description=description,
|
779
|
+
version=version,
|
780
|
+
enforce_parameter_schema=enforce_parameter_schema,
|
781
|
+
work_pool_name=work_pool_name,
|
782
|
+
work_queue_name=work_queue_name,
|
783
|
+
job_variables=job_variables,
|
784
|
+
entrypoint_type=entrypoint_type,
|
785
|
+
_sla=_sla,
|
786
|
+
)
|
787
|
+
|
788
|
+
@async_dispatch(ato_deployment)
|
789
|
+
def to_deployment(
|
790
|
+
self,
|
791
|
+
name: str,
|
792
|
+
interval: Optional[
|
793
|
+
Union[
|
794
|
+
Iterable[Union[int, float, datetime.timedelta]],
|
795
|
+
int,
|
796
|
+
float,
|
797
|
+
datetime.timedelta,
|
798
|
+
]
|
799
|
+
] = None,
|
800
|
+
cron: Optional[Union[Iterable[str], str]] = None,
|
801
|
+
rrule: Optional[Union[Iterable[str], str]] = None,
|
802
|
+
paused: Optional[bool] = None,
|
803
|
+
schedules: Optional["FlexibleScheduleList"] = None,
|
804
|
+
concurrency_limit: Optional[Union[int, ConcurrencyLimitConfig, None]] = None,
|
805
|
+
parameters: Optional[dict[str, Any]] = None,
|
806
|
+
triggers: Optional[list[Union[DeploymentTriggerTypes, TriggerTypes]]] = None,
|
807
|
+
description: Optional[str] = None,
|
808
|
+
tags: Optional[list[str]] = None,
|
809
|
+
version: Optional[str] = None,
|
810
|
+
enforce_parameter_schema: bool = True,
|
811
|
+
work_pool_name: Optional[str] = None,
|
812
|
+
work_queue_name: Optional[str] = None,
|
813
|
+
job_variables: Optional[dict[str, Any]] = None,
|
814
|
+
entrypoint_type: EntrypointType = EntrypointType.FILE_PATH,
|
815
|
+
_sla: Optional[Union[SlaTypes, list[SlaTypes]]] = None, # experimental
|
816
|
+
) -> "RunnerDeployment":
|
817
|
+
"""
|
818
|
+
Creates a runner deployment object for this flow.
|
819
|
+
|
820
|
+
Args:
|
821
|
+
name: The name to give the created deployment.
|
822
|
+
interval: An interval on which to execute the new deployment. Accepts either a number
|
823
|
+
or a timedelta object. If a number is given, it will be interpreted as seconds.
|
824
|
+
cron: A cron schedule of when to execute runs of this deployment.
|
825
|
+
rrule: An rrule schedule of when to execute runs of this deployment.
|
826
|
+
paused: Whether or not to set this deployment as paused.
|
827
|
+
schedules: A list of schedule objects defining when to execute runs of this deployment.
|
828
|
+
Used to define multiple schedules or additional scheduling options such as `timezone`.
|
829
|
+
concurrency_limit: The maximum number of runs of this deployment that can run at the same time.
|
830
|
+
parameters: A dictionary of default parameter values to pass to runs of this deployment.
|
831
|
+
triggers: A list of triggers that will kick off runs of this deployment.
|
832
|
+
description: A description for the created deployment. Defaults to the flow's
|
833
|
+
description if not provided.
|
834
|
+
tags: A list of tags to associate with the created deployment for organizational
|
835
|
+
purposes.
|
836
|
+
version: A version for the created deployment. Defaults to the flow's version.
|
837
|
+
enforce_parameter_schema: Whether or not the Prefect API should enforce the
|
838
|
+
parameter schema for the created deployment.
|
839
|
+
work_pool_name: The name of the work pool to use for this deployment.
|
840
|
+
work_queue_name: The name of the work queue to use for this deployment's scheduled runs.
|
841
|
+
If not provided the default work queue for the work pool will be used.
|
842
|
+
job_variables: Settings used to override the values specified default base job template
|
843
|
+
of the chosen work pool. Refer to the base job template of the chosen work pool for
|
844
|
+
entrypoint_type: Type of entrypoint to use for the deployment. When using a module path
|
845
|
+
entrypoint, ensure that the module will be importable in the execution environment.
|
846
|
+
_sla: (Experimental) SLA configuration for the deployment. May be removed or modified at any time. Currently only supported on Prefect Cloud.
|
847
|
+
|
848
|
+
Examples:
|
849
|
+
Prepare two deployments and serve them:
|
850
|
+
|
851
|
+
```python
|
852
|
+
from prefect import flow, serve
|
853
|
+
|
854
|
+
@flow
|
855
|
+
def my_flow(name):
|
856
|
+
print(f"hello {name}")
|
857
|
+
|
858
|
+
@flow
|
859
|
+
def my_other_flow(name):
|
860
|
+
print(f"goodbye {name}")
|
861
|
+
|
862
|
+
if __name__ == "__main__":
|
863
|
+
hello_deploy = my_flow.to_deployment("hello", tags=["dev"])
|
864
|
+
bye_deploy = my_other_flow.to_deployment("goodbye", tags=["dev"])
|
865
|
+
serve(hello_deploy, bye_deploy)
|
866
|
+
```
|
867
|
+
"""
|
868
|
+
from prefect.deployments.runner import RunnerDeployment
|
869
|
+
|
870
|
+
if not name.endswith(".py"):
|
871
|
+
_raise_on_name_with_banned_characters(name)
|
872
|
+
|
873
|
+
if self._storage and self._entrypoint:
|
874
|
+
return cast(
|
875
|
+
RunnerDeployment,
|
876
|
+
RunnerDeployment.from_storage(
|
877
|
+
storage=self._storage,
|
878
|
+
entrypoint=self._entrypoint,
|
879
|
+
name=name,
|
880
|
+
flow_name=self.name,
|
881
|
+
interval=interval,
|
882
|
+
cron=cron,
|
883
|
+
rrule=rrule,
|
884
|
+
paused=paused,
|
885
|
+
schedules=schedules,
|
886
|
+
concurrency_limit=concurrency_limit,
|
887
|
+
tags=tags,
|
888
|
+
triggers=triggers,
|
889
|
+
parameters=parameters or {},
|
890
|
+
description=description,
|
891
|
+
version=version,
|
892
|
+
enforce_parameter_schema=enforce_parameter_schema,
|
893
|
+
work_pool_name=work_pool_name,
|
894
|
+
work_queue_name=work_queue_name,
|
895
|
+
job_variables=job_variables,
|
896
|
+
_sla=_sla,
|
897
|
+
_sync=True, # pyright: ignore[reportCallIssue] _sync is valid because .from_storage is decorated with async_dispatch
|
898
|
+
),
|
899
|
+
)
|
765
900
|
else:
|
766
901
|
return RunnerDeployment.from_flow(
|
767
902
|
flow=self,
|
@@ -957,14 +1092,13 @@ class Flow(Generic[P, R]):
|
|
957
1092
|
loop.stop()
|
958
1093
|
|
959
1094
|
@classmethod
|
960
|
-
|
961
|
-
async def from_source(
|
1095
|
+
async def afrom_source(
|
962
1096
|
cls,
|
963
1097
|
source: Union[str, "RunnerStorage", ReadableDeploymentStorage],
|
964
1098
|
entrypoint: str,
|
965
1099
|
) -> "Flow[..., Any]":
|
966
1100
|
"""
|
967
|
-
Loads a flow from a remote source.
|
1101
|
+
Loads a flow from a remote source asynchronously.
|
968
1102
|
|
969
1103
|
Args:
|
970
1104
|
source: Either a URL to a git repository or a storage object.
|
@@ -1070,6 +1204,115 @@ class Flow(Generic[P, R]):
|
|
1070
1204
|
|
1071
1205
|
return flow
|
1072
1206
|
|
1207
|
+
@classmethod
|
1208
|
+
@async_dispatch(afrom_source)
|
1209
|
+
def from_source(
|
1210
|
+
cls,
|
1211
|
+
source: Union[str, "RunnerStorage", ReadableDeploymentStorage],
|
1212
|
+
entrypoint: str,
|
1213
|
+
) -> "Flow[..., Any]":
|
1214
|
+
"""
|
1215
|
+
Loads a flow from a remote source.
|
1216
|
+
|
1217
|
+
Args:
|
1218
|
+
source: Either a URL to a git repository or a storage object.
|
1219
|
+
entrypoint: The path to a file containing a flow and the name of the flow function in
|
1220
|
+
the format `./path/to/file.py:flow_func_name`.
|
1221
|
+
|
1222
|
+
Returns:
|
1223
|
+
A new `Flow` instance.
|
1224
|
+
|
1225
|
+
Examples:
|
1226
|
+
Load a flow from a public git repository:
|
1227
|
+
|
1228
|
+
|
1229
|
+
```python
|
1230
|
+
from prefect import flow
|
1231
|
+
from prefect.runner.storage import GitRepository
|
1232
|
+
from prefect.blocks.system import Secret
|
1233
|
+
|
1234
|
+
my_flow = flow.from_source(
|
1235
|
+
source="https://github.com/org/repo.git",
|
1236
|
+
entrypoint="flows.py:my_flow",
|
1237
|
+
)
|
1238
|
+
|
1239
|
+
my_flow()
|
1240
|
+
```
|
1241
|
+
|
1242
|
+
Load a flow from a private git repository using an access token stored in a `Secret` block:
|
1243
|
+
|
1244
|
+
```python
|
1245
|
+
from prefect import flow
|
1246
|
+
from prefect.runner.storage import GitRepository
|
1247
|
+
from prefect.blocks.system import Secret
|
1248
|
+
|
1249
|
+
my_flow = flow.from_source(
|
1250
|
+
source=GitRepository(
|
1251
|
+
url="https://github.com/org/repo.git",
|
1252
|
+
credentials={"access_token": Secret.load("github-access-token")}
|
1253
|
+
),
|
1254
|
+
entrypoint="flows.py:my_flow",
|
1255
|
+
)
|
1256
|
+
|
1257
|
+
my_flow()
|
1258
|
+
```
|
1259
|
+
|
1260
|
+
Load a flow from a local directory:
|
1261
|
+
|
1262
|
+
``` python
|
1263
|
+
# from_local_source.py
|
1264
|
+
|
1265
|
+
from pathlib import Path
|
1266
|
+
from prefect import flow
|
1267
|
+
|
1268
|
+
@flow(log_prints=True)
|
1269
|
+
def my_flow(name: str = "world"):
|
1270
|
+
print(f"Hello {name}! I'm a flow from a Python script!")
|
1271
|
+
|
1272
|
+
if __name__ == "__main__":
|
1273
|
+
my_flow.from_source(
|
1274
|
+
source=str(Path(__file__).parent),
|
1275
|
+
entrypoint="from_local_source.py:my_flow",
|
1276
|
+
).deploy(
|
1277
|
+
name="my-deployment",
|
1278
|
+
parameters=dict(name="Marvin"),
|
1279
|
+
work_pool_name="local",
|
1280
|
+
)
|
1281
|
+
```
|
1282
|
+
"""
|
1283
|
+
|
1284
|
+
from prefect.runner.storage import (
|
1285
|
+
BlockStorageAdapter,
|
1286
|
+
LocalStorage,
|
1287
|
+
RunnerStorage,
|
1288
|
+
create_storage_from_source,
|
1289
|
+
)
|
1290
|
+
|
1291
|
+
if isinstance(source, (Path, str)):
|
1292
|
+
if isinstance(source, Path):
|
1293
|
+
source = str(source)
|
1294
|
+
storage = create_storage_from_source(source)
|
1295
|
+
elif isinstance(source, RunnerStorage):
|
1296
|
+
storage = source
|
1297
|
+
elif hasattr(source, "get_directory"):
|
1298
|
+
storage = BlockStorageAdapter(source)
|
1299
|
+
else:
|
1300
|
+
raise TypeError(
|
1301
|
+
f"Unsupported source type {type(source).__name__!r}. Please provide a"
|
1302
|
+
" URL to remote storage or a storage object."
|
1303
|
+
)
|
1304
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
1305
|
+
if not isinstance(storage, LocalStorage):
|
1306
|
+
storage.set_base_path(Path(tmpdir))
|
1307
|
+
run_coro_as_sync(storage.pull_code())
|
1308
|
+
|
1309
|
+
full_entrypoint = str(storage.destination / entrypoint)
|
1310
|
+
flow = load_flow_from_entrypoint(full_entrypoint)
|
1311
|
+
flow._storage = storage
|
1312
|
+
flow._entrypoint = entrypoint
|
1313
|
+
|
1314
|
+
return flow
|
1315
|
+
|
1073
1316
|
@sync_compatible
|
1074
1317
|
async def deploy(
|
1075
1318
|
self,
|
prefect/runtime/task_run.py
CHANGED
@@ -18,11 +18,21 @@ Available attributes:
|
|
18
18
|
from __future__ import annotations
|
19
19
|
|
20
20
|
import os
|
21
|
-
from typing import Any, Callable
|
21
|
+
from typing import Any, Callable
|
22
22
|
|
23
23
|
from prefect.context import TaskRunContext
|
24
|
+
from prefect.settings import get_current_settings
|
24
25
|
|
25
|
-
__all__ = [
|
26
|
+
__all__ = [
|
27
|
+
"id",
|
28
|
+
"tags",
|
29
|
+
"name",
|
30
|
+
"parameters",
|
31
|
+
"run_count",
|
32
|
+
"task_name",
|
33
|
+
"api_url",
|
34
|
+
"ui_url",
|
35
|
+
]
|
26
36
|
|
27
37
|
|
28
38
|
type_cast: dict[
|
@@ -72,17 +82,17 @@ def __getattr__(name: str) -> Any:
|
|
72
82
|
return real_value
|
73
83
|
|
74
84
|
|
75
|
-
def __dir__() ->
|
85
|
+
def __dir__() -> list[str]:
|
76
86
|
return sorted(__all__)
|
77
87
|
|
78
88
|
|
79
|
-
def get_id() -> str:
|
89
|
+
def get_id() -> str | None:
|
80
90
|
task_run_ctx = TaskRunContext.get()
|
81
91
|
if task_run_ctx is not None:
|
82
92
|
return str(task_run_ctx.task_run.id)
|
83
93
|
|
84
94
|
|
85
|
-
def get_tags() ->
|
95
|
+
def get_tags() -> list[str]:
|
86
96
|
task_run_ctx = TaskRunContext.get()
|
87
97
|
if task_run_ctx is None:
|
88
98
|
return []
|
@@ -98,7 +108,7 @@ def get_run_count() -> int:
|
|
98
108
|
return task_run_ctx.task_run.run_count
|
99
109
|
|
100
110
|
|
101
|
-
def get_name() ->
|
111
|
+
def get_name() -> str | None:
|
102
112
|
task_run_ctx = TaskRunContext.get()
|
103
113
|
if task_run_ctx is None:
|
104
114
|
return None
|
@@ -106,7 +116,7 @@ def get_name() -> Optional[str]:
|
|
106
116
|
return task_run_ctx.task_run.name
|
107
117
|
|
108
118
|
|
109
|
-
def get_task_name() ->
|
119
|
+
def get_task_name() -> str | None:
|
110
120
|
task_run_ctx = TaskRunContext.get()
|
111
121
|
if task_run_ctx is None:
|
112
122
|
return None
|
@@ -114,7 +124,7 @@ def get_task_name() -> Optional[str]:
|
|
114
124
|
return task_run_ctx.task.name
|
115
125
|
|
116
126
|
|
117
|
-
def get_parameters() ->
|
127
|
+
def get_parameters() -> dict[str, Any]:
|
118
128
|
task_run_ctx = TaskRunContext.get()
|
119
129
|
if task_run_ctx is not None:
|
120
130
|
return task_run_ctx.parameters
|
@@ -122,11 +132,29 @@ def get_parameters() -> Dict[str, Any]:
|
|
122
132
|
return {}
|
123
133
|
|
124
134
|
|
125
|
-
|
135
|
+
def get_task_run_api_url() -> str | None:
|
136
|
+
if (api_url := get_current_settings().api.url) is None:
|
137
|
+
return None
|
138
|
+
if (task_run_id := get_id()) is None:
|
139
|
+
return None
|
140
|
+
return f"{api_url}/runs/task-run/{task_run_id}"
|
141
|
+
|
142
|
+
|
143
|
+
def get_task_run_ui_url() -> str | None:
|
144
|
+
if (ui_url := get_current_settings().ui_url) is None:
|
145
|
+
return None
|
146
|
+
if (task_run_id := get_id()) is None:
|
147
|
+
return None
|
148
|
+
return f"{ui_url}/runs/task-run/{task_run_id}"
|
149
|
+
|
150
|
+
|
151
|
+
FIELDS: dict[str, Callable[[], Any | None]] = {
|
126
152
|
"id": get_id,
|
127
153
|
"tags": get_tags,
|
128
154
|
"name": get_name,
|
129
155
|
"parameters": get_parameters,
|
130
156
|
"run_count": get_run_count,
|
131
157
|
"task_name": get_task_name,
|
158
|
+
"api_url": get_task_run_api_url,
|
159
|
+
"ui_url": get_task_run_ui_url,
|
132
160
|
}
|
prefect/tasks.py
CHANGED
@@ -965,7 +965,7 @@ class Task(Generic[P, R]):
|
|
965
965
|
def __call__(
|
966
966
|
self: "Task[P, NoReturn]",
|
967
967
|
*args: P.args,
|
968
|
-
return_state: Literal[False],
|
968
|
+
return_state: Literal[False] = False,
|
969
969
|
wait_for: Optional[OneOrManyFutureOrResult[Any]] = None,
|
970
970
|
**kwargs: P.kwargs,
|
971
971
|
) -> None:
|
@@ -977,20 +977,22 @@ class Task(Generic[P, R]):
|
|
977
977
|
def __call__(
|
978
978
|
self: "Task[P, R]",
|
979
979
|
*args: P.args,
|
980
|
-
return_state: Literal[True],
|
981
|
-
wait_for: Optional[OneOrManyFutureOrResult[Any]] = None,
|
982
980
|
**kwargs: P.kwargs,
|
983
|
-
) ->
|
981
|
+
) -> R:
|
984
982
|
...
|
985
983
|
|
984
|
+
# Keyword parameters `return_state` and `wait_for` aren't allowed after the
|
985
|
+
# ParamSpec `*args` parameter, so we lose return type typing when either of
|
986
|
+
# those are provided.
|
987
|
+
# TODO: Find a way to expose this functionality without losing type information
|
986
988
|
@overload
|
987
989
|
def __call__(
|
988
990
|
self: "Task[P, R]",
|
989
991
|
*args: P.args,
|
990
|
-
return_state: Literal[
|
992
|
+
return_state: Literal[True] = True,
|
991
993
|
wait_for: Optional[OneOrManyFutureOrResult[Any]] = None,
|
992
994
|
**kwargs: P.kwargs,
|
993
|
-
) -> R:
|
995
|
+
) -> State[R]:
|
994
996
|
...
|
995
997
|
|
996
998
|
@overload
|
@@ -63,7 +63,7 @@ def swagger_lib(config: MkDocsConfig) -> dict[str, Any]:
|
|
63
63
|
}
|
64
64
|
|
65
65
|
extra_javascript = config.extra_javascript
|
66
|
-
extra_css = cast(list[str], config.extra_css)
|
66
|
+
extra_css = cast(list[str], config.extra_css) # pyright: ignore[reportUnknownMemberType] incomplete type hint
|
67
67
|
for lib in extra_javascript:
|
68
68
|
if (
|
69
69
|
os.path.basename(urllib.parse.urlparse(str(lib)).path)
|
prefect/utilities/templating.py
CHANGED
@@ -103,6 +103,13 @@ def apply_values(
|
|
103
103
|
...
|
104
104
|
|
105
105
|
|
106
|
+
@overload
|
107
|
+
def apply_values(
|
108
|
+
template: T, values: dict[str, Any], remove_notset: bool = False
|
109
|
+
) -> Union[T, type[NotSet]]:
|
110
|
+
...
|
111
|
+
|
112
|
+
|
106
113
|
def apply_values(
|
107
114
|
template: T, values: dict[str, Any], remove_notset: bool = True
|
108
115
|
) -> Union[T, type[NotSet]]:
|
@@ -1,17 +1,18 @@
|
|
1
1
|
prefect/.prefectignore,sha256=awSprvKT0vI8a64mEOLrMxhxqcO-b0ERQeYpA2rNKVQ,390
|
2
2
|
prefect/__init__.py,sha256=FmdMSNpGH8Mrkn5X0mNZup8_SHdeB_aqEmS5taeOHAQ,3530
|
3
|
-
prefect/
|
3
|
+
prefect/__main__.py,sha256=WFjw3kaYJY6pOTA7WDOgqjsz8zUEUZHCcj3P5wyVa-g,66
|
4
|
+
prefect/_version.py,sha256=eZwRnh_eywLtm80YKl1mH7xjkhbVGxJw1E2cZDaVgtE,497
|
4
5
|
prefect/agent.py,sha256=qyyUMdiv5ndUIk-O8uwamESJGXXDQ_BmhKiLlm31ue0,286
|
5
|
-
prefect/artifacts.py,sha256=
|
6
|
+
prefect/artifacts.py,sha256=dMBUOAWnUamzjb5HSqwB5-GR2Qb-Gxee26XG5NDCUuw,22720
|
6
7
|
prefect/automations.py,sha256=JDrHoM6s6wDnauhHG6_oTkRwR9DusPXlCcNzAHvkmAA,12599
|
7
8
|
prefect/cache_policies.py,sha256=pItSKH2KRFHK9YPw36hTBaFEATKRbl6sN5wAEdF-Uns,11808
|
8
9
|
prefect/context.py,sha256=7SC-trRyfunmPMuM7lod4HhFd5Kc4MHwDWQwenLsh-8,23677
|
9
10
|
prefect/engine.py,sha256=vIhgOZfP1Lssa_Vz8uEDx4Y1xoPgZ1_4r581c_Hbwac,2766
|
10
11
|
prefect/exceptions.py,sha256=sbphPKQ4yOBUa9w0MsSFoDj_uC8Tlv9WHTjzO3cQKq8,11593
|
11
12
|
prefect/filesystems.py,sha256=v5YqGB4uXf9Ew2VuB9VCSkawvYMMVvEtZf7w1VmAmr8,18036
|
12
|
-
prefect/flow_engine.py,sha256=
|
13
|
+
prefect/flow_engine.py,sha256=wsv55Qh5GtbxTz5lS55-rhjpXHGN2FuYzp9RR30ev30,60158
|
13
14
|
prefect/flow_runs.py,sha256=-5udBBYdgdCBCjAMYvELbA1vmrjZ6oREXl-BZdZr6hc,16129
|
14
|
-
prefect/flows.py,sha256=
|
15
|
+
prefect/flows.py,sha256=HeudArI-qtOMRbx_jDnuvKPUi5BWSxSDzTQ2vF6kpdA,106416
|
15
16
|
prefect/futures.py,sha256=NYWGeC8uRGe1WWB1MxkUshdvAdYibhc32HdFjffdiW0,17217
|
16
17
|
prefect/main.py,sha256=6WYIkPTTAoHQ1BPOnbnbvhKpnYiUcStzqYFI6Gqqpvw,2351
|
17
18
|
prefect/plugins.py,sha256=FPRLR2mWVBMuOnlzeiTD9krlHONZH2rtYLD753JQDNQ,2516
|
@@ -23,11 +24,11 @@ prefect/task_engine.py,sha256=gJghxCJzg5kvHulKuMcDQCcvKHPoVYrlNNCd7lGechc,60628
|
|
23
24
|
prefect/task_runners.py,sha256=2rwrnlebVA9LS-tgjZT_sei8sUTXV4CXpVr8R97egW8,15916
|
24
25
|
prefect/task_runs.py,sha256=7LIzfo3fondCyEUpU05sYFN5IfpZigBDXrhG5yc-8t0,9039
|
25
26
|
prefect/task_worker.py,sha256=4NhcR4ZzCBqfpiLDVuww3p1Pu0YVwjeyqI0BFFegNWA,17791
|
26
|
-
prefect/tasks.py,sha256=
|
27
|
+
prefect/tasks.py,sha256=aUjDpkVdlQ3XeWAVCdIkLtkXQM4_heKSlrOOfg0nFtU,74183
|
27
28
|
prefect/transactions.py,sha256=kOXwghBW3jM71gg49MkjJPTnImEzXWeTCUE_zpq2MlI,16068
|
28
29
|
prefect/variables.py,sha256=dCK3vX7TbkqXZhnNT_v7rcGh3ISRqoR6pJVLpoll3Js,8342
|
29
30
|
prefect/_experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
prefect/_experimental/lineage.py,sha256=
|
31
|
+
prefect/_experimental/lineage.py,sha256=8LssReoq7eLtQScUCu-7FCtrWoRZstXKRdpO0PxgbKg,9958
|
31
32
|
prefect/_experimental/sla/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
33
|
prefect/_experimental/sla/client.py,sha256=XTkYHFZiBy_O7RgUyGEdl9MxaHP-6fEAKBk3ksNQobU,3611
|
33
34
|
prefect/_experimental/sla/objects.py,sha256=Zdvc_hqdCKlZd4eJTA7T-Czdezk1PPw7kZ6RlNtPeAg,1834
|
@@ -47,7 +48,7 @@ prefect/_internal/concurrency/cancellation.py,sha256=5pVR65GfVlzI4-h7R_uAPPgRFlw
|
|
47
48
|
prefect/_internal/concurrency/event_loop.py,sha256=N6SyBV0vaSF5HD4_JM8zL7oBGd2nMuEKkeSPnBZdHw4,2136
|
48
49
|
prefect/_internal/concurrency/inspection.py,sha256=wUWVbHi4G-BxuuYFWhTNmo5yc1C651lQrp5OMiHPU1E,3545
|
49
50
|
prefect/_internal/concurrency/primitives.py,sha256=Wuht4GwJCgts_uAZFUt9c-InPssnXcelRQc1dGdOplk,2672
|
50
|
-
prefect/_internal/concurrency/services.py,sha256=
|
51
|
+
prefect/_internal/concurrency/services.py,sha256=LmB6QwqJoB6B8curZ93zxWdKYNwuyiyBKLdACWFfb7E,15940
|
51
52
|
prefect/_internal/concurrency/threads.py,sha256=oQapoanYCBc1m0_funvDzS9yIRhEK962KkHwJQ8lvi4,9286
|
52
53
|
prefect/_internal/concurrency/waiters.py,sha256=mhXpQk8swcUAxBk7f7kGn1fqy44XcFyneog_zEYecr0,9442
|
53
54
|
prefect/_internal/pydantic/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
@@ -64,9 +65,9 @@ prefect/_internal/schemas/serializers.py,sha256=G_RGHfObjisUiRvd29p-zc6W4bwt5rE1
|
|
64
65
|
prefect/_internal/schemas/validators.py,sha256=O_X5K0SfCvYWgxBIOhzGZxpGPtZPuzjXwsEBwrWvGbQ,19590
|
65
66
|
prefect/blocks/__init__.py,sha256=D0hB72qMfgqnBB2EMZRxUxlX9yLfkab5zDChOwJZmkY,220
|
66
67
|
prefect/blocks/abstract.py,sha256=mpOAWopSR_RrzdxeurBTXVSKisP8ne-k8LYos-tp7go,17021
|
67
|
-
prefect/blocks/core.py,sha256=
|
68
|
+
prefect/blocks/core.py,sha256=CgxU59KUWiHLWUdTxOSDOfHkfFAyjLXc7eibmFc_xCo,62186
|
68
69
|
prefect/blocks/fields.py,sha256=1m507VVmkpOnMF_7N-qboRjtw4_ceIuDneX3jZ3Jm54,63
|
69
|
-
prefect/blocks/notifications.py,sha256=
|
70
|
+
prefect/blocks/notifications.py,sha256=zSYBJO64NEWRZepisOhtCZYZpTHrczyklooroc_LKsk,34136
|
70
71
|
prefect/blocks/redis.py,sha256=lt_f1SIcS5OVvthCY6KRWiy5DyUZNRlHqkKhKF25P8c,5770
|
71
72
|
prefect/blocks/system.py,sha256=wris9Tf0Jpnz7uyAokPvqsQKeZBq_Q4-joCoLkgf6kI,4951
|
72
73
|
prefect/blocks/webhook.py,sha256=hRpMGamOpS2HSM0iPU2ylVGnDWtWUPo6sIU3O24lIa0,2558
|
@@ -103,11 +104,11 @@ prefect/client/orchestration/_logs/client.py,sha256=DYgdeVV_6ORIOuqZapDWZXuFjIUt
|
|
103
104
|
prefect/client/orchestration/_variables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
105
|
prefect/client/orchestration/_variables/client.py,sha256=wKBbZBLGgs5feDCil-xxKt36dibUEB5Ll62uPtvQGmc,5284
|
105
106
|
prefect/client/schemas/__init__.py,sha256=InZcDzdeWA2oaV0TlyvoMcyLcbi_aaqU1U9D6Gx-eoU,2747
|
106
|
-
prefect/client/schemas/actions.py,sha256=
|
107
|
+
prefect/client/schemas/actions.py,sha256=f22GpRbOmzQiY6bGGR1X_touYQSwyQdRz9Rp4fxufVU,30246
|
107
108
|
prefect/client/schemas/filters.py,sha256=zaiDkalrIpKjd38V4aP1GHlqD24KTPCZiKtPyX69ZWE,36607
|
108
109
|
prefect/client/schemas/objects.py,sha256=NA3lEiqYV5sEzRUM3IlvXFoxgs9WeHPq9vSxQU5RXBU,57780
|
109
110
|
prefect/client/schemas/responses.py,sha256=iTXTiUhdRL7PxNyJXMZ4ngT7C8SepT_z7g_pnUnVlzo,15629
|
110
|
-
prefect/client/schemas/schedules.py,sha256=
|
111
|
+
prefect/client/schemas/schedules.py,sha256=oE4_RnR1UWOMk0Nmlgu0Mcrm8Gn2mMfkErnEjqPIYAY,15026
|
111
112
|
prefect/client/schemas/sorting.py,sha256=L-2Mx-igZPtsUoRUguTcG3nIEstMEMPD97NwPM2Ox5s,2579
|
112
113
|
prefect/client/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
113
114
|
prefect/client/types/flexible_schedule_list.py,sha256=WjIiy-yZuA_k1iCMCrmZBW24JNNHYPDRkg3TOhlJGhw,370
|
@@ -126,10 +127,10 @@ prefect/concurrency/v1/context.py,sha256=BhK63TYp9BQYRCgTI1onUPXmgBoYaP7o27U695l
|
|
126
127
|
prefect/concurrency/v1/services.py,sha256=ppVCllzb2qeKc-xntobFu45dEh3J-ZTtLDPuHr1djxo,2958
|
127
128
|
prefect/concurrency/v1/sync.py,sha256=C5uPmW2pWdt3bu1KVQkYf_IscjSzY_VhgR9AZJkkIa8,2106
|
128
129
|
prefect/deployments/__init__.py,sha256=_wb7NxDKhq11z9MjYsPckmT3o6MRhGLRgCV9TmvYtew,1002
|
129
|
-
prefect/deployments/base.py,sha256=
|
130
|
+
prefect/deployments/base.py,sha256=KEc07W35yyzGJcV6GIZry8bKcNfvQk6JjJ99KKB6XpQ,11729
|
130
131
|
prefect/deployments/deployments.py,sha256=K3Rgnpjxo_T8I8LMwlq24OKqZiZBTE8-YnPg-YGUStM,171
|
131
132
|
prefect/deployments/flow_runs.py,sha256=obEKxKeycgYUTgSdoYTyhX2jXeGRoW4hxrCM-KapWjs,7204
|
132
|
-
prefect/deployments/runner.py,sha256=
|
133
|
+
prefect/deployments/runner.py,sha256=d7eIkJRlah4_KtGoz9t_L5B_EBgzHCoITtxZu6CZDRY,50222
|
133
134
|
prefect/deployments/schedules.py,sha256=qFzYxPUYz8mYRPxG4dOXZC-6tdVprbK5Zw1fwBf42xI,1910
|
134
135
|
prefect/deployments/steps/__init__.py,sha256=Dlz9VqMRyG1Gal8dj8vfGpPr0LyQhZdvcciozkK8WoY,206
|
135
136
|
prefect/deployments/steps/core.py,sha256=ulSgBFSx1lhBt1fP-UxebrernkumBDlympR6IPffV1g,6900
|
@@ -139,7 +140,7 @@ prefect/docker/__init__.py,sha256=z6wdc6UFfiBG2jb9Jk64uCWVM04JKVWeVyDWwuuon8M,52
|
|
139
140
|
prefect/docker/docker_image.py,sha256=0PZjUCTe_20Zsrg-LtADV4HmPnAYzq7QdXRl22WK40M,3103
|
140
141
|
prefect/events/__init__.py,sha256=GtKl2bE--pJduTxelH2xy7SadlLJmmis8WR1EYixhuA,2094
|
141
142
|
prefect/events/actions.py,sha256=A7jS8bo4zWGnrt3QfSoQs0uYC1xfKXio3IfU0XtTb5s,9129
|
142
|
-
prefect/events/clients.py,sha256=
|
143
|
+
prefect/events/clients.py,sha256=_BSO4sZEcbJ9j2NhAAT9rtgyspg00g53PIuy2zhdM10,26827
|
143
144
|
prefect/events/filters.py,sha256=h9L6pukS9tD7Y8rGC3dt04KJINu0oJoti-flGLQTQQQ,8086
|
144
145
|
prefect/events/related.py,sha256=A-1SVYwHtsxaDurRepnTsYbTWRBJSbtL5O_KffLaTwU,6534
|
145
146
|
prefect/events/utilities.py,sha256=gaJEC5mMK9XsCt8wbWzuFhZTRyYYmfnMoR-S4s79zg4,2648
|
@@ -183,7 +184,7 @@ prefect/runner/utils.py,sha256=MLtoouDD6bh-JAIz0W3fMofKXEt0VfGsg6d8jf45OA0,3280
|
|
183
184
|
prefect/runtime/__init__.py,sha256=JswiTlYRup2zXOYu8AqJ7czKtgcw9Kxo0tTbS6aWCqY,407
|
184
185
|
prefect/runtime/deployment.py,sha256=0A_cUVpYiFk3ciJw2ixy95dk9xBJcjisyF69pakSCcQ,5091
|
185
186
|
prefect/runtime/flow_run.py,sha256=YTUYOgJ1ADyarYySsuL4GL2s0Iq-fy3956sf4Z3QIU4,10564
|
186
|
-
prefect/runtime/task_run.py,sha256=
|
187
|
+
prefect/runtime/task_run.py,sha256=zYBSs7QrAu7c2IjKomRzPXKyIXrjqclMTMrco-dwyOw,4212
|
187
188
|
prefect/server/api/collections_data/views/aggregate-worker-metadata.json,sha256=gqrwGyylzBEzlFSPOJcMuUwdoK_zojpU0SZaBDgK5FE,79748
|
188
189
|
prefect/server/api/static/prefect-logo-mark-gradient.png,sha256=ylRjJkI_JHCw8VbQasNnXQHwZW-sH-IQiUGSD3aWP1E,73430
|
189
190
|
prefect/settings/__init__.py,sha256=98gr0K9ovrBz1RQsOIUvYTx2RURbFR5PFKew51Ne314,2070
|
@@ -252,10 +253,10 @@ prefect/utilities/math.py,sha256=UPIdJMP13lCU3o0Yz98o4VDw3LTkkrsOAsvAdA3Xifc,295
|
|
252
253
|
prefect/utilities/names.py,sha256=S_cmhrXybZpwcm9lwibDV2t9dRjPCvYYcJrGommaUt4,1743
|
253
254
|
prefect/utilities/processutils.py,sha256=YFvO8a_L3AeuJbwXcGR1pkBjEjvw7OPw2GCjT0AEkU0,16267
|
254
255
|
prefect/utilities/pydantic.py,sha256=lIfz1RT2mMag_UQ_PIduDpN3w03oId3yy5qcoR3fsyM,12295
|
255
|
-
prefect/utilities/render_swagger.py,sha256=
|
256
|
+
prefect/utilities/render_swagger.py,sha256=y0GcR38qW083lUPrfHIbDVKPm_fyyodtBM8MTLNF8oI,4155
|
256
257
|
prefect/utilities/services.py,sha256=WRT77LW2IX3TCYoGIBsG-V8K_2P3oQWgtW7XkBGnhcs,7714
|
257
258
|
prefect/utilities/slugify.py,sha256=57Vb14t13F3zm1P65KAu8nVeAz0iJCd1Qc5eMG-R5y8,169
|
258
|
-
prefect/utilities/templating.py,sha256=
|
259
|
+
prefect/utilities/templating.py,sha256=LXpkdzT0lhvwfpLM4FX7OVEMn9lbnLT54eehwjnSptU,14289
|
259
260
|
prefect/utilities/text.py,sha256=cuXb5EwRP5qFV7w-3_axEft4rDIJAMS8jgCg0kqNGKQ,758
|
260
261
|
prefect/utilities/timeout.py,sha256=qSJTm7aCvLqZiPQqFvlIxgjFFB50o76Xs4ZkfxdvCNE,1280
|
261
262
|
prefect/utilities/urls.py,sha256=tnl2Y5FeAlXWWQSQiMNkD5YqBvD7FJ-Yas_FibATnW0,9133
|
@@ -270,8 +271,8 @@ prefect/workers/cloud.py,sha256=qyyUMdiv5ndUIk-O8uwamESJGXXDQ_BmhKiLlm31ue0,286
|
|
270
271
|
prefect/workers/process.py,sha256=wfVD9rxcGP1PHrppHBxhm0NwypjT9c78aFRUdSh6624,20175
|
271
272
|
prefect/workers/server.py,sha256=SEuyScZ5nGm2OotdtbHjpvqJlTRVWCh29ND7FeL_fZA,1974
|
272
273
|
prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
|
273
|
-
prefect_client-3.1.
|
274
|
-
prefect_client-3.1.
|
275
|
-
prefect_client-3.1.
|
276
|
-
prefect_client-3.1.
|
277
|
-
prefect_client-3.1.
|
274
|
+
prefect_client-3.1.15.dist-info/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
|
275
|
+
prefect_client-3.1.15.dist-info/METADATA,sha256=naba-BQFYCLWInvViG8tOvglI7akrD_HbKXILFkIhFA,7287
|
276
|
+
prefect_client-3.1.15.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
277
|
+
prefect_client-3.1.15.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
|
278
|
+
prefect_client-3.1.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|