hatchet-sdk 0.42.2__py3-none-any.whl → 0.42.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.

@@ -60,10 +60,10 @@ from hatchet_sdk.clients.rest.models.api_token import APIToken
60
60
  from hatchet_sdk.clients.rest.models.bulk_create_event_request import (
61
61
  BulkCreateEventRequest,
62
62
  )
63
- from hatchet_sdk.clients.rest.models.bulk_create_event_response import (
64
- BulkCreateEventResponse,
65
- )
66
63
  from hatchet_sdk.clients.rest.models.cancel_event_request import CancelEventRequest
64
+ from hatchet_sdk.clients.rest.models.concurrency_limit_strategy import (
65
+ ConcurrencyLimitStrategy,
66
+ )
67
67
  from hatchet_sdk.clients.rest.models.create_api_token_request import (
68
68
  CreateAPITokenRequest,
69
69
  )
@@ -89,6 +89,7 @@ from hatchet_sdk.clients.rest.models.create_tenant_invite_request import (
89
89
  from hatchet_sdk.clients.rest.models.create_tenant_request import CreateTenantRequest
90
90
  from hatchet_sdk.clients.rest.models.cron_workflows import CronWorkflows
91
91
  from hatchet_sdk.clients.rest.models.cron_workflows_list import CronWorkflowsList
92
+ from hatchet_sdk.clients.rest.models.cron_workflows_method import CronWorkflowsMethod
92
93
  from hatchet_sdk.clients.rest.models.cron_workflows_order_by_field import (
93
94
  CronWorkflowsOrderByField,
94
95
  )
@@ -106,6 +107,7 @@ from hatchet_sdk.clients.rest.models.event_update_cancel200_response import (
106
107
  from hatchet_sdk.clients.rest.models.event_workflow_run_summary import (
107
108
  EventWorkflowRunSummary,
108
109
  )
110
+ from hatchet_sdk.clients.rest.models.events import Events
109
111
  from hatchet_sdk.clients.rest.models.get_step_run_diff_response import (
110
112
  GetStepRunDiffResponse,
111
113
  )
@@ -157,6 +159,9 @@ from hatchet_sdk.clients.rest.models.scheduled_workflows import ScheduledWorkflo
157
159
  from hatchet_sdk.clients.rest.models.scheduled_workflows_list import (
158
160
  ScheduledWorkflowsList,
159
161
  )
162
+ from hatchet_sdk.clients.rest.models.scheduled_workflows_method import (
163
+ ScheduledWorkflowsMethod,
164
+ )
160
165
  from hatchet_sdk.clients.rest.models.scheduled_workflows_order_by_field import (
161
166
  ScheduledWorkflowsOrderByField,
162
167
  )
@@ -240,6 +245,7 @@ from hatchet_sdk.clients.rest.models.worker_label import WorkerLabel
240
245
  from hatchet_sdk.clients.rest.models.worker_list import WorkerList
241
246
  from hatchet_sdk.clients.rest.models.worker_runtime_info import WorkerRuntimeInfo
242
247
  from hatchet_sdk.clients.rest.models.worker_runtime_sdks import WorkerRuntimeSDKs
248
+ from hatchet_sdk.clients.rest.models.worker_type import WorkerType
243
249
  from hatchet_sdk.clients.rest.models.workflow import Workflow
244
250
  from hatchet_sdk.clients.rest.models.workflow_concurrency import WorkflowConcurrency
245
251
  from hatchet_sdk.clients.rest.models.workflow_kind import WorkflowKind
@@ -22,9 +22,6 @@ from hatchet_sdk.clients.rest.api_response import ApiResponse
22
22
  from hatchet_sdk.clients.rest.models.bulk_create_event_request import (
23
23
  BulkCreateEventRequest,
24
24
  )
25
- from hatchet_sdk.clients.rest.models.bulk_create_event_response import (
26
- BulkCreateEventResponse,
27
- )
28
25
  from hatchet_sdk.clients.rest.models.cancel_event_request import CancelEventRequest
29
26
  from hatchet_sdk.clients.rest.models.create_event_request import CreateEventRequest
30
27
  from hatchet_sdk.clients.rest.models.event import Event
@@ -38,6 +35,7 @@ from hatchet_sdk.clients.rest.models.event_order_by_field import EventOrderByFie
38
35
  from hatchet_sdk.clients.rest.models.event_update_cancel200_response import (
39
36
  EventUpdateCancel200Response,
40
37
  )
38
+ from hatchet_sdk.clients.rest.models.events import Events
41
39
  from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest
42
40
  from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus
43
41
  from hatchet_sdk.clients.rest.rest import RESTResponseType
@@ -375,7 +373,7 @@ class EventApi:
375
373
  _content_type: Optional[StrictStr] = None,
376
374
  _headers: Optional[Dict[StrictStr, Any]] = None,
377
375
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
- ) -> BulkCreateEventResponse:
376
+ ) -> Events:
379
377
  """Bulk Create events
380
378
 
381
379
  Bulk creates new events.
@@ -416,7 +414,7 @@ class EventApi:
416
414
  )
417
415
 
418
416
  _response_types_map: Dict[str, Optional[str]] = {
419
- "200": "BulkCreateEventResponse",
417
+ "200": "Events",
420
418
  "400": "APIErrors",
421
419
  "403": "APIErrors",
422
420
  "429": "APIErrors",
@@ -453,7 +451,7 @@ class EventApi:
453
451
  _content_type: Optional[StrictStr] = None,
454
452
  _headers: Optional[Dict[StrictStr, Any]] = None,
455
453
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
456
- ) -> ApiResponse[BulkCreateEventResponse]:
454
+ ) -> ApiResponse[Events]:
457
455
  """Bulk Create events
458
456
 
459
457
  Bulk creates new events.
@@ -494,7 +492,7 @@ class EventApi:
494
492
  )
495
493
 
496
494
  _response_types_map: Dict[str, Optional[str]] = {
497
- "200": "BulkCreateEventResponse",
495
+ "200": "Events",
498
496
  "400": "APIErrors",
499
497
  "403": "APIErrors",
500
498
  "429": "APIErrors",
@@ -572,7 +570,7 @@ class EventApi:
572
570
  )
573
571
 
574
572
  _response_types_map: Dict[str, Optional[str]] = {
575
- "200": "BulkCreateEventResponse",
573
+ "200": "Events",
576
574
  "400": "APIErrors",
577
575
  "403": "APIErrors",
578
576
  "429": "APIErrors",
@@ -2540,6 +2540,15 @@ class WorkflowApi:
2540
2540
  min_length=36, strict=True, max_length=36, description="The tenant id"
2541
2541
  ),
2542
2542
  ],
