prefect-client 2.20.7__py3-none-any.whl → 2.20.9__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.
@@ -580,6 +580,7 @@ class RunnerDeployment(BaseModel):
580
580
  cls,
581
581
  entrypoint: str,
582
582
  name: str,
583
+ flow_name: Optional[str] = None,
583
584
  interval: Optional[
584
585
  Union[Iterable[Union[int, float, timedelta]], int, float, timedelta]
585
586
  ] = None,
@@ -606,6 +607,7 @@ class RunnerDeployment(BaseModel):
606
607
  entrypoint: The path to a file containing a flow and the name of the flow function in
607
608
  the format `./path/to/file.py:flow_func_name`.
608
609
  name: A name for the deployment
610
+ flow_name: The name of the flow to deploy
609
611
  interval: An interval on which to execute the current flow. Accepts either a number
610
612
  or a timedelta object. If a number is given, it will be interpreted as seconds.
611
613
  cron: A cron schedule of when to execute runs of this flow.
@@ -649,7 +651,7 @@ class RunnerDeployment(BaseModel):
649
651
 
650
652
  deployment = cls(
651
653
  name=Path(name).stem,
652
- flow_name=flow.name,
654
+ flow_name=flow_name or flow.name,
653
655
  schedule=schedule,
654
656
  schedules=constructed_schedules,
655
657
  paused=paused,
@@ -678,6 +680,7 @@ class RunnerDeployment(BaseModel):
678
680
  storage: RunnerStorage,
679
681
  entrypoint: str,
680
682
  name: str,
683
+ flow_name: Optional[str] = None,
681
684
  interval: Optional[
682
685
  Union[Iterable[Union[int, float, timedelta]], int, float, timedelta]
683
686
  ] = None,
@@ -705,6 +708,7 @@ class RunnerDeployment(BaseModel):
705
708
  entrypoint: The path to a file containing a flow and the name of the flow function in
706
709
  the format `./path/to/file.py:flow_func_name`.
707
710
  name: A name for the deployment
711
+ flow_name: The name of the flow to deploy
708
712
  storage: A storage object to use for retrieving flow code. If not provided, a
709
713
  URL must be provided.
710
714
  interval: An interval on which to execute the current flow. Accepts either a number
@@ -755,7 +759,7 @@ class RunnerDeployment(BaseModel):
755
759
 
756
760
  deployment = cls(
757
761
  name=Path(name).stem,
758
- flow_name=flow.name,
762
+ flow_name=flow_name or flow.name,
759
763
  schedule=schedule,
760
764
  schedules=constructed_schedules,
761
765
  paused=paused,
prefect/events/clients.py CHANGED
@@ -473,11 +473,11 @@ class PrefectEventSubscriber:
473
473
  f"Reason: {e.args[0]}"
474
474
  )
475
475
  except ConnectionClosedError as e:
476
- raise Exception(
477
- "Unable to authenticate to the event stream. Please ensure the "
478
- "provided api_key you are using is valid for this environment. "
479
- f"Reason: {e.reason}"
480
- ) from e
476
+ reason = getattr(e.rcvd, "reason", None)
477
+ msg = "Unable to authenticate to the event stream. Please ensure the "
478
+ msg += "provided api_key you are using is valid for this environment. "
479
+ msg += f"Reason: {reason}" if reason else ""
480
+ raise Exception(msg) from e
481
481
 
482
482
  from prefect.events.filters import EventOccurredFilter
483
483
 
prefect/flows.py CHANGED
@@ -679,6 +679,7 @@ class Flow(Generic[P, R]):
679
679
  storage=self._storage,
680
680
  entrypoint=self._entrypoint,
681
681
  name=name,
682
+ flow_name=self.name,
682
683
  interval=interval,
683
684
  cron=cron,
684
685
  rrule=rrule,
@@ -698,7 +699,7 @@ class Flow(Generic[P, R]):
698
699
  )
699
700
  else:
700
701
  return RunnerDeployment.from_flow(
701
- self,
702
+ flow=self,
702
703
  name=name,
703
704
  interval=interval,
704
705
  cron=cron,
@@ -1147,6 +1148,15 @@ class Flow(Generic[P, R]):
1147
1148
  ) -> T:
1148
1149
  ...
1149
1150
 
1151
+ @overload
1152
+ def __call__(
1153
+ self: "Flow[P, Coroutine[Any, Any, T]]",
1154
+ *args: P.args,
1155
+ return_state: Literal[True],
1156
+ **kwargs: P.kwargs,
1157
+ ) -> Awaitable[State[T]]:
1158
+ ...
1159
+
1150
1160
  @overload
