hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.42.0__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.

Files changed (152) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.py +71 -67
  73. hatchet_sdk/contracts/dispatcher_pb2.pyi +31 -2
  74. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  75. hatchet_sdk/contracts/workflows_pb2.py +42 -40
  76. hatchet_sdk/contracts/workflows_pb2.pyi +24 -6
  77. hatchet_sdk/features/cron.py +286 -0
  78. hatchet_sdk/features/scheduled.py +248 -0
  79. hatchet_sdk/hatchet.py +80 -79
  80. hatchet_sdk/loader.py +37 -14
  81. hatchet_sdk/utils/serialization.py +15 -0
  82. hatchet_sdk/utils/tracing.py +67 -0
  83. hatchet_sdk/worker/runner/runner.py +158 -112
  84. hatchet_sdk/worker/worker.py +1 -17
  85. hatchet_sdk/workflow.py +4 -0
  86. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/METADATA +8 -2
  87. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/RECORD +89 -143
  88. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/entry_points.txt +1 -1
  89. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  90. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  91. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  92. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  93. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  94. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  95. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  96. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  97. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  98. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  99. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  100. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  101. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  102. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  103. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  104. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  105. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  106. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  107. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  108. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  111. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  112. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  113. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  114. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  118. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  119. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  129. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  130. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  131. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  132. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  133. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  134. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  136. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  137. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  138. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  139. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  140. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  141. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  143. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  144. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  145. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  146. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  147. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  148. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  149. hatchet_sdk/compute/__init__.py +0 -0
  150. hatchet_sdk/compute/configs.py +0 -34
  151. hatchet_sdk/compute/managed_compute.py +0 -111
  152. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/WHEEL +0 -0
