hatchet-sdk 0.43.0__py3-none-any.whl → 0.43.1__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.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/hatchet.py +6 -4
- hatchet_sdk/py.typed +0 -0
- {hatchet_sdk-0.43.0.dist-info → hatchet_sdk-0.43.1.dist-info}/METADATA +7 -7
- {hatchet_sdk-0.43.0.dist-info → hatchet_sdk-0.43.1.dist-info}/RECORD +6 -5
- {hatchet_sdk-0.43.0.dist-info → hatchet_sdk-0.43.1.dist-info}/WHEEL +0 -0
- {hatchet_sdk-0.43.0.dist-info → hatchet_sdk-0.43.1.dist-info}/entry_points.txt +0 -0
hatchet_sdk/hatchet.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import logging
|
|
3
|
-
from typing import Any, Callable, Optional, Type, TypeVar, Union
|
|
3
|
+
from typing import Any, Callable, Optional, ParamSpec, Type, TypeVar, Union
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel
|
|
6
6
|
from typing_extensions import deprecated
|
|
@@ -35,6 +35,9 @@ from .workflow import (
|
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
T = TypeVar("T", bound=BaseModel)
|
|
38
|
+
R = TypeVar("R")
|
|
39
|
+
P = ParamSpec("P")
|
|
40
|
+
|
|
38
41
|
TWorkflow = TypeVar("TWorkflow", bound=object)
|
|
39
42
|
|
|
40
43
|
|
|
@@ -87,10 +90,10 @@ def step(
|
|
|
87
90
|
desired_worker_labels: dict[str, DesiredWorkerLabel] = {},
|
|
88
91
|
backoff_factor: float | None = None,
|
|
89
92
|
backoff_max_seconds: int | None = None,
|
|
90
|
-
) -> Callable[
|
|
93
|
+
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
|
91
94
|
parents = parents or []
|
|
92
95
|
|
|
93
|
-
def inner(func: Callable[
|
|
96
|
+
def inner(func: Callable[P, R]) -> Callable[P, R]:
|
|
94
97
|
limits = None
|
|
95
98
|
if rate_limits:
|
|
96
99
|
limits = [rate_limit._req for rate_limit in rate_limits or []]
|
|
@@ -99,7 +102,6 @@ def step(
|
|
|
99
102
|
setattr(func, "_step_parents", parents)
|
|
100
103
|
setattr(func, "_step_timeout", timeout)
|
|
101
104
|
setattr(func, "_step_retries", retries)
|
|
102
|
-
setattr(func, "_step_rate_limits", retries)
|
|
103
105
|
setattr(func, "_step_rate_limits", limits)
|
|
104
106
|
setattr(func, "_step_backoff_factor", backoff_factor)
|
|
105
107
|
setattr(func, "_step_backoff_max_seconds", backoff_max_seconds)
|
hatchet_sdk/py.typed
ADDED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hatchet-sdk
|
|
3
|
-
Version: 0.43.
|
|
3
|
+
Version: 0.43.1
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Alexander Belanger
|
|
6
6
|
Author-email: alexander@hatchet.run
|
|
@@ -17,12 +17,12 @@ Requires-Dist: grpcio (>=1.68.1,<2.0.0)
|
|
|
17
17
|
Requires-Dist: grpcio-tools (>=1.68.1,<2.0.0)
|
|
18
18
|
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
|
19
19
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
|
20
|
-
Requires-Dist: opentelemetry-api (>=1.
|
|
21
|
-
Requires-Dist: opentelemetry-distro (>=0.
|
|
22
|
-
Requires-Dist: opentelemetry-exporter-otlp (>=1.
|
|
23
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.
|
|
24
|
-
Requires-Dist: opentelemetry-instrumentation (>=0.
|
|
25
|
-
Requires-Dist: opentelemetry-sdk (>=1.
|
|
20
|
+
Requires-Dist: opentelemetry-api (>=1.28.0,<2.0.0)
|
|
21
|
+
Requires-Dist: opentelemetry-distro (>=0.49b0)
|
|
22
|
+
Requires-Dist: opentelemetry-exporter-otlp (>=1.28.0,<2.0.0)
|
|
23
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0,<2.0.0)
|
|
24
|
+
Requires-Dist: opentelemetry-instrumentation (>=0.49b0)
|
|
25
|
+
Requires-Dist: opentelemetry-sdk (>=1.28.0,<2.0.0)
|
|
26
26
|
Requires-Dist: prometheus-client (>=0.21.1,<0.22.0)
|
|
27
27
|
Requires-Dist: protobuf (>=5.29.1,<6.0.0)
|
|
28
28
|
Requires-Dist: pydantic (>=2.6.3,<3.0.0)
|
|
@@ -203,11 +203,12 @@ hatchet_sdk/contracts/workflows_pb2.pyi,sha256=2r5d4DWaR0kwY8jKSzcffTAMMlWrusRXC
|
|
|
203
203
|
hatchet_sdk/contracts/workflows_pb2_grpc.py,sha256=AFu0wRpfyCyNVIYZLKian6s5qPnVDCwtuE91JMaMmUI,10522
|
|
204
204
|
hatchet_sdk/features/cron.py,sha256=4lKMH0MqiN8cHJk2jhF0Ueqs6z5ozwJzlOeSeaWqvO0,10217
|
|
205
205
|
hatchet_sdk/features/scheduled.py,sha256=YhEbNWl8dWOH61rXVjAyu8iG1BZqpSkD4kgaxkKIHgY,9504
|
|
206
|
-
hatchet_sdk/hatchet.py,sha256=
|
|
206
|
+
hatchet_sdk/hatchet.py,sha256=L6O9cTeZtGqFUxO5H8knXKdiej0iAequ1Wl7vSNO9FY,10027
|
|
207
207
|
hatchet_sdk/labels.py,sha256=Axfp1yUNowzE9mL8AQA1ADqwOaNmq3QP_45wb1Ed1aI,272
|
|
208
208
|
hatchet_sdk/loader.py,sha256=ddwQ7BAWYsJ9LEsNxajCkv78hRLUMftVG0vdg5V09iQ,8746
|
|
209
209
|
hatchet_sdk/logger.py,sha256=5uOr52T4mImSQm1QvWT8HvZFK5WfPNh3Y1cBQZRFgUQ,333
|
|
210
210
|
hatchet_sdk/metadata.py,sha256=M_Cb-CXRKitzVMQHeaHUtbY28ET__fAbyGX1YKaeN4I,80
|
|
211
|
+
hatchet_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
211
212
|
hatchet_sdk/rate_limit.py,sha256=IIzpe65i-518t9kQcZVEykDQ2VY8sOw2F7qlQ4wlAjw,4421
|
|
212
213
|
hatchet_sdk/semver.py,sha256=PrgBL0TnyXl3p_OK1iSMk9Gpujfh5asQpJ4DHJLCW2k,998
|
|
213
214
|
hatchet_sdk/token.py,sha256=Ap3jnbaPAL10F2G_D71wj7OpBcvrI3RuE0keqXx1lAE,698
|
|
@@ -229,7 +230,7 @@ hatchet_sdk/worker/runner/utils/error_with_traceback.py,sha256=Iih_s8JNqrinXETFJ
|
|
|
229
230
|
hatchet_sdk/worker/worker.py,sha256=7UPm3qTzNYSSm9QTNX6zBBMJqVA6nKFeCbAdqLLjUBs,13007
|
|
230
231
|
hatchet_sdk/workflow.py,sha256=XRj5jcCQSvPQMXxBipf-ZlARua2E8Z9igRzGcQ5alkI,9375
|
|
231
232
|
hatchet_sdk/workflow_run.py,sha256=BwK5cefvXXvyQ1Ednj_7LeejMwQJqWnvUC_FTBmJNxk,1805
|
|
232
|
-
hatchet_sdk-0.43.
|
|
233
|
-
hatchet_sdk-0.43.
|
|
234
|
-
hatchet_sdk-0.43.
|
|
235
|
-
hatchet_sdk-0.43.
|
|
233
|
+
hatchet_sdk-0.43.1.dist-info/METADATA,sha256=E9nxiPbh3-x6S1TPXCVhPmgAm3sqolSmtIW8xPQ2wws,1554
|
|
234
|
+
hatchet_sdk-0.43.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
235
|
+
hatchet_sdk-0.43.1.dist-info/entry_points.txt,sha256=LTtQRABmSGYOxRI68cUVEz5dp9Qb57eqXGic9lU8RMo,1023
|
|
236
|
+
hatchet_sdk-0.43.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|