prefect-client 2.20.18__py3-none-any.whl → 2.20.19__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.
@@ -845,12 +845,30 @@ class SendgridEmail(AbstractAppriseNotificationBlock):
845
845
  def block_initialization(self) -> None:
846
846
  from apprise.plugins.sendgrid import NotifySendGrid
847
847
 
848
- url = SecretStr(
849
- NotifySendGrid(
848
+ self._NotifySendGrid = NotifySendGrid # Cache the working import
849
+ url = self._build_sendgrid_url()
850
+ self._start_apprise_client(url)
851
+
852
+ def _build_sendgrid_url(self) -> SecretStr:
853
+ """Build the SendGrid URL with current to_emails."""
854
+ return SecretStr(
855
+ self._NotifySendGrid(
850
856
  apikey=self.api_key.get_secret_value(),
851
857
  from_email=self.sender_email,
852
858
  targets=self.to_emails,
853
859
  ).url()
854
860
  )
855
861
 
856
- self._start_apprise_client(url)
862
+ @sync_compatible
863
+ @instrument_instance_method_call
864
+ async def notify(
865
+ self,
866
+ body: str,
867
+ subject: Optional[str] = None,
868
+ ):
869
+ # Update apprise client with current to_emails before sending
870
+ if hasattr(self, "_apprise_client") and self._apprise_client:
871
+ self._apprise_client.clear()
872
+ self._apprise_client.add(self._build_sendgrid_url().get_secret_value())
873
+
874
+ await super().notify(body, subject)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prefect-client
3
- Version: 2.20.18
3
+ Version: 2.20.19
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: anyio<4.6.1,>=4.4.0
26
26
  Requires-Dist: asgi-lifespan<3.0,>=1.0
27
- Requires-Dist: cachetools<6.0,>=5.3
27
+ Requires-Dist: cachetools<7.0,>=5.3
28
28
  Requires-Dist: cloudpickle<4.0,>=2.0
29
29
  Requires-Dist: coolname<3.0.0,>=1.0.4
30
30
  Requires-Dist: croniter<6.0.0,>=1.0.12
@@ -39,7 +39,7 @@ Requires-Dist: importlib-resources<6.5.0,>=6.1.3
39
39
  Requires-Dist: jsonpatch<2.0,>=1.32
40
40
  Requires-Dist: jsonschema<5.0.0,>=4.0.0
41
41
  Requires-Dist: orjson<4.0,>=3.7
42
- Requires-Dist: packaging<24.3,>=21.3
42
+ Requires-Dist: packaging<25.1,>=21.3
43
43
  Requires-Dist: pathspec>=0.8.0
44
44
  Requires-Dist: pendulum<3.0; python_version < "3.12"
45
45
  Requires-Dist: pendulum<4,>=3.0.0; python_version >= "3.12"
@@ -159,7 +159,7 @@ prefect/blocks/abstract.py,sha256=AiAs0MC5JKCf0Xg0yofC5Qu2TZ52AjDMP1ntMGuP2dY,16
159
159
  prefect/blocks/core.py,sha256=_NKdrHvN2f0LdgqX9MYXp0PJQW36e6cs2Za7hVfrCIw,43870
160
160
  prefect/blocks/fields.py,sha256=ANOzbNyDCBIvm6ktgbLTMs7JW2Sf6CruyATjAW61ks0,1607
161
161
  prefect/blocks/kubernetes.py,sha256=IN-hZkzIRvqjd_dzPZby3q8p7m2oUWqArBq24BU9cDg,4071
162
- prefect/blocks/notifications.py,sha256=EMW38ZGkQERQHJ32zkqod_GkFIJssq5ra5_rpRZOc_c,29487
162
+ prefect/blocks/notifications.py,sha256=sCzbPMTJGCT_xyYfJwqbLCwzesbBZ8CR4Qp042bKUzc,30188
163
163
  prefect/blocks/system.py,sha256=aIRiFKlXIQ1sMaqniMXYolFsx2IVN3taBMH3KCThB2I,3089
164
164
  prefect/blocks/webhook.py,sha256=iyPkhgTL04oqz7R2I0jddS2oBWVdp7qvBlRxEbbwueo,2327
165
165
  prefect/client/__init__.py,sha256=yJ5FRF9RxNUio2V_HmyKCKw5G6CZO0h8cv6xA_Hkpcc,477
@@ -289,8 +289,8 @@ prefect/workers/block.py,sha256=aYY__uq3v1eq1kkbVukxyhQNbkknaKYo6-_3tcrfKKA,8067
289
289
  prefect/workers/process.py,sha256=pPtCdA7fKQ4OsvoitT-cayZeh5HgLX4xBUYlb2Zad-Q,9475
290
290
  prefect/workers/server.py,sha256=WVZJxR8nTMzK0ov0BD0xw5OyQpT26AxlXbsGQ1OrxeQ,1551
291
291
  prefect/workers/utilities.py,sha256=VfPfAlGtTuDj0-Kb8WlMgAuOfgXCdrGAnKMapPSBrwc,2483
292
- prefect_client-2.20.18.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
293
- prefect_client-2.20.18.dist-info/METADATA,sha256=QUPxtf1ZBLu9xBAAmtGhXKNzi1X_sXDqJHm4qkjB6Ms,7656
294
- prefect_client-2.20.18.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
295
- prefect_client-2.20.18.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
296
- prefect_client-2.20.18.dist-info/RECORD,,
292
+ prefect_client-2.20.19.dist-info/licenses/LICENSE,sha256=MCxsn8osAkzfxKC4CC_dLcUkU8DZLkyihZ8mGs3Ah3Q,11357
293
+ prefect_client-2.20.19.dist-info/METADATA,sha256=H_nZZsZO_LA29CtcCCwCJKh9eccuePtel0Bw7umBXXM,7656
294
+ prefect_client-2.20.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
295
+ prefect_client-2.20.19.dist-info/top_level.txt,sha256=MJZYJgFdbRc2woQCeB4vM6T33tr01TmkEhRcns6H_H4,8
296
+ prefect_client-2.20.19.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5