1151
1161
  def __call__(
1152
1162
  self: "Flow[P, T]",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 2.20.7
3
+ Version: 2.20.9
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -9,7 +9,7 @@ prefect/engine.py,sha256=i68gM-ZZ2x9D4aIwaLmApWeHqpMb2U2QWNJjX3aPmZM,92887
9
9
  prefect/exceptions.py,sha256=ElqC81_w6XbTaxLYANLMIPK8Fz46NmJZCRKL4NZ-JIg,10907
10
10
  prefect/filesystems.py,sha256=XniPSdBAqywj43X7GyfuWJQIbz07QJ5Y3cVNLhIF3lQ,35260
11
11
  prefect/flow_runs.py,sha256=mFHLavZk1yZ62H3UazuNDBZWAF7AqKttA4rMcHgsVSw,3119
12
- prefect/flows.py,sha256=-Ietkctf2ONzmqcytI9Fc8T1-vtPmEuOo3m6wPNLIrQ,84735
12
+ prefect/flows.py,sha256=ApTY03QIH5C9i4p50vaYVPW1K1YoVqIi9n6JomfgX34,84989
13
13
  prefect/futures.py,sha256=RaWfYIXtH7RsWxQ5QWTTlAzwtVV8XWpXaZT_hLq35vQ,12590
14
14
  prefect/manifests.py,sha256=sTM7j8Us5d49zaydYKWsKb7zJ96v1ChkLkLeR0GFYD8,683
15
15
  prefect/new_flow_engine.py,sha256=A1adTWTBAwPCn6ay003Jsoc2SdYgHV4AcJo1bmpa_7Y,16039
@@ -86,7 +86,6 @@ prefect/_vendor/fastapi/exceptions.py,sha256=131GbKBhoKJNvkE3k2-IvKye6xH-fvNaJ20
86
86
  prefect/_vendor/fastapi/logger.py,sha256=I9NNi3ov8AcqbsbC9wl1X-hdItKgYt2XTrx1f99Zpl4,54
87
87
  prefect/_vendor/fastapi/param_functions.py,sha256=BLvSfhJqiViP-_zYQ7BL_t9IARf4EJbKZSikDNsOkfw,9130
88
88
  prefect/_vendor/fastapi/params.py,sha256=UBEVQ_EK9iIbF3DOJXfH2zcO27uvf5NeRdslMOEtIEA,13350
89
- prefect/_vendor/fastapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
89
  prefect/_vendor/fastapi/requests.py,sha256=KsGwp86w95S-0wgx4pL-T4i9M_z-_KlMzX43rdUg9YU,183
91
90
  prefect/_vendor/fastapi/responses.py,sha256=M67RzoU0K91ojgHjvDIDK3iyBAvA9YKPsUJIP4FtxtY,1381
92
91
  prefect/_vendor/fastapi/routing.py,sha256=Kz1WttDcSqHkt1fW9_UmkZG-G0noRY3FAStkfw_VUNE,57083
@@ -132,7 +131,6 @@ prefect/_vendor/starlette/datastructures.py,sha256=AyApp3jfD9muXBn8EVbuAVk6ZhCDY
132
131
  prefect/_vendor/starlette/endpoints.py,sha256=00KnI8grT2xxv1jERCvAgqwVxRDOo8hrqpFHnKow9xs,5319
133
132
  prefect/_vendor/starlette/exceptions.py,sha256=ODmYfjgNKWAZwfV8TDVepoEwhv1Kl92KvvwMvEJ04AA,1840
134
133
  prefect/_vendor/starlette/formparsers.py,sha256=aNoQl0CPI7pYnvae2k0KB2jNnv6mQJL-N2FuhRhPLW4,10450
135
- prefect/_vendor/starlette/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
134
  prefect/_vendor/starlette/requests.py,sha256=dytpLA1l9oVb-u98i4caDI1z4-XtPCe1jzjFajlQWa8,10899
137
135
  prefect/_vendor/starlette/responses.py,sha256=1l36hyZeTXWYCQ8dYCo-eM_I6KyGuq_qUdtM9GBT3EA,12565
138
136
  prefect/_vendor/starlette/routing.py,sha256=Y0uiRXBQ0uRWs1O63qFD6doqKeh-KhqhuiHU5ovodQs,35696
@@ -185,7 +183,7 @@ prefect/concurrency/sync.py,sha256=QtnPRfVX9GqVyuZOt6W9yJuT9G-PlCSVnxlZKFTjuKY,3
185
183
  prefect/deployments/__init__.py,sha256=dM866rOEz3BbAN_xaFMHj3Hw1oOFemBTZ2yxVE6IGoY,394
186
184
  prefect/deployments/base.py,sha256=0l2D_laMc3q2Q5nvh-WANv3iDy4Ih5BqcPMNJJbHuP0,16391
187
185
  prefect/deployments/deployments.py,sha256=S9ro-RUNrc2v8uWFkLr3-JE7h3RGC-HO_f5T7xe4ABw,41884
188
- prefect/deployments/runner.py,sha256=a2dxc84zCofZFXV47M2zfntqUaoAhGWvf7o0s3MjPws,44772
186
+ prefect/deployments/runner.py,sha256=hz_H83e7PMaMXaiZxvpQuDcIjh_JMdbXROKkjlGNxNY,44988
189
187
  prefect/deployments/schedules.py,sha256=23GDCAKOP-aAEKGappwTrM4HU67ndVH7NR4Dq0neU_U,1884
190
188
  prefect/deployments/steps/__init__.py,sha256=3pZWONAZzenDszqNQT3bmTFilnvjB6xMolMz9tr5pLw,229
191
189
  prefect/deployments/steps/core.py,sha256=KEV05IECTlUXz-GS8bzmhrxx6U9dXJP3-SB-o4-vr0s,6845
@@ -201,7 +199,7 @@ prefect/deprecated/packaging/orion.py,sha256=3vRudge_XI4JX3aVxtK2QQvfHQ836C2maNJ
201
199
  prefect/deprecated/packaging/serializers.py,sha256=kkFNR8_w2C6zI5A1w_-lfbLVFlhn3SJ28i3T3WKBO94,5165
202
200
  prefect/events/__init__.py,sha256=GtKl2bE--pJduTxelH2xy7SadlLJmmis8WR1EYixhuA,2094
203
201
  prefect/events/actions.py,sha256=X72oHY4f_tstup7_Jv8qjSAwhQo3sHcJFaGoRhisVKA,9149
204
- prefect/events/clients.py,sha256=cQAEqBebQ1XnmDlZ9tzyrDZW33Rrci3S9xJgo9EznVs,20401
202
+ prefect/events/clients.py,sha256=TrDIg_-sl2XrFWHpWkPqAMTFWp-WS9Ym-0Tqs_KjP6Y,20468
205
203
  prefect/events/filters.py,sha256=Y2gH6EyQTKj2Tj9Nudbjg-nUqrPaIbzAQ2zqKsPCiHc,8245
206
204
  prefect/events/instrument.py,sha256=IhPBjs8n5xaAC_sPo_GfgppNLYWxIoX0l66WlkzQhlw,3715
207
205
  prefect/events/related.py,sha256=WTygrgtmxXWVlLFey5wJqO45BjHcUMeZkUbXGGmBWfE,6831
@@ -288,8 +286,8 @@ prefect/workers/block.py,sha256=aYY__uq3v1eq1kkbVukxyhQNbkknaKYo6-_3tcrfKKA,8067
288
286
  prefect/workers/process.py,sha256=pPtCdA7fKQ4OsvoitT-cayZeh5HgLX4xBUYlb2Zad-Q,9475
289
287
  prefect/workers/server.py,sha256=WVZJxR8nTMzK0ov0BD0xw5OyQpT26AxlXbsGQ1OrxeQ,1551
290
288
  prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
291
- prefect_client-2.20.7.dist-info/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
292
- prefect_client-2.20.7.dist-info/METADATA,sha256=mnKbnE3cWEP7Xg2LBPLGtlhfD66cWK7JB3oclffDEWI,7391
293
- prefect_client-2.20.7.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
294
- prefect_client-2.20.7.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
295
- prefect_client-2.20.7.dist-info/RECORD,,
289
+ prefect_client-2.20.9.dist-info/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
290
+ prefect_client-2.20.9.dist-info/METADATA,sha256=XB_lbnZBAGQikh8HCxxvu1AJYMsgFVGUIa_E0aOUdaQ,7391
291
+ prefect_client-2.20.9.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
292
+ prefect_client-2.20.9.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
293
+ prefect_client-2.20.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: bdist_wheel (0.44.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes
File without changes