2543
+ offset: Annotated[
2544
+ Optional[StrictInt], Field(description="The number to skip")
2545
+ ] = None,
2546
+ limit: Annotated[
2547
+ Optional[StrictInt], Field(description="The number to limit by")
2548
+ ] = None,
2549
+ name: Annotated[
2550
+ Optional[StrictStr], Field(description="Search by name")
2551
+ ] = None,
2543
2552
  _request_timeout: Union[
2544
2553
  None,
2545
2554
  Annotated[StrictFloat, Field(gt=0)],
@@ -2558,6 +2567,12 @@ class WorkflowApi:
2558
2567
 
2559
2568
  :param tenant: The tenant id (required)
2560
2569
  :type tenant: str
2570
+ :param offset: The number to skip
2571
+ :type offset: int
2572
+ :param limit: The number to limit by
2573
+ :type limit: int
2574
+ :param name: Search by name
2575
+ :type name: str
2561
2576
  :param _request_timeout: timeout setting for this request. If one
2562
2577
  number provided, it will be total request
2563
2578
  timeout. It can also be a pair (tuple) of
@@ -2582,6 +2597,9 @@ class WorkflowApi:
2582
2597
 
2583
2598
  _param = self._workflow_list_serialize(
2584
2599
  tenant=tenant,
2600
+ offset=offset,
2601
+ limit=limit,
2602
+ name=name,
2585
2603
  _request_auth=_request_auth,
2586
2604
  _content_type=_content_type,
2587
2605
  _headers=_headers,
@@ -2611,6 +2629,15 @@ class WorkflowApi:
2611
2629
  min_length=36, strict=True, max_length=36, description="The tenant id"
2612
2630
  ),
2613
2631
  ],
2632
+ offset: Annotated[
2633
+ Optional[StrictInt], Field(description="The number to skip")
2634
+ ] = None,
2635
+ limit: Annotated[
2636
+ Optional[StrictInt], Field(description="The number to limit by")
2637
+ ] = None,
2638
+ name: Annotated[
2639
+ Optional[StrictStr], Field(description="Search by name")
2640
+ ] = None,
2614
2641
  _request_timeout: Union[
2615
2642
  None,
2616
2643
  Annotated[StrictFloat, Field(gt=0)],
@@ -2629,6 +2656,12 @@ class WorkflowApi:
2629
2656
 
2630
2657
  :param tenant: The tenant id (required)
2631
2658
  :type tenant: str
2659
+ :param offset: The number to skip
2660
+ :type offset: int
2661
+ :param limit: The number to limit by
2662
+ :type limit: int
2663
+ :param name: Search by name
2664
+ :type name: str
2632
2665
  :param _request_timeout: timeout setting for this request. If one
2633
2666
  number provided, it will be total request
2634
2667
  timeout. It can also be a pair (tuple) of
@@ -2653,6 +2686,9 @@ class WorkflowApi:
2653
2686
 
2654
2687
  _param = self._workflow_list_serialize(
2655
2688
  tenant=tenant,
2689
+ offset=offset,
2690
+ limit=limit,
2691
+ name=name,
2656
2692
  _request_auth=_request_auth,
2657
2693
  _content_type=_content_type,
2658
2694
  _headers=_headers,
@@ -2682,6 +2718,15 @@ class WorkflowApi:
2682
2718
  min_length=36, strict=True, max_length=36, description="The tenant id"
2683
2719
  ),
2684
2720
  ],