@@ -1,265 +0,0 @@
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
- import warnings
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
-
17
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
- from typing_extensions import Annotated
19
-
20
- from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
22
- from hatchet_sdk.clients.cloud_rest.models.metadata_get200_response import (
23
- MetadataGet200Response,
24
- )
25
- from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
26
-
27
-
28
- class MetadataApi:
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None) -> None:
36
- if api_client is None:
37
- api_client = ApiClient.get_default()
38
- self.api_client = api_client
39
-
40
- @validate_call
41
- async def metadata_get(
42
- self,
43
- _request_timeout: Union[
44
- None,
45
- Annotated[StrictFloat, Field(gt=0)],
46
- Tuple[
47
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
48
- ],
49
- ] = None,
50
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
51
- _content_type: Optional[StrictStr] = None,
52
- _headers: Optional[Dict[StrictStr, Any]] = None,
53
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
54
- ) -> MetadataGet200Response:
55
- """Get metadata
56
-
57
- Gets metadata for the Hatchet instance
58
-
59
- :param _request_timeout: timeout setting for this request. If one
60
- number provided, it will be total request
61
- timeout. It can also be a pair (tuple) of
62
- (connection, read) timeouts.
63
- :type _request_timeout: int, tuple(int, int), optional
64
- :param _request_auth: set to override the auth_settings for an a single
65
- request; this effectively ignores the
66
- authentication in the spec for a single request.
67
- :type _request_auth: dict, optional
68
- :param _content_type: force content-type for the request.
69
- :type _content_type: str, Optional
70
- :param _headers: set to override the headers for a single
71
- request; this effectively ignores the headers
72
- in the spec for a single request.
73
- :type _headers: dict, optional
74
- :param _host_index: set to override the host_index for a single
75
- request; this effectively ignores the host_index
76
- in the spec for a single request.
77
- :type _host_index: int, optional
78
- :return: Returns the result object.
79
- """ # noqa: E501
80
-
81
- _param = self._metadata_get_serialize(
82
- _request_auth=_request_auth,
83
- _content_type=_content_type,
84
- _headers=_headers,
85
- _host_index=_host_index,
86
- )
87
-
88
- _response_types_map: Dict[str, Optional[str]] = {
89
- "200": "MetadataGet200Response",
90
- "400": "MetadataGet400Response",
91
- }
92
- response_data = await self.api_client.call_api(
93
- *_param, _request_timeout=_request_timeout
94
- )
95
- await response_data.read()
96
- return self.api_client.response_deserialize(
97
- response_data=response_data,
98
- response_types_map=_response_types_map,
99
- ).data
100
-
101
- @validate_call
102
- async def metadata_get_with_http_info(
103
- self,
104
- _request_timeout: Union[
105
- None,
106
- Annotated[StrictFloat, Field(gt=0)],
107
- Tuple[
108
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
109
- ],
110
- ] = None,
111
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
112
- _content_type: Optional[StrictStr] = None,
113
- _headers: Optional[Dict[StrictStr, Any]] = None,
114
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
115
- ) -> ApiResponse[MetadataGet200Response]:
116
- """Get metadata
117
-
118
- Gets metadata for the Hatchet instance
119
-
120
- :param _request_timeout: timeout setting for this request. If one
121
- number provided, it will be total request
122
- timeout. It can also be a pair (tuple) of
123
- (connection, read) timeouts.
124
- :type _request_timeout: int, tuple(int, int), optional
125
- :param _request_auth: set to override the auth_settings for an a single
126
- request; this effectively ignores the
127
- authentication in the spec for a single request.
128
- :type _request_auth: dict, optional
129
- :param _content_type: force content-type for the request.
130
- :type _content_type: str, Optional
131
- :param _headers: set to override the headers for a single
132
- request; this effectively ignores the headers
133
- in the spec for a single request.
134
- :type _headers: dict, optional
135
- :param _host_index: set to override the host_index for a single
136
- request; this effectively ignores the host_index
137
- in the spec for a single request.
138
- :type _host_index: int, optional
139
- :return: Returns the result object.
140
- """ # noqa: E501
141
-
142
- _param = self._metadata_get_serialize(
143
- _request_auth=_request_auth,
144
- _content_type=_content_type,
145
- _headers=_headers,
146
- _host_index=_host_index,
147
- )
148
-
149
- _response_types_map: Dict[str, Optional[str]] = {
150
- "200": "MetadataGet200Response",
151
- "400": "MetadataGet400Response",
152
- }
153
- response_data = await self.api_client.call_api(
154
- *_param, _request_timeout=_request_timeout
155
- )
156
- await response_data.read()
157
- return self.api_client.response_deserialize(
158
- response_data=response_data,
159
- response_types_map=_response_types_map,
160
- )
161
-
162
- @validate_call
163
- async def metadata_get_without_preload_content(
164
- self,
165
- _request_timeout: Union[
166
- None,
167
- Annotated[StrictFloat, Field(gt=0)],
168
- Tuple[
169
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
170
- ],
171
- ] = None,
172
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
173
- _content_type: Optional[StrictStr] = None,
174
- _headers: Optional[Dict[StrictStr, Any]] = None,
175
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
176
- ) -> RESTResponseType:
177
- """Get metadata
178
-
179
- Gets metadata for the Hatchet instance
180
-
181
- :param _request_timeout: timeout setting for this request. If one
182
- number provided, it will be total request
183
- timeout. It can also be a pair (tuple) of
184
- (connection, read) timeouts.
185
- :type _request_timeout: int, tuple(int, int), optional
186
- :param _request_auth: set to override the auth_settings for an a single
187
- request; this effectively ignores the
188
- authentication in the spec for a single request.
189
- :type _request_auth: dict, optional
190
- :param _content_type: force content-type for the request.
191
- :type _content_type: str, Optional
192
- :param _headers: set to override the headers for a single
193
- request; this effectively ignores the headers
194
- in the spec for a single request.
195
- :type _headers: dict, optional
196
- :param _host_index: set to override the host_index for a single
197
- request; this effectively ignores the host_index
198
- in the spec for a single request.
199
- :type _host_index: int, optional
200
- :return: Returns the result object.
201
- """ # noqa: E501
202
-
203
- _param = self._metadata_get_serialize(
204
- _request_auth=_request_auth,
205
- _content_type=_content_type,
206
- _headers=_headers,
207
- _host_index=_host_index,
208
- )
209
-
210
- _response_types_map: Dict[str, Optional[str]] = {
211
- "200": "MetadataGet200Response",
212
- "400": "MetadataGet400Response",
213
- }
214
- response_data = await self.api_client.call_api(
215
- *_param, _request_timeout=_request_timeout
216
- )
217
- return response_data.response
218
-
219
- def _metadata_get_serialize(
220
- self,
221
- _request_auth,
222
- _content_type,
223
- _headers,
224
- _host_index,
225
- ) -> RequestSerialized:
226
-
227
- _host = None
228
-
229
- _collection_formats: Dict[str, str] = {}
230
-
231
- _path_params: Dict[str, str] = {}
232
- _query_params: List[Tuple[str, str]] = []
233
- _header_params: Dict[str, Optional[str]] = _headers or {}
234
- _form_params: List[Tuple[str, str]] = []
235
- _files: Dict[str, Union[str, bytes]] = {}
236
- _body_params: Optional[bytes] = None
237
-
238
- # process the path parameters
239
- # process the query parameters
240
- # process the header parameters
241
- # process the form parameters
242
- # process the body parameter
243
-
244
- # set the HTTP header `Accept`
245
- _header_params["Accept"] = self.api_client.select_header_accept(
246
- ["application/json"]
247
- )
248
-
249
- # authentication setting
250
- _auth_settings: List[str] = []
251
-
252
- return self.api_client.param_serialize(
253
- method="GET",
254
- resource_path="/api/v1/cloud/metadata",
255
- path_params=_path_params,
256
- query_params=_query_params,
257
- header_params=_header_params,
258
- body=_body_params,
259
- post_params=_form_params,
260
- files=_files,
261
- auth_settings=_auth_settings,
262
- collection_formats=_collection_formats,
263
- _host=_host,
264
- _request_auth=_request_auth,
265
- )