hatchet-sdk 1.2.2__py3-none-any.whl → 1.2.3__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/config.py +11 -6
- {hatchet_sdk-1.2.2.dist-info → hatchet_sdk-1.2.3.dist-info}/METADATA +2 -21
- {hatchet_sdk-1.2.2.dist-info → hatchet_sdk-1.2.3.dist-info}/RECORD +5 -5
- {hatchet_sdk-1.2.2.dist-info → hatchet_sdk-1.2.3.dist-info}/WHEEL +0 -0
- {hatchet_sdk-1.2.2.dist-info → hatchet_sdk-1.2.3.dist-info}/entry_points.txt +0 -0
hatchet_sdk/config.py
CHANGED
|
@@ -78,12 +78,17 @@ class ClientConfig(BaseSettings):
|
|
|
78
78
|
|
|
79
79
|
@model_validator(mode="after")
|
|
80
80
|
def validate_addresses(self) -> "ClientConfig":
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
self.
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
## If nothing is set, read from the token
|
|
82
|
+
## If either is set, override what's in the JWT
|
|
83
|
+
server_url_from_jwt, grpc_broadcast_address_from_jwt = get_addresses_from_jwt(
|
|
84
|
+
self.token
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
if "host_port" not in self.model_fields_set:
|
|
88
|
+
self.host_port = grpc_broadcast_address_from_jwt
|
|
89
|
+
|
|
90
|
+
if "server_url" not in self.model_fields_set:
|
|
91
|
+
self.server_url = server_url_from_jwt
|
|
87
92
|
|
|
88
93
|
if not self.tls_config.server_name:
|
|
89
94
|
self.tls_config.server_name = self.host_port.split(":")[0]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hatchet-sdk
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Alexander Belanger
|
|
6
6
|
Author-email: alexander@hatchet.run
|
|
@@ -61,26 +61,7 @@ poetry add hatchet-sdk
|
|
|
61
61
|
|
|
62
62
|
## Quick Start
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```python
|
|
67
|
-
from hatchet_sdk import Context, EmptyModel, Hatchet
|
|
68
|
-
|
|
69
|
-
hatchet = Hatchet(debug=True)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
@hatchet.task(name="SimpleWorkflow")
|
|
73
|
-
def step1(input: EmptyModel, ctx: Context) -> None:
|
|
74
|
-
print("executed step1")
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def main() -> None:
|
|
78
|
-
worker = hatchet.worker("test-worker", slots=1, workflows=[step1])
|
|
79
|
-
worker.start()
|
|
80
|
-
|
|
81
|
-
if __name__ == "__main__":
|
|
82
|
-
main()
|
|
83
|
-
```
|
|
64
|
+
For examples of how to use the Hatchet Python SDK, including worker setup and task execution, please see our [official documentation](https://docs.hatchet.run/home/setup).
|
|
84
65
|
|
|
85
66
|
## Features
|
|
86
67
|
|
|
@@ -217,7 +217,7 @@ hatchet_sdk/clients/rest/tenacity_utils.py,sha256=n6QvwuGwinLQpiWNU5GxrDNhFBE8_w
|
|
|
217
217
|
hatchet_sdk/clients/run_event_listener.py,sha256=rIjBLRF7d7FBoEq7RKbmbOA84lX_hHSU26trwnthqV8,10230
|
|
218
218
|
hatchet_sdk/clients/v1/api_client.py,sha256=L5dbAvIJMnoe9oiUuwLJx8Atn_NTpCctGJ_cXxE-KFs,1247
|
|
219
219
|
hatchet_sdk/clients/workflow_listener.py,sha256=x6FQ8d786MiubARPG0B92L3Jbs4Ve0CQJFx_udJIB3s,10522
|
|
220
|
-
hatchet_sdk/config.py,sha256=
|
|
220
|
+
hatchet_sdk/config.py,sha256=jJA76BOvVdfOQHy6TKclAvr2qyblcM-Pz5J-hVAdpQ4,3588
|
|
221
221
|
hatchet_sdk/connection.py,sha256=B5gT5NL9BBB5-l9U_cN6pMlraQk880rEYMnqaK_dgL0,2590
|
|
222
222
|
hatchet_sdk/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
223
|
hatchet_sdk/context/context.py,sha256=jxT4HHrocY9dftiXxob-f06JRIYENRLrSgXE-t8hgxY,9347
|
|
@@ -506,7 +506,7 @@ hatchet_sdk/worker/runner/runner.py,sha256=ZocvR7dDgEvSxcHAWDDaoTasSz3Wio70TbEbB
|
|
|
506
506
|
hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=nHRPSiDBqzhObM7i2X7t03OupVFnE7kQBdR2Ckgg-2w,2709
|
|
507
507
|
hatchet_sdk/worker/worker.py,sha256=qyHs64H-grF9HR1CgH7MlnoDmTQ8mm4d8basx-ZDyWc,14490
|
|
508
508
|
hatchet_sdk/workflow_run.py,sha256=Q1nTpnWNsFfjWWpx49xXYUHsVbqTnHL6JWnSKoFM3_I,1029
|
|
509
|
-
hatchet_sdk-1.2.
|
|
510
|
-
hatchet_sdk-1.2.
|
|
511
|
-
hatchet_sdk-1.2.
|
|
512
|
-
hatchet_sdk-1.2.
|
|
509
|
+
hatchet_sdk-1.2.3.dist-info/METADATA,sha256=ix70mJ0CDQ0s-8MQRt_1KaVyCozNUXqFzd5iDspc7GE,3571
|
|
510
|
+
hatchet_sdk-1.2.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
511
|
+
hatchet_sdk-1.2.3.dist-info/entry_points.txt,sha256=5mTp_AsCWK5raiVxP_MU9eBCgkRGl4OsN6chpHcvm7o,1235
|
|
512
|
+
hatchet_sdk-1.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|