2721
+ offset: Annotated[
2722
+ Optional[StrictInt], Field(description="The number to skip")
2723
+ ] = None,
2724
+ limit: Annotated[
2725
+ Optional[StrictInt], Field(description="The number to limit by")
2726
+ ] = None,
2727
+ name: Annotated[
2728
+ Optional[StrictStr], Field(description="Search by name")
2729
+ ] = None,
2685
2730
  _request_timeout: Union[
2686
2731
  None,
2687
2732
  Annotated[StrictFloat, Field(gt=0)],
@@ -2700,6 +2745,12 @@ class WorkflowApi:
2700
2745
 
2701
2746
  :param tenant: The tenant id (required)
2702
2747
  :type tenant: str
2748
+ :param offset: The number to skip
2749
+ :type offset: int
2750
+ :param limit: The number to limit by
2751
+ :type limit: int
2752
+ :param name: Search by name
2753
+ :type name: str
2703
2754
  :param _request_timeout: timeout setting for this request. If one
2704
2755
  number provided, it will be total request
2705
2756
  timeout. It can also be a pair (tuple) of
@@ -2724,6 +2775,9 @@ class WorkflowApi:
2724
2775
 
2725
2776
  _param = self._workflow_list_serialize(
2726
2777
  tenant=tenant,
2778
+ offset=offset,
2779
+ limit=limit,
2780
+ name=name,
2727
2781
  _request_auth=_request_auth,
2728
2782
  _content_type=_content_type,
2729
2783
  _headers=_headers,
@@ -2743,6 +2797,9 @@ class WorkflowApi:
2743
2797
  def _workflow_list_serialize(
2744
2798
  self,
2745
2799
  tenant,
2800
+ offset,
2801
+ limit,
2802
+ name,
2746
2803
  _request_auth,
2747
2804
  _content_type,
2748
2805
  _headers,
@@ -2766,6 +2823,18 @@ class WorkflowApi:
2766
2823
  if tenant is not None:
2767
2824
  _path_params["tenant"] = tenant
2768
2825
  # process the query parameters
2826
+ if offset is not None:
2827
+
2828
+ _query_params.append(("offset", offset))
2829
+
2830
+ if limit is not None:
2831
+
2832
+ _query_params.append(("limit", limit))
2833
+
2834
+ if name is not None:
2835
+
2836
+ _query_params.append(("name", name))
2837
+
2769
2838
  # process the header parameters
2770
2839
  # process the form parameters
2771
2840
  # process the body parameter
@@ -27,10 +27,10 @@ from hatchet_sdk.clients.rest.models.api_token import APIToken
27
27
  from hatchet_sdk.clients.rest.models.bulk_create_event_request import (
28
28
  BulkCreateEventRequest,
29
29
  )
30
- from hatchet_sdk.clients.rest.models.bulk_create_event_response import (
31
- BulkCreateEventResponse,
32
- )
33
30
  from hatchet_sdk.clients.rest.models.cancel_event_request import CancelEventRequest
31
+ from hatchet_sdk.clients.rest.models.concurrency_limit_strategy import (
32
+ ConcurrencyLimitStrategy,
33
+ )
34
34
  from hatchet_sdk.clients.rest.models.create_api_token_request import (
35
35
  CreateAPITokenRequest,
36
36
  )
@@ -56,6 +56,7 @@ from hatchet_sdk.clients.rest.models.create_tenant_invite_request import (
56
56
  from hatchet_sdk.clients.rest.models.create_tenant_request import CreateTenantRequest
57
57
  from hatchet_sdk.clients.rest.models.cron_workflows import CronWorkflows
58
58
  from hatchet_sdk.clients.rest.models.cron_workflows_list import CronWorkflowsList
59
+ from hatchet_sdk.clients.rest.models.cron_workflows_method import CronWorkflowsMethod
59
60
  from hatchet_sdk.clients.rest.models.cron_workflows_order_by_field import (
60
61
  CronWorkflowsOrderByField,
61
62
  )
@@ -73,6 +74,7 @@ from hatchet_sdk.clients.rest.models.event_update_cancel200_response import (
73
74
  from hatchet_sdk.clients.rest.models.event_workflow_run_summary import (
74
75
  EventWorkflowRunSummary,
75
76
  )
77
+ from hatchet_sdk.clients.rest.models.events import Events
76
78
  from hatchet_sdk.clients.rest.models.get_step_run_diff_response import (
77
79
  GetStepRunDiffResponse,
78
80
  )
@@ -124,6 +126,9 @@ from hatchet_sdk.clients.rest.models.scheduled_workflows import ScheduledWorkflo
124
126
  from hatchet_sdk.clients.rest.models.scheduled_workflows_list import (
125
127
  ScheduledWorkflowsList,
126
128
  )
129
+ from hatchet_sdk.clients.rest.models.scheduled_workflows_method import (
130
+ ScheduledWorkflowsMethod,
131
+ )
127
132
  from hatchet_sdk.clients.rest.models.scheduled_workflows_order_by_field import (
128
133
  ScheduledWorkflowsOrderByField,
129
134
  )
@@ -207,6 +212,7 @@ from hatchet_sdk.clients.rest.models.worker_label import WorkerLabel
207
212
  from hatchet_sdk.clients.rest.models.worker_list import WorkerList
208
213
  from hatchet_sdk.clients.rest.models.worker_runtime_info import WorkerRuntimeInfo
209
214
  from hatchet_sdk.clients.rest.models.worker_runtime_sdks import WorkerRuntimeSDKs
215
+ from hatchet_sdk.clients.rest.models.worker_type import WorkerType
210
216
  from hatchet_sdk.clients.rest.models.workflow import Workflow
211
217
  from hatchet_sdk.clients.rest.models.workflow_concurrency import WorkflowConcurrency
212
218
  from hatchet_sdk.clients.rest.models.workflow_kind import WorkflowKind
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hatchet API
5
+
6
+ The Hatchet API
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class ConcurrencyLimitStrategy(str, Enum):
24
+ """
25
+ ConcurrencyLimitStrategy
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ CANCEL_IN_PROGRESS = "CANCEL_IN_PROGRESS"
32
+ DROP_NEWEST = "DROP_NEWEST"
33
+ QUEUE_NEWEST = "QUEUE_NEWEST"
34
+ GROUP_ROUND_ROBIN = "GROUP_ROUND_ROBIN"
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of ConcurrencyLimitStrategy from a JSON string"""
39
+ return cls(json.loads(json_str))
@@ -19,17 +19,11 @@ import pprint
19
19
  import re # noqa: F401
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
- from pydantic import (
23
- BaseModel,
24
- ConfigDict,
25
- Field,
26
- StrictBool,
27
- StrictStr,
28
- field_validator,
29
- )
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
30
23
  from typing_extensions import Self
31
24
 
32
25
  from hatchet_sdk.clients.rest.models.api_resource_meta import APIResourceMeta
26
+ from hatchet_sdk.clients.rest.models.cron_workflows_method import CronWorkflowsMethod
33
27
 
34
28
 
35
29
  class CronWorkflows(BaseModel):
@@ -49,7 +43,7 @@ class CronWorkflows(BaseModel):
49
43
  default=None, alias="additionalMetadata"
50
44
  )
51
45
  enabled: StrictBool
52
- method: StrictStr
46
+ method: CronWorkflowsMethod
53
47
  __properties: ClassVar[List[str]] = [
54
48
  "metadata",
55
49
  "tenantId",
@@ -64,13 +58,6 @@ class CronWorkflows(BaseModel):
64
58
  "method",
65
59
  ]
66
60
 
67
- @field_validator("method")
68
- def method_validate_enum(cls, value):
69
- """Validates the enum"""
70
- if value not in set(["DEFAULT", "API"]):
71
- raise ValueError("must be one of enum values ('DEFAULT', 'API')")
72
- return value
73
-
74
61
  model_config = ConfigDict(
75
62
  populate_by_name=True,
76
63
  validate_assignment=True,
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hatchet API
5
+
6
+ The Hatchet API
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class CronWorkflowsMethod(str, Enum):
24
+ """
25
+ CronWorkflowsMethod
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ DEFAULT = "DEFAULT"
32
+ API = "API"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of CronWorkflowsMethod from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -0,0 +1,110 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hatchet API
5
+
6
+ The Hatchet API
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ import pprint
19
+ import re # noqa: F401
20
+ from typing import Any, ClassVar, Dict, List, Optional, Set
21
+
22
+ from pydantic import BaseModel, ConfigDict, Field
23
+ from typing_extensions import Self
24
+
25
+ from hatchet_sdk.clients.rest.models.api_resource_meta import APIResourceMeta
26
+ from hatchet_sdk.clients.rest.models.event import Event
27
+
28
+
29
+ class Events(BaseModel):
30
+ """
31
+ Events
32
+ """ # noqa: E501
33
+
34
+ metadata: APIResourceMeta
35
+ events: List[Event] = Field(description="The events.")
36
+ __properties: ClassVar[List[str]] = ["metadata", "events"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of Events from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of metadata
76
+ if self.metadata:
77
+ _dict["metadata"] = self.metadata.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of each item in events (list)
79
+ _items = []
80
+ if self.events:
81
+ for _item_events in self.events:
82
+ if _item_events:
83
+ _items.append(_item_events.to_dict())
84
+ _dict["events"] = _items
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of Events from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate(
97
+ {
98
+ "metadata": (
99
+ APIResourceMeta.from_dict(obj["metadata"])
100
+ if obj.get("metadata") is not None
101
+ else None
102
+ ),
103
+ "events": (
104
+ [Event.from_dict(_item) for _item in obj["events"]]
105
+ if obj.get("events") is not None
106
+ else None
107
+ ),
108
+ }
109
+ )
110
+ return _obj
@@ -20,10 +20,13 @@ import re # noqa: F401
20
20
  from datetime import datetime
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Set
22
22
 
23
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
23
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
24
24
  from typing_extensions import Annotated, Self
25
25
 
26
26
  from hatchet_sdk.clients.rest.models.api_resource_meta import APIResourceMeta
27
+ from hatchet_sdk.clients.rest.models.scheduled_workflows_method import (
28
+ ScheduledWorkflowsMethod,
29
+ )
27
30
  from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus
28
31
 
29
32
 
@@ -54,7 +57,7 @@ class ScheduledWorkflows(BaseModel):
54
57
  workflow_run_id: Optional[
55
58
  Annotated[str, Field(min_length=36, strict=True, max_length=36)]
56
59
  ] = Field(default=None, alias="workflowRunId")
57
- method: StrictStr
60
+ method: ScheduledWorkflowsMethod
58
61
  __properties: ClassVar[List[str]] = [
59
62
  "metadata",
60
63
  "tenantId",
@@ -71,13 +74,6 @@ class ScheduledWorkflows(BaseModel):
71
74
  "method",
72
75
  ]
73
76
 
74
- @field_validator("method")
75
- def method_validate_enum(cls, value):
76
- """Validates the enum"""
77
- if value not in set(["DEFAULT", "API"]):
78
- raise ValueError("must be one of enum values ('DEFAULT', 'API')")
79
- return value
80
-
81
77
  model_config = ConfigDict(
82
78
  populate_by_name=True,
83
79
  validate_assignment=True,
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hatchet API
5
+
6
+ The Hatchet API
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class ScheduledWorkflowsMethod(str, Enum):
24
+ """
25
+ ScheduledWorkflowsMethod
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ DEFAULT = "DEFAULT"
32
+ API = "API"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ScheduledWorkflowsMethod from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -28,6 +28,7 @@ from hatchet_sdk.clients.rest.models.recent_step_runs import RecentStepRuns
28
28
  from hatchet_sdk.clients.rest.models.semaphore_slots import SemaphoreSlots
29
29
  from hatchet_sdk.clients.rest.models.worker_label import WorkerLabel
30
30
  from hatchet_sdk.clients.rest.models.worker_runtime_info import WorkerRuntimeInfo
31
+ from hatchet_sdk.clients.rest.models.worker_type import WorkerType
31
32
 
32
33
 
33
34
  class Worker(BaseModel):
@@ -37,7 +38,7 @@ class Worker(BaseModel):
37
38
 
38
39
  metadata: APIResourceMeta
39
40
  name: StrictStr = Field(description="The name of the worker.")
40
- type: StrictStr
41
+ type: WorkerType
41
42
  last_heartbeat_at: Optional[datetime] = Field(
42
43
  default=None,
43
44
  description="The time this worker last sent a heartbeat.",
@@ -108,15 +109,6 @@ class Worker(BaseModel):
108
109
  "runtimeInfo",
109
110
  ]
110
111
 
111
- @field_validator("type")
112
- def type_validate_enum(cls, value):
113
- """Validates the enum"""
114
- if value not in set(["SELFHOSTED", "MANAGED", "WEBHOOK"]):
115
- raise ValueError(
116
- "must be one of enum values ('SELFHOSTED', 'MANAGED', 'WEBHOOK')"
117
- )
118
- return value
119
-
120
112
  @field_validator("status")
121
113
  def status_validate_enum(cls, value):
122
114
  """Validates the enum"""
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hatchet API
5
+
6
+ The Hatchet API
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+
17
+ import json
18
+ from enum import Enum
19
+
20
+ from typing_extensions import Self
21
+
22
+
23
+ class WorkerType(str, Enum):
24
+ """
25
+ WorkerType
26
+ """
27
+
28
+ """
29
+ allowed enum values
30
+ """
31
+ SELFHOSTED = "SELFHOSTED"
32
+ MANAGED = "MANAGED"
33
+ WEBHOOK = "WEBHOOK"
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of WorkerType from a JSON string"""
38
+ return cls(json.loads(json_str))
@@ -19,9 +19,13 @@ import pprint
19
19
  import re # noqa: F401
20
20
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
 
22
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
23
23
  from typing_extensions import Self
24
24
 
25
+ from hatchet_sdk.clients.rest.models.concurrency_limit_strategy import (
26
+ ConcurrencyLimitStrategy,
27
+ )
28
+
25
29
 
26
30
  class WorkflowConcurrency(BaseModel):
27
31
  """
@@ -31,7 +35,7 @@ class WorkflowConcurrency(BaseModel):
31
35
  max_runs: StrictInt = Field(
32
36
  description="The maximum number of concurrent workflow runs.", alias="maxRuns"
33
37
  )
34
- limit_strategy: StrictStr = Field(
38
+ limit_strategy: ConcurrencyLimitStrategy = Field(
35
39
  description="The strategy to use when the concurrency limit is reached.",
36
40
  alias="limitStrategy",
37
41
  )
@@ -45,17 +49,6 @@ class WorkflowConcurrency(BaseModel):
45
49
  "getConcurrencyGroup",
46
50
  ]
47
51
 
48
- @field_validator("limit_strategy")
49
- def limit_strategy_validate_enum(cls, value):
50
- """Validates the enum"""
51
- if value not in set(
52
- ["CANCEL_IN_PROGRESS", "DROP_NEWEST", "QUEUE_NEWEST", "GROUP_ROUND_ROBIN"]
53
- ):
54
- raise ValueError(
55
- "must be one of enum values ('CANCEL_IN_PROGRESS', 'DROP_NEWEST', 'QUEUE_NEWEST', 'GROUP_ROUND_ROBIN')"
56
- )
57
- return value
58
-
59
52
  model_config = ConfigDict(
60
53
  populate_by_name=True,
61
54
  validate_assignment=True,
@@ -1,5 +1,3 @@
1
- # type: ignore
2
-
3
1
  from google.protobuf import timestamp_pb2 as _timestamp_pb2
4
2
  from google.protobuf.internal import containers as _containers
5
3
  from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
@@ -1,5 +1,3 @@
1
- # type: ignore
2
-
3
1
  from google.protobuf import timestamp_pb2 as _timestamp_pb2
4
2
  from google.protobuf.internal import containers as _containers
5
3
  from google.protobuf import descriptor as _descriptor
@@ -1,5 +1,3 @@
1
- # type: ignore
2
-
3
1
  from google.protobuf import timestamp_pb2 as _timestamp_pb2
4
2
  from google.protobuf.internal import containers as _containers
5
3
  from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
hatchet_sdk/hatchet.py CHANGED
@@ -88,10 +88,7 @@ def step(
88
88
  def inner(func: WorkflowStepProtocol) -> WorkflowStepProtocol:
89
89
  limits = None
90
90
  if rate_limits:
91
- limits = [
92
- CreateStepRateLimit(key=rate_limit.key, units=rate_limit.units)
93
- for rate_limit in rate_limits or []
94
- ]
91
+ limits = [rate_limit._req for rate_limit in rate_limits or []]
95
92
 
96
93
  func._step_name = name.lower() or str(func.__name__).lower()
97
94
  func._step_parents = parents
@@ -130,7 +127,7 @@ def on_failure_step(
130
127
  limits = None
131
128
  if rate_limits:
132
129
  limits = [
133
- CreateStepRateLimit(key=rate_limit.key, units=rate_limit.units)
130
+ CreateStepRateLimit(key=rate_limit.static_key, units=rate_limit.units)
134
131
  for rate_limit in rate_limits or []
135
132
  ]
136
133
 
hatchet_sdk/rate_limit.py CHANGED
@@ -1,13 +1,126 @@
1
1
  from dataclasses import dataclass
2
+ from typing import Union
2
3
 
4
+ from celpy import CELEvalError, Environment
3
5
 
4
- @dataclass
5
- class RateLimit:
6
- key: str
7
- units: int
6
+ from hatchet_sdk.contracts.workflows_pb2 import CreateStepRateLimit
7
+
8
+
9
+ def validate_cel_expression(expr: str) -> bool:
10
+ env = Environment()
11
+ try:
12
+ env.compile(expr)
13
+ return True
14
+ except CELEvalError:
15
+ return False
8
16
 
9
17
 
10
18
  class RateLimitDuration:
11
19
  SECOND = "SECOND"
12
20
  MINUTE = "MINUTE"
13
21
  HOUR = "HOUR"
22
+ DAY = "DAY"
23
+ WEEK = "WEEK"
24
+ MONTH = "MONTH"
25
+ YEAR = "YEAR"
26
+
27
+
28
+ @dataclass
29
+ class RateLimit:
30
+ """
31
+ Represents a rate limit configuration for a step in a workflow.
32
+
33
+ This class allows for both static and dynamic rate limiting based on various parameters.
34
+ It supports both simple integer values and Common Expression Language (CEL) expressions
35
+ for dynamic evaluation.
36
+
37
+ Attributes:
38
+ static_key (str, optional): A static key for rate limiting.
39
+ dynamic_key (str, optional): A CEL expression for dynamic key evaluation.
40
+ units (int or str, default=1): The number of units or a CEL expression for dynamic unit calculation.
41
+ limit (int or str, optional): The rate limit value or a CEL expression for dynamic limit calculation.
42
+ duration (str, default=RateLimitDuration.MINUTE): The window duration of the rate limit.
43
+ key (str, optional): Deprecated. Use static_key instead.
44
+
45
+ Usage:
46
+ 1. Static rate limit:
47
+ rate_limit = RateLimit(static_key="external-api", units=100)
48
+ > NOTE: if you want to use a static key, you must first put the rate limit: hatchet.admin.put_rate_limit("external-api", 200, RateLimitDuration.SECOND)
49
+
50
+ 2. Dynamic rate limit with CEL expressions:
51
+ rate_limit = RateLimit(
52
+ dynamic_key="input.user_id",
53
+ units="input.units",
54
+ limit="input.limit * input.user_tier"
55
+ )
56
+
57
+ Note:
58
+ - Either static_key or dynamic_key must be set, but not both.
59
+ - When using dynamic_key, limit must also be set.
60
+ - CEL expressions are validated upon instantiation.
61
+
62
+ Raises:
63
+ ValueError: If invalid combinations of attributes are provided or if CEL expressions are invalid.
64
+ DeprecationWarning: If the deprecated 'key' attribute is used.
65
+ """
66
+
67
+ key: Union[str, None] = None
68
+ static_key: Union[str, None] = None
69
+ dynamic_key: Union[str, None] = None
70
+ units: Union[int, str] = 1
71
+ limit: Union[int, str, None] = None
72
+ duration: RateLimitDuration = RateLimitDuration.MINUTE
73
+
74
+ _req: CreateStepRateLimit = None
75
+
76
+ def __post_init__(self):
77
+ # juggle the key and key_expr fields
78
+ key = self.static_key
79
+ key_expression = self.dynamic_key
80
+
81
+ if self.key is not None:
82
+ DeprecationWarning(
83
+ "key is deprecated and will be removed in a future release, please use static_key instead"
84
+ )
85
+ key = self.key
86
+
87
+ if key_expression is not None:
88
+ if key is not None:
89
+ raise ValueError("Cannot have both static key and dynamic key set")
90
+
91
+ key = key_expression
92
+ if not validate_cel_expression(key_expression):
93
+ raise ValueError(f"Invalid CEL expression: {key_expression}")
94
+
95
+ # juggle the units and units_expr fields
96
+ units = None
97
+ units_expression = None
98
+ if isinstance(self.units, int):
99
+ units = self.units
100
+ else:
101
+ if not validate_cel_expression(self.units):
102
+ raise ValueError(f"Invalid CEL expression: {self.units}")
103
+ units_expression = self.units
104
+
105
+ # juggle the limit and limit_expr fields
106
+ limit_expression = None
107
+
108
+ if self.limit:
109
+ if isinstance(self.limit, int):
110
+ limit_expression = f"{self.limit}"
111
+ else:
112
+ if not validate_cel_expression(self.limit):
113
+ raise ValueError(f"Invalid CEL expression: {self.limit}")
114
+ limit_expression = self.limit
115
+
116
+ if key_expression is not None and limit_expression is None:
117
+ raise ValueError("CEL based keys requires limit to be set")
118
+
119
+ self._req = CreateStepRateLimit(
120
+ key=key,
121
+ key_expr=key_expression,
122
+ units=units,
123
+ units_expr=units_expression,
124
+ limit_values_expr=limit_expression,
125
+ duration=self.duration,
126
+ )
@@ -48,10 +48,7 @@ class HatchetCallable(Generic[T]):
48
48
 
49
49
  limits = None
50
50
  if rate_limits:
51
- limits = [
52
- CreateStepRateLimit(key=rate_limit.key, units=rate_limit.units)
53
- for rate_limit in rate_limits or []
54
- ]
51
+ limits = [rate_limit._req for rate_limit in rate_limits or []]
55
52
 
56
53
  self.function_desired_worker_labels = {}
57
54
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 0.42.2
3
+ Version: 0.42.3
4
4
  Summary:
5
5
  Author: Alexander Belanger
6
6
  Author-email: alexander@hatchet.run
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.12
12
12
  Requires-Dist: aiohttp (>=3.10.5,<4.0.0)
13
13
  Requires-Dist: aiohttp-retry (>=2.8.3,<3.0.0)
14
14
  Requires-Dist: aiostream (>=0.5.2,<0.6.0)
15
+ Requires-Dist: cel-python (>=0.1.5,<0.2.0)
15
16
  Requires-Dist: grpcio (>=1.64.1,<2.0.0)
16
17
  Requires-Dist: grpcio-tools (>=1.60.0,<2.0.0)
17
18
  Requires-Dist: loguru (>=0.7.2,<0.8.0)
@@ -5,11 +5,11 @@ hatchet_sdk/clients/dispatcher/action_listener.py,sha256=eOq5z29MhC7ynbOOegDRQr-
5
5
  hatchet_sdk/clients/dispatcher/dispatcher.py,sha256=IA_KFqjuxKmGVLuOQNV0SG_dFpX6PeOR8M6Kpl0fU20,6092
6
6
  hatchet_sdk/clients/event_ts.py,sha256=ACGvDdfhvK6ZLKdsPxy-PksLhjIU69P9cdH3AxX-X10,728
7
7
  hatchet_sdk/clients/events.py,sha256=vPK2UlI1bmrx24mAqGYJQ884yHviVmrGX5qNIBc5-a8,7466
8
- hatchet_sdk/clients/rest/__init__.py,sha256=IR4dbdTrEse-Eb7wRRwjdKnzKnTU-_HZaKYZzAcLtEI,13840
8
+ hatchet_sdk/clients/rest/__init__.py,sha256=AQBp3fX79IKrcjUmzLRGFaFKMYBnEbQD9DnwYOHU0jQ,14157
9
9
  hatchet_sdk/clients/rest/api/__init__.py,sha256=LaTEK7cYklb8R0iYj727C-jVk-MGHenADN8TJpoIASs,1067
10
10
  hatchet_sdk/clients/rest/api/api_token_api.py,sha256=C10FEIHHGBpwq-bIKkrBhvPlg6az4aHlREWEUlJHWl0,33577
11
11
  hatchet_sdk/clients/rest/api/default_api.py,sha256=8DqzQAHtB53KG9pXfPtzjx6w7MOXznJIq60x0IcEawo,69260
12
- hatchet_sdk/clients/rest/api/event_api.py,sha256=zKQjMJRe3G3F9UcJ_P1CixMazM-xYpSkNWMp-fMQODA,100285
12
+ hatchet_sdk/clients/rest/api/event_api.py,sha256=YbvcNJTDY9aa69SdWsiXS4gbQ0x51LiAxUQmsPzwVXs,100154
13
13
  hatchet_sdk/clients/rest/api/github_api.py,sha256=1eKhvrqPPekfiu7WLh-ngcpOYMJwpRSwliEKoJ85Kjs,12107
14
14
  hatchet_sdk/clients/rest/api/healthcheck_api.py,sha256=WGsezrIxWK_geHLIERjUwlCtXE65SSmt_XTe7oc25VE,18779
15
15
  hatchet_sdk/clients/rest/api/log_api.py,sha256=KdNOFFQFlmjB_tSVBpq_YpUREFfOeuWqH27zzkd5184,16917
@@ -21,14 +21,14 @@ hatchet_sdk/clients/rest/api/step_run_api.py,sha256=HkEqiZHMroap-ELdtJngA3XfeVYp
21
21
  hatchet_sdk/clients/rest/api/tenant_api.py,sha256=A8398EINJtevoSkCYcIaxp6zH_eVuScgsOknWIWU_Hg,178261
22
22
  hatchet_sdk/clients/rest/api/user_api.py,sha256=4UiOXLiI0lqDNv-MhtnYumC8_R361p10a68QmmBmS2s,116356
23
23
  hatchet_sdk/clients/rest/api/worker_api.py,sha256=nKQtd__fKfIuuG9zo6Xe4-LmJBHKspImgZ-vRes4R18,33193
24
- hatchet_sdk/clients/rest/api/workflow_api.py,sha256=hjshSSQtucuoqRNDAY19uRU2Py5hjDaNHEJWeLLztzk,248512
24
+ hatchet_sdk/clients/rest/api/workflow_api.py,sha256=X2D80I1Wkuq8m9BVnv8klxT8h4YbnkDePPjaYhXbIi0,250678
25
25
  hatchet_sdk/clients/rest/api/workflow_run_api.py,sha256=6gU7ZflOTVcCpW4AjEaEU5mUxZaRGrbM-aMq8nAxzcE,78408
26
26
  hatchet_sdk/clients/rest/api/workflow_runs_api.py,sha256=KXqVIZfUGdOK4sKSGlRmEqOnuqTMQClC5HjDiRo0LUM,24023
27
27
  hatchet_sdk/clients/rest/api_client.py,sha256=8iS2NH_gkuPJ85jGwS80SldlzO3xjzeB63XWrDzaQVQ,26913
28
28
  hatchet_sdk/clients/rest/api_response.py,sha256=rSuCVGY-HE8X_WwteQP5wyANIuS-L5AmtZEUOwTicak,641
29
29
  hatchet_sdk/clients/rest/configuration.py,sha256=9pAN6pgWxT6uWO9xajFOw1mKYIBG2g7ymzLXP5Zrovg,18702
30
30
  hatchet_sdk/clients/rest/exceptions.py,sha256=Je4cniD4ytm6i29BUM7Wmqwf0a0dE5xEngTYV-8nDtk,5834
31
- hatchet_sdk/clients/rest/models/__init__.py,sha256=KL5hiokLXZV8lmAgYahUpfETlQ2qBCpiIbHodz5pWYw,12393
31
+ hatchet_sdk/clients/rest/models/__init__.py,sha256=mJC7vskumHTdaYaVbtOQz2I3S53KU2rer-8IiNiGPtc,12710
32
32
  hatchet_sdk/clients/rest/models/accept_invite_request.py,sha256=_otOis3SuTHl0F_hhYD-rYqgyxCXRn83CK_eU9oMdn4,2427
33
33
  hatchet_sdk/clients/rest/models/api_error.py,sha256=KodK1_cc28CgYGvX1WhIhTN0pAAkgq8PJXReIrMnqBA,3068
34
34
  hatchet_sdk/clients/rest/models/api_errors.py,sha256=RNmnWn1GWlG9xTvpvrTmKq-Pr70x9mcJ4-dNFBemxa8,2917
@@ -42,6 +42,7 @@ hatchet_sdk/clients/rest/models/bulk_create_event_request.py,sha256=w2CpXPxQUltV
42
42
  hatchet_sdk/clients/rest/models/bulk_create_event_response.py,sha256=1C5ugPGc3lwIxW2JmF8c6VH3hwh8ERgbaZTm2a_2MO0,3489
43
43
  hatchet_sdk/clients/rest/models/cancel_event_request.py,sha256=MIFMJRb-dJZu0TlJCHaHOruwyVlQLB9l47TB3UioIHM,2478
44
44
  hatchet_sdk/clients/rest/models/cancel_step_run_request.py,sha256=m5dJHmn4umZ4LcKNtlHTCrRD5W2qle561WLzlBYBQLs,2346
45
+ hatchet_sdk/clients/rest/models/concurrency_limit_strategy.py,sha256=umtjz7m6P7_27oQDqZAQttmra5hfQ6lUrs7OtIqWoJE,810
45
46
  hatchet_sdk/clients/rest/models/create_api_token_request.py,sha256=6VKaIG0rBLwkDCz6fS9_ORaCmTGGmYZx0hUPt8m5_Kg,2723
46
47
  hatchet_sdk/clients/rest/models/create_api_token_response.py,sha256=vaHHrPYOV0Fs_6dXvE3cIPc-LJFumJDSnhEvJQmfU2s,2418
47
48
  hatchet_sdk/clients/rest/models/create_cron_workflow_trigger_request.py,sha256=dTguNF_d7GcAJyEg4HQgXa0Yrpn22vRSomsmiI0GLK8,2938
@@ -51,8 +52,9 @@ hatchet_sdk/clients/rest/models/create_sns_integration_request.py,sha256=8xi59Xu
51
52
  hatchet_sdk/clients/rest/models/create_tenant_alert_email_group_request.py,sha256=MgMDiPtElEiiZU6boYVkOl9nSkvP9bnFjUIzByEn7WM,2488
52
53
  hatchet_sdk/clients/rest/models/create_tenant_invite_request.py,sha256=fVCrUaEcnKW8ekH4mPZpch1056i4tJVYHRyU9aDVuVE,2648
53
54
  hatchet_sdk/clients/rest/models/create_tenant_request.py,sha256=zgYoNY6GSRbnx-EqBN903ry_XNyhdj87b7YMrAbkIFk,2511
54
- hatchet_sdk/clients/rest/models/cron_workflows.py,sha256=4O6_n-6CSq230EYfcJiZ__hvoAeMh2f7I1fwudfGELc,4357
55
+ hatchet_sdk/clients/rest/models/cron_workflows.py,sha256=gO1EEuGyLpQls39g0Q9PcopCH1IY2Q5vSV1ovfXYdHg,4152
55
56
  hatchet_sdk/clients/rest/models/cron_workflows_list.py,sha256=bLMycEajkleH0-8gGuqDAvZDparvQ4LRKa2sX3bxsG0,3495
57
+ hatchet_sdk/clients/rest/models/cron_workflows_method.py,sha256=zq05HHTwhf-D2kmhbf40ihYCDBihAeEMQEbr7DrtaoM,679
56
58
  hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py,sha256=QUl9ZGi6htuqxEyZBizqDbaJz_rKRjqLL6-M4CsKTeg,703
57
59
  hatchet_sdk/clients/rest/models/event.py,sha256=t76o7lfqIiiEV8b72Sz_HfyDwqbMIFLr0Fyaj1TdRlk,4710
58
60
  hatchet_sdk/clients/rest/models/event_data.py,sha256=auSvu6JHAudZ6BUSGzLejNvXw0NxIal7cAwQ8JO1vwc,2384
@@ -62,6 +64,7 @@ hatchet_sdk/clients/rest/models/event_order_by_direction.py,sha256=xOgm7eXyYFMaK
62
64
  hatchet_sdk/clients/rest/models/event_order_by_field.py,sha256=37DnYoHnYfsvE5G4LPEyFtF8rB9N84jjH-nwKOSbCGw,661
63
65
  hatchet_sdk/clients/rest/models/event_update_cancel200_response.py,sha256=0CQBlp8cCI5kjFtkAWABGAmPxf2R3beMI7ka8LMx9Ps,2573
64
66
  hatchet_sdk/clients/rest/models/event_workflow_run_summary.py,sha256=gvCkvdyS-6WulNYtqlWCi-WmDVbJtAX9_vHAWEtcaps,3261
67
+ hatchet_sdk/clients/rest/models/events.py,sha256=tDjj895bxzri9nC2vtrf2mXKik4C3X0mMxFCKLea_hM,3421
65
68
  hatchet_sdk/clients/rest/models/get_step_run_diff_response.py,sha256=pPBtDdsDgjI2FmWTrqiJiadQ5Z8JMQs5FgMxdL2Mgzo,2970
66
69
  hatchet_sdk/clients/rest/models/github_app_installation.py,sha256=ayF5nvbKq0c-32MFiUrbEwalwp282TBodqTCJDE-0BM,3254
67
70
  hatchet_sdk/clients/rest/models/github_branch.py,sha256=sAnSlx27-ffukkNnKNlv_2xznkLxSW5tXM5I27vrwcE,2469
@@ -96,8 +99,9 @@ hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py,sha256=4LLv0CN6
96
99
  hatchet_sdk/clients/rest/models/rerun_step_run_request.py,sha256=-cMsZ1LWb4O4Y94uLK2HZk4OlMjrpPol2MYjHQ5mmdY,2355
97
100
  hatchet_sdk/clients/rest/models/schedule_workflow_run_request.py,sha256=Ke7plGBfr3JCI7iYcW6zTInDKLVMP3k9rHvA2wDIGaA,2756
98
101
  hatchet_sdk/clients/rest/models/scheduled_run_status.py,sha256=tB8Hxh3Q5Bn7UlBafQlQPdLAh5Nx7rH5yeH1J-glaNA,812
99
- hatchet_sdk/clients/rest/models/scheduled_workflows.py,sha256=ZUa1yEqDGC6gNVp13g9W8z4_L4uHCZjSM_J5u6vfHfs,5186
102
+ hatchet_sdk/clients/rest/models/scheduled_workflows.py,sha256=TQCM_BE1ho1YEqBhrKmAwf5-dBA5Nyby3DD2DYCGGbw,5034
100
103
  hatchet_sdk/clients/rest/models/scheduled_workflows_list.py,sha256=Ck_QlVNOQ7cO5pwDEmNPWyrVfcnScu44rgvnIhkYQHk,3535
104
+ hatchet_sdk/clients/rest/models/scheduled_workflows_method.py,sha256=ENMSuyTGZEd3cxaQWqa0aQ1ThgflPAOKkEyiOZtlDfc,694
101
105
  hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py,sha256=vl0OkXbPxU6qDplioxjwi6Ftiph7ynnr2wKMG4VZjs8,728
102
106
  hatchet_sdk/clients/rest/models/semaphore_slots.py,sha256=ozxsikCCxwp63DqUp84rUsKHKL-7VwuKEi0JKqHCwxc,3452
103
107
  hatchet_sdk/clients/rest/models/slack_webhook.py,sha256=Vjy4-Df49xO6rm6SlIWgtsA4QB9RbUgRHLZSOpGOCZE,3889
@@ -146,13 +150,14 @@ hatchet_sdk/clients/rest/models/webhook_worker_list_response.py,sha256=xShiFciv2
146
150
  hatchet_sdk/clients/rest/models/webhook_worker_request.py,sha256=gYaDiF2_YKHkuovO7GN9bV9fust5vNteMy5JSqx7Rg8,3023
147
151
  hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py,sha256=up1LSEDovPz3tSfE87RU0jOvdUxu-_iZ_8hNhkzBhpo,3180
148
152
  hatchet_sdk/clients/rest/models/webhook_worker_request_method.py,sha256=cHjXGrtBTuNzSHdrfY7CqDNF__GFD2DUKeSo9JiC5yk,710
149
- hatchet_sdk/clients/rest/models/worker.py,sha256=iOJNs9d-pl9sqV4TL3z5bHVgfv4Je4K8jN15WFXH89Q,8959
153
+ hatchet_sdk/clients/rest/models/worker.py,sha256=X1ZHtGsfj_SBWynBH7AP9UKwtQ76WvTZxsln4oIxql4,8710
150
154
  hatchet_sdk/clients/rest/models/worker_label.py,sha256=CtnrPm585AzpXz4vOUp4_qS0hG7R69mZiITdP6NZrhY,3071
151
155
  hatchet_sdk/clients/rest/models/worker_list.py,sha256=D9Yk9DzbIU6CJUJxI-ZxEtBqLRRh_do4X6sdKni4L3Q,3438
152
156
  hatchet_sdk/clients/rest/models/worker_runtime_info.py,sha256=f87fjpVCwdnuUsle0ogH8SmF2eNG2_m-UT-aGybDAcI,3131
153
157
  hatchet_sdk/clients/rest/models/worker_runtime_sdks.py,sha256=ZkMr4gg9hfpM9FkDPyI0J2Va_U2v3v9jUhhUVshzB4w,707
158
+ hatchet_sdk/clients/rest/models/worker_type.py,sha256=ha5QWKK83kuvGsX9rqG2WBSGo8rmEjX_lq991JCu-YM,690
154
159
  hatchet_sdk/clients/rest/models/workflow.py,sha256=8eRB3hq4U3aipNhpdLZfnDPoBhU6n3fzc4Cm8T3OA1g,5543
155
- hatchet_sdk/clients/rest/models/workflow_concurrency.py,sha256=sqgZlhHlrd29NcTH2h7GO9ba2BJP3SAAxMWYGe4rMaU,3530
160
+ hatchet_sdk/clients/rest/models/workflow_concurrency.py,sha256=RtyT3zGwQtd8upt3xWwqN9O_Frdcu9jQ0Hq9DWmygQ4,3199
156
161
  hatchet_sdk/clients/rest/models/workflow_deployment_config.py,sha256=_fjNErg4HnlpHWtapDlKqhMpmUkAdWLQ7DLDMbYkSNE,4510
157
162
  hatchet_sdk/clients/rest/models/workflow_kind.py,sha256=JOAMn9bJFWNeR9vKWIbTnrIpCP8d_UXRuqDCjdeqI30,684
158
163
  hatchet_sdk/clients/rest/models/workflow_list.py,sha256=2k_TCmVlj4S1USXShf3lekrQ7IOb-LQTSnZn2Ft7AIk,3957
@@ -188,22 +193,22 @@ hatchet_sdk/context/__init__.py,sha256=Pl_seJ_SJpW34BBZp4KixuZ8GiRK9sJFfegf9u3m7
188
193
  hatchet_sdk/context/context.py,sha256=l0aewPZpncvVzH-L68U-TKH1bMHUuB-4rwXNZ1n69r0,13561
189
194
  hatchet_sdk/context/worker_context.py,sha256=1nwq75wnT2zu9Z1fel_TKw0eiMpXJIGAn6HbH1GRVNU,920
190
195
  hatchet_sdk/contracts/dispatcher_pb2.py,sha256=W9_Us2_HIdUV5idN2rPwzt4J06JfDeogxwDVvjerk_U,14320
191
- hatchet_sdk/contracts/dispatcher_pb2.pyi,sha256=6cRfHDhiLElKifrAtdiLFY8QF2_x1KkPBPplG49Ml3I,18240
196
+ hatchet_sdk/contracts/dispatcher_pb2.pyi,sha256=2dvxvN4OETOc-OhLNWDntN7GvI4QUxbMiGLdK7FM1wE,18224
192
197
  hatchet_sdk/contracts/dispatcher_pb2_grpc.py,sha256=4uJkNig8nssJwS7P-lea1YqE4wl0cVWQaJpOndOdaDs,21453
193
198
  hatchet_sdk/contracts/events_pb2.py,sha256=w_DmfXMfxlAyHWcuv_hPt7ouABAMmOEjGKVOHjYJc-4,4073
194
- hatchet_sdk/contracts/events_pb2.pyi,sha256=ekw9YVS2vJdk0BLLqf7_Atg8qCN5xIq7EnIP4Vhg_4g,4030
199
+ hatchet_sdk/contracts/events_pb2.pyi,sha256=eoHvNI5gY98ZfFleiynbtIz3SiW_X49ggMBOlOgAP74,4014
195
200
  hatchet_sdk/contracts/events_pb2_grpc.py,sha256=q5Vfu2KXS3JzP7XdHEpleAlYxgyBqIxq5WpRoz-XlH8,8327
196
201
  hatchet_sdk/contracts/workflows_pb2.py,sha256=oHpiARGasVy8MWkYQszalEEvN4wAvzVecDmOUmlO9hs,11694
197
- hatchet_sdk/contracts/workflows_pb2.pyi,sha256=JS-kP0IL7dtU3HUhJ4PCpAgF3ZLdZ6NbXvvkD43KwVA,15355
202
+ hatchet_sdk/contracts/workflows_pb2.pyi,sha256=vq3r4C60MW7qx9735q1kAyGENgfbHZtKeGP5c_8FvkY,15339
198
203
  hatchet_sdk/contracts/workflows_pb2_grpc.py,sha256=rOC2yF2VqxyGsxHnr1XbKFFh8-eLGic2SXgfS1gU3xM,8864
199
204
  hatchet_sdk/features/cron.py,sha256=4lKMH0MqiN8cHJk2jhF0Ueqs6z5ozwJzlOeSeaWqvO0,10217
200
205
  hatchet_sdk/features/scheduled.py,sha256=YhEbNWl8dWOH61rXVjAyu8iG1BZqpSkD4kgaxkKIHgY,9504
201
- hatchet_sdk/hatchet.py,sha256=UYSHRyqfjvcidOB1PrMLtF1WPacsXoVD_okhjdPxhfI,9599
206
+ hatchet_sdk/hatchet.py,sha256=fnORkj00EYzNYCJZXTlI0i-w50LaOkH8LkDVuNygBaQ,9512
202
207
  hatchet_sdk/labels.py,sha256=OuOtOHeZAd1aYi3j_EhgzIGo1_1wDlYokV74xHSuf8Y,259
203
208
  hatchet_sdk/loader.py,sha256=dGs6Tt8wdEgHeCBesbbQsP6ZYiARBvoqwIdXIO1P5Os,7913
204
209
  hatchet_sdk/logger.py,sha256=5uOr52T4mImSQm1QvWT8HvZFK5WfPNh3Y1cBQZRFgUQ,333
205
210
  hatchet_sdk/metadata.py,sha256=M_Cb-CXRKitzVMQHeaHUtbY28ET__fAbyGX1YKaeN4I,80
206
- hatchet_sdk/rate_limit.py,sha256=ycFv2NHyBxv31U7h8xVDO661rwif_lfCQf52gWIkB6g,181
211
+ hatchet_sdk/rate_limit.py,sha256=IIzpe65i-518t9kQcZVEykDQ2VY8sOw2F7qlQ4wlAjw,4421
207
212
  hatchet_sdk/semver.py,sha256=PrgBL0TnyXl3p_OK1iSMk9Gpujfh5asQpJ4DHJLCW2k,998
208
213
  hatchet_sdk/token.py,sha256=Ap3jnbaPAL10F2G_D71wj7OpBcvrI3RuE0keqXx1lAE,698
209
214
  hatchet_sdk/utils/aio_utils.py,sha256=8woLr_rO3CgzpA_2igTcU133oCxNnQoWCt-PZAWrZ_Q,4072
@@ -212,7 +217,7 @@ hatchet_sdk/utils/serialization.py,sha256=P2Uq0yxg-Cea5Lmf6IOh2r7W17MNF1Hv2qxSny
212
217
  hatchet_sdk/utils/tracing.py,sha256=UjTw2vMLg1p6GjOGwt634nYJaNZh8c70PBxOBVLiDQ4,2261
213
218
  hatchet_sdk/utils/types.py,sha256=qhx1OoeXh77AN6s4SMaGpB3zK3hPm7ocv-23JFa6_wE,191
214
219
  hatchet_sdk/utils/typing.py,sha256=qXhnoQJXjXwuzyZUQ2H3YQ6YW7vL9D_kvmh2kJM5Z9s,233
215
- hatchet_sdk/v2/callable.py,sha256=t3O9_IczXCgeYXJQNmVcllDp_5c4a_qNpzQ099Xsams,6969
220
+ hatchet_sdk/v2/callable.py,sha256=FbKj7Eo9SMGuv6SBZQNC6Z8hw1iMTLxbpaW4Dqs4Nn8,6875
216
221
  hatchet_sdk/v2/concurrency.py,sha256=aDr8vunzEJOoe2iGxip6M2fbGTde19kJu-UxCNkXQjM,1282
217
222
  hatchet_sdk/v2/hatchet.py,sha256=begVaMZmBllykNuyfAvqhL88m5ELBmx7RrJvsL4xdmY,6872
218
223
  hatchet_sdk/worker/__init__.py,sha256=1Ze1seDuXx5yD1IfHmqGFgK5qrRazVW4ZcDVGl-Pddw,61
@@ -224,7 +229,7 @@ hatchet_sdk/worker/runner/utils/error_with_traceback.py,sha256=Iih_s8JNqrinXETFJ
224
229
  hatchet_sdk/worker/worker.py,sha256=fBqTuSnE4lfl-CMTg0FYuw1jE20_CJOwyu2QuzTGdpU,11335
225
230
  hatchet_sdk/workflow.py,sha256=qH7lEtR8lvwfP0lHPN2dXJjEh2xmHST19ADW7z82OgM,9209
226
231
  hatchet_sdk/workflow_run.py,sha256=BwK5cefvXXvyQ1Ednj_7LeejMwQJqWnvUC_FTBmJNxk,1805
227
- hatchet_sdk-0.42.2.dist-info/METADATA,sha256=x9PbjygHgXRlPQHvQia7K4tW0vleTu0kDWkNYA9EcCc,1471
228
- hatchet_sdk-0.42.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
229
- hatchet_sdk-0.42.2.dist-info/entry_points.txt,sha256=C8jND3wkVr7sT69zNc_YCCT3y1v0VrktuJMRqbPnB8Y,971
230
- hatchet_sdk-0.42.2.dist-info/RECORD,,
232
+ hatchet_sdk-0.42.3.dist-info/METADATA,sha256=l_KiiLXoE8-zlevPKjK8X7EY4MANc_IPbVT2qev1K9E,1514
233
+ hatchet_sdk-0.42.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
234
+ hatchet_sdk-0.42.3.dist-info/entry_points.txt,sha256=LTtQRABmSGYOxRI68cUVEz5dp9Qb57eqXGic9lU8RMo,1023
235
+ hatchet_sdk-0.42.3.dist-info/RECORD,,
@@ -8,6 +8,7 @@ concurrency_limit=examples.concurrency_limit.worker:main
8
8
  concurrency_limit_rr=examples.concurrency_limit_rr.worker:main
9
9
  dag=examples.dag.worker:main
10
10
  delayed=examples.delayed.worker:main
11
+ dynamic_rate_limit=examples.rate_limit.dynamic:main
11
12
  events=examples.events.worker:main
12
13
  existing_loop=examples.worker_existing_loop.worker:main
13
14
  fanout=examples.fanout.worker:main