hatchet-sdk 0.47.1__py3-none-any.whl → 1.0.0a1__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 (329) hide show
  1. hatchet_sdk/__init__.py +45 -25
  2. hatchet_sdk/client.py +19 -94
  3. hatchet_sdk/clients/admin.py +309 -389
  4. hatchet_sdk/clients/dispatcher/action_listener.py +131 -109
  5. hatchet_sdk/clients/dispatcher/dispatcher.py +39 -37
  6. hatchet_sdk/clients/durable_event_listener.py +327 -0
  7. hatchet_sdk/clients/event_ts.py +23 -10
  8. hatchet_sdk/clients/events.py +96 -99
  9. hatchet_sdk/clients/rest/__init__.py +35 -0
  10. hatchet_sdk/clients/rest/api/__init__.py +2 -0
  11. hatchet_sdk/clients/rest/api/log_api.py +258 -0
  12. hatchet_sdk/clients/rest/api/task_api.py +2200 -0
  13. hatchet_sdk/clients/rest/api/workflow_runs_api.py +1274 -116
  14. hatchet_sdk/clients/rest/api_client.py +1 -1
  15. hatchet_sdk/clients/rest/configuration.py +8 -1
  16. hatchet_sdk/clients/rest/exceptions.py +21 -0
  17. hatchet_sdk/clients/rest/models/__init__.py +33 -0
  18. hatchet_sdk/clients/rest/models/tenant.py +4 -0
  19. hatchet_sdk/clients/rest/models/tenant_version.py +37 -0
  20. hatchet_sdk/clients/rest/models/update_tenant_request.py +7 -0
  21. hatchet_sdk/clients/rest/models/v1_cancel_task_request.py +104 -0
  22. hatchet_sdk/clients/rest/models/v1_dag_children.py +102 -0
  23. hatchet_sdk/clients/rest/models/v1_log_line.py +94 -0
  24. hatchet_sdk/clients/rest/models/v1_log_line_level.py +39 -0
  25. hatchet_sdk/clients/rest/models/v1_log_line_list.py +110 -0
  26. hatchet_sdk/clients/rest/models/v1_replay_task_request.py +104 -0
  27. hatchet_sdk/clients/rest/models/v1_task.py +174 -0
  28. hatchet_sdk/clients/rest/models/v1_task_event.py +118 -0
  29. hatchet_sdk/clients/rest/models/v1_task_event_list.py +110 -0
  30. hatchet_sdk/clients/rest/models/v1_task_event_type.py +55 -0
  31. hatchet_sdk/clients/rest/models/v1_task_filter.py +106 -0
  32. hatchet_sdk/clients/rest/models/v1_task_point_metric.py +92 -0
  33. hatchet_sdk/clients/rest/models/v1_task_point_metrics.py +100 -0
  34. hatchet_sdk/clients/rest/models/v1_task_run_metric.py +88 -0
  35. hatchet_sdk/clients/rest/models/v1_task_run_status.py +40 -0
  36. hatchet_sdk/clients/rest/models/v1_task_status.py +40 -0
  37. hatchet_sdk/clients/rest/models/v1_task_summary.py +228 -0
  38. hatchet_sdk/clients/rest/models/v1_task_summary_list.py +110 -0
  39. hatchet_sdk/clients/rest/models/v1_trigger_workflow_run_request.py +95 -0
  40. hatchet_sdk/clients/rest/models/v1_workflow_run.py +171 -0
  41. hatchet_sdk/clients/rest/models/v1_workflow_run_details.py +145 -0
  42. hatchet_sdk/clients/rest/models/v1_workflow_run_display_name.py +98 -0
  43. hatchet_sdk/clients/rest/models/v1_workflow_run_display_name_list.py +114 -0
  44. hatchet_sdk/clients/rest/models/v1_workflow_type.py +37 -0
  45. hatchet_sdk/clients/rest/models/workflow_run_shape_item_for_workflow_run_details.py +104 -0
  46. hatchet_sdk/clients/rest/rest.py +37 -26
  47. hatchet_sdk/clients/rest/tenacity_utils.py +1 -1
  48. hatchet_sdk/clients/rest_client.py +153 -116
  49. hatchet_sdk/clients/run_event_listener.py +65 -60
  50. hatchet_sdk/clients/workflow_listener.py +75 -66
  51. hatchet_sdk/config.py +117 -0
  52. hatchet_sdk/connection.py +27 -13
  53. hatchet_sdk/context/__init__.py +0 -1
  54. hatchet_sdk/context/context.py +118 -280
  55. hatchet_sdk/contracts/dispatcher_pb2_grpc.py +1 -1
  56. hatchet_sdk/contracts/events_pb2.py +2 -2
  57. hatchet_sdk/contracts/events_pb2_grpc.py +1 -1
  58. hatchet_sdk/contracts/v1/dispatcher_pb2.py +36 -0
  59. hatchet_sdk/contracts/v1/dispatcher_pb2.pyi +38 -0
  60. hatchet_sdk/contracts/v1/dispatcher_pb2_grpc.py +145 -0
  61. hatchet_sdk/contracts/v1/shared/condition_pb2.py +39 -0
  62. hatchet_sdk/contracts/v1/shared/condition_pb2.pyi +72 -0
  63. hatchet_sdk/contracts/v1/shared/condition_pb2_grpc.py +29 -0
  64. hatchet_sdk/contracts/v1/workflows_pb2.py +67 -0
  65. hatchet_sdk/contracts/v1/workflows_pb2.pyi +228 -0
  66. hatchet_sdk/contracts/v1/workflows_pb2_grpc.py +234 -0
  67. hatchet_sdk/contracts/workflows_pb2_grpc.py +1 -1
  68. hatchet_sdk/features/cron.py +43 -57
  69. hatchet_sdk/features/scheduled.py +60 -74
  70. hatchet_sdk/hatchet.py +491 -218
  71. hatchet_sdk/labels.py +4 -6
  72. hatchet_sdk/metadata.py +1 -1
  73. hatchet_sdk/opentelemetry/instrumentor.py +17 -18
  74. hatchet_sdk/rate_limit.py +40 -55
  75. hatchet_sdk/runnables/contextvars.py +12 -0
  76. hatchet_sdk/runnables/standalone.py +194 -0
  77. hatchet_sdk/runnables/task.py +144 -0
  78. hatchet_sdk/runnables/types.py +138 -0
  79. hatchet_sdk/runnables/workflow.py +764 -0
  80. hatchet_sdk/token.py +13 -9
  81. hatchet_sdk/utils/aio_utils.py +0 -119
  82. hatchet_sdk/utils/proto_enums.py +47 -0
  83. hatchet_sdk/utils/timedelta_to_expression.py +23 -0
  84. hatchet_sdk/utils/typing.py +10 -2
  85. hatchet_sdk/v0/__init__.py +251 -0
  86. hatchet_sdk/v0/client.py +119 -0
  87. hatchet_sdk/v0/clients/admin.py +541 -0
  88. hatchet_sdk/v0/clients/dispatcher/action_listener.py +422 -0
  89. hatchet_sdk/v0/clients/dispatcher/dispatcher.py +204 -0
  90. hatchet_sdk/v0/clients/event_ts.py +28 -0
  91. hatchet_sdk/v0/clients/events.py +182 -0
  92. hatchet_sdk/v0/clients/rest/__init__.py +307 -0
  93. hatchet_sdk/v0/clients/rest/api/__init__.py +19 -0
  94. hatchet_sdk/v0/clients/rest/api/api_token_api.py +858 -0
  95. hatchet_sdk/v0/clients/rest/api/default_api.py +2259 -0
  96. hatchet_sdk/v0/clients/rest/api/event_api.py +2548 -0
  97. hatchet_sdk/v0/clients/rest/api/github_api.py +331 -0
  98. hatchet_sdk/v0/clients/rest/api/healthcheck_api.py +483 -0
  99. hatchet_sdk/v0/clients/rest/api/log_api.py +449 -0
  100. hatchet_sdk/v0/clients/rest/api/metadata_api.py +728 -0
  101. hatchet_sdk/v0/clients/rest/api/rate_limits_api.py +423 -0
  102. hatchet_sdk/v0/clients/rest/api/slack_api.py +577 -0
  103. hatchet_sdk/v0/clients/rest/api/sns_api.py +872 -0
  104. hatchet_sdk/v0/clients/rest/api/step_run_api.py +2202 -0
  105. hatchet_sdk/v0/clients/rest/api/tenant_api.py +4430 -0
  106. hatchet_sdk/v0/clients/rest/api/user_api.py +2888 -0
  107. hatchet_sdk/v0/clients/rest/api/worker_api.py +858 -0
  108. hatchet_sdk/v0/clients/rest/api/workflow_api.py +6312 -0
  109. hatchet_sdk/v0/clients/rest/api/workflow_run_api.py +1932 -0
  110. hatchet_sdk/v0/clients/rest/api/workflow_runs_api.py +610 -0
  111. hatchet_sdk/v0/clients/rest/api_client.py +759 -0
  112. hatchet_sdk/v0/clients/rest/api_response.py +22 -0
  113. hatchet_sdk/v0/clients/rest/configuration.py +611 -0
  114. hatchet_sdk/v0/clients/rest/exceptions.py +200 -0
  115. hatchet_sdk/v0/clients/rest/models/__init__.py +274 -0
  116. hatchet_sdk/v0/clients/rest/models/accept_invite_request.py +83 -0
  117. hatchet_sdk/v0/clients/rest/models/api_error.py +102 -0
  118. hatchet_sdk/v0/clients/rest/models/api_errors.py +100 -0
  119. hatchet_sdk/v0/clients/rest/models/api_meta.py +144 -0
  120. hatchet_sdk/v0/clients/rest/models/api_meta_auth.py +85 -0
  121. hatchet_sdk/v0/clients/rest/models/api_meta_integration.py +88 -0
  122. hatchet_sdk/v0/clients/rest/models/api_meta_posthog.py +90 -0
  123. hatchet_sdk/v0/clients/rest/models/api_resource_meta.py +98 -0
  124. hatchet_sdk/v0/clients/rest/models/api_token.py +105 -0
  125. hatchet_sdk/v0/clients/rest/models/bulk_create_event_request.py +100 -0
  126. hatchet_sdk/v0/clients/rest/models/bulk_create_event_response.py +110 -0
  127. hatchet_sdk/v0/clients/rest/models/cancel_event_request.py +85 -0
  128. hatchet_sdk/v0/clients/rest/models/cancel_step_run_request.py +83 -0
  129. hatchet_sdk/v0/clients/rest/models/concurrency_limit_strategy.py +39 -0
  130. hatchet_sdk/v0/clients/rest/models/create_api_token_request.py +92 -0
  131. hatchet_sdk/v0/clients/rest/models/create_api_token_response.py +83 -0
  132. hatchet_sdk/v0/clients/rest/models/create_cron_workflow_trigger_request.py +98 -0
  133. hatchet_sdk/v0/clients/rest/models/create_event_request.py +95 -0
  134. hatchet_sdk/v0/clients/rest/models/create_pull_request_from_step_run.py +83 -0
  135. hatchet_sdk/v0/clients/rest/models/create_sns_integration_request.py +85 -0
  136. hatchet_sdk/v0/clients/rest/models/create_tenant_alert_email_group_request.py +83 -0
  137. hatchet_sdk/v0/clients/rest/models/create_tenant_invite_request.py +86 -0
  138. hatchet_sdk/v0/clients/rest/models/create_tenant_request.py +84 -0
  139. hatchet_sdk/v0/clients/rest/models/cron_workflows.py +131 -0
  140. hatchet_sdk/v0/clients/rest/models/cron_workflows_list.py +110 -0
  141. hatchet_sdk/v0/clients/rest/models/cron_workflows_method.py +37 -0
  142. hatchet_sdk/v0/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  143. hatchet_sdk/v0/clients/rest/models/event.py +143 -0
  144. hatchet_sdk/v0/clients/rest/models/event_data.py +83 -0
  145. hatchet_sdk/v0/clients/rest/models/event_key_list.py +98 -0
  146. hatchet_sdk/v0/clients/rest/models/event_list.py +110 -0
  147. hatchet_sdk/v0/clients/rest/models/event_order_by_direction.py +37 -0
  148. hatchet_sdk/v0/clients/rest/models/event_order_by_field.py +36 -0
  149. hatchet_sdk/v0/clients/rest/models/event_update_cancel200_response.py +85 -0
  150. hatchet_sdk/v0/clients/rest/models/event_workflow_run_summary.py +116 -0
  151. hatchet_sdk/v0/clients/rest/models/events.py +110 -0
  152. hatchet_sdk/v0/clients/rest/models/get_step_run_diff_response.py +100 -0
  153. hatchet_sdk/v0/clients/rest/models/github_app_installation.py +107 -0
  154. hatchet_sdk/v0/clients/rest/models/github_branch.py +86 -0
  155. hatchet_sdk/v0/clients/rest/models/github_repo.py +86 -0
  156. hatchet_sdk/v0/clients/rest/models/info_get_version200_response.py +83 -0
  157. hatchet_sdk/v0/clients/rest/models/job.py +132 -0
  158. hatchet_sdk/v0/clients/rest/models/job_run.py +176 -0
  159. hatchet_sdk/v0/clients/rest/models/job_run_status.py +41 -0
  160. hatchet_sdk/v0/clients/rest/models/link_github_repository_request.py +106 -0
  161. hatchet_sdk/v0/clients/rest/models/list_api_tokens_response.py +110 -0
  162. hatchet_sdk/v0/clients/rest/models/list_github_app_installations_response.py +112 -0
  163. hatchet_sdk/v0/clients/rest/models/list_pull_requests_response.py +100 -0
  164. hatchet_sdk/v0/clients/rest/models/list_slack_webhooks.py +110 -0
  165. hatchet_sdk/v0/clients/rest/models/list_sns_integrations.py +110 -0
  166. hatchet_sdk/v0/clients/rest/models/log_line.py +94 -0
  167. hatchet_sdk/v0/clients/rest/models/log_line_level.py +39 -0
  168. hatchet_sdk/v0/clients/rest/models/log_line_list.py +110 -0
  169. hatchet_sdk/v0/clients/rest/models/log_line_order_by_direction.py +37 -0
  170. hatchet_sdk/v0/clients/rest/models/log_line_order_by_field.py +36 -0
  171. hatchet_sdk/v0/clients/rest/models/pagination_response.py +95 -0
  172. hatchet_sdk/v0/clients/rest/models/pull_request.py +112 -0
  173. hatchet_sdk/v0/clients/rest/models/pull_request_state.py +37 -0
  174. hatchet_sdk/v0/clients/rest/models/queue_metrics.py +97 -0
  175. hatchet_sdk/v0/clients/rest/models/rate_limit.py +117 -0
  176. hatchet_sdk/v0/clients/rest/models/rate_limit_list.py +110 -0
  177. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_direction.py +37 -0
  178. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_field.py +38 -0
  179. hatchet_sdk/v0/clients/rest/models/recent_step_runs.py +118 -0
  180. hatchet_sdk/v0/clients/rest/models/reject_invite_request.py +83 -0
  181. hatchet_sdk/v0/clients/rest/models/replay_event_request.py +85 -0
  182. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_request.py +85 -0
  183. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_response.py +100 -0
  184. hatchet_sdk/v0/clients/rest/models/rerun_step_run_request.py +83 -0
  185. hatchet_sdk/v0/clients/rest/models/schedule_workflow_run_request.py +92 -0
  186. hatchet_sdk/v0/clients/rest/models/scheduled_run_status.py +42 -0
  187. hatchet_sdk/v0/clients/rest/models/scheduled_workflows.py +149 -0
  188. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_list.py +110 -0
  189. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_method.py +37 -0
  190. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  191. hatchet_sdk/v0/clients/rest/models/semaphore_slots.py +113 -0
  192. hatchet_sdk/v0/clients/rest/models/slack_webhook.py +127 -0
  193. hatchet_sdk/v0/clients/rest/models/sns_integration.py +114 -0
  194. hatchet_sdk/v0/clients/rest/models/step.py +123 -0
  195. hatchet_sdk/v0/clients/rest/models/step_run.py +202 -0
  196. hatchet_sdk/v0/clients/rest/models/step_run_archive.py +142 -0
  197. hatchet_sdk/v0/clients/rest/models/step_run_archive_list.py +110 -0
  198. hatchet_sdk/v0/clients/rest/models/step_run_diff.py +91 -0
  199. hatchet_sdk/v0/clients/rest/models/step_run_event.py +122 -0
  200. hatchet_sdk/v0/clients/rest/models/step_run_event_list.py +110 -0
  201. hatchet_sdk/v0/clients/rest/models/step_run_event_reason.py +52 -0
  202. hatchet_sdk/v0/clients/rest/models/step_run_event_severity.py +38 -0
  203. hatchet_sdk/v0/clients/rest/models/step_run_status.py +44 -0
  204. hatchet_sdk/v0/clients/rest/models/tenant.py +118 -0
  205. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group.py +98 -0
  206. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group_list.py +112 -0
  207. hatchet_sdk/v0/clients/rest/models/tenant_alerting_settings.py +143 -0
  208. hatchet_sdk/v0/clients/rest/models/tenant_invite.py +120 -0
  209. hatchet_sdk/v0/clients/rest/models/tenant_invite_list.py +110 -0
  210. hatchet_sdk/v0/clients/rest/models/tenant_list.py +110 -0
  211. hatchet_sdk/v0/clients/rest/models/tenant_member.py +123 -0
  212. hatchet_sdk/v0/clients/rest/models/tenant_member_list.py +110 -0
  213. hatchet_sdk/v0/clients/rest/models/tenant_member_role.py +38 -0
  214. hatchet_sdk/v0/clients/rest/models/tenant_queue_metrics.py +116 -0
  215. hatchet_sdk/v0/clients/rest/models/tenant_resource.py +40 -0
  216. hatchet_sdk/v0/clients/rest/models/tenant_resource_limit.py +135 -0
  217. hatchet_sdk/v0/clients/rest/models/tenant_resource_policy.py +102 -0
  218. hatchet_sdk/v0/clients/rest/models/tenant_step_run_queue_metrics.py +83 -0
  219. hatchet_sdk/v0/clients/rest/models/trigger_workflow_run_request.py +91 -0
  220. hatchet_sdk/v0/clients/rest/models/update_tenant_alert_email_group_request.py +83 -0
  221. hatchet_sdk/v0/clients/rest/models/update_tenant_invite_request.py +85 -0
  222. hatchet_sdk/v0/clients/rest/models/update_tenant_request.py +137 -0
  223. hatchet_sdk/v0/clients/rest/models/update_worker_request.py +87 -0
  224. hatchet_sdk/v0/clients/rest/models/user.py +126 -0
  225. hatchet_sdk/v0/clients/rest/models/user_change_password_request.py +88 -0
  226. hatchet_sdk/v0/clients/rest/models/user_login_request.py +86 -0
  227. hatchet_sdk/v0/clients/rest/models/user_register_request.py +91 -0
  228. hatchet_sdk/v0/clients/rest/models/user_tenant_memberships_list.py +110 -0
  229. hatchet_sdk/v0/clients/rest/models/user_tenant_public.py +86 -0
  230. hatchet_sdk/v0/clients/rest/models/webhook_worker.py +100 -0
  231. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_request.py +94 -0
  232. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_response.py +98 -0
  233. hatchet_sdk/v0/clients/rest/models/webhook_worker_created.py +102 -0
  234. hatchet_sdk/v0/clients/rest/models/webhook_worker_list_response.py +110 -0
  235. hatchet_sdk/v0/clients/rest/models/webhook_worker_request.py +102 -0
  236. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_list_response.py +104 -0
  237. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_method.py +38 -0
  238. hatchet_sdk/v0/clients/rest/models/worker.py +239 -0
  239. hatchet_sdk/v0/clients/rest/models/worker_label.py +102 -0
  240. hatchet_sdk/v0/clients/rest/models/worker_list.py +110 -0
  241. hatchet_sdk/v0/clients/rest/models/worker_runtime_info.py +103 -0
  242. hatchet_sdk/v0/clients/rest/models/worker_runtime_sdks.py +38 -0
  243. hatchet_sdk/v0/clients/rest/models/worker_type.py +38 -0
  244. hatchet_sdk/v0/clients/rest/models/workflow.py +165 -0
  245. hatchet_sdk/v0/clients/rest/models/workflow_concurrency.py +107 -0
  246. hatchet_sdk/v0/clients/rest/models/workflow_deployment_config.py +136 -0
  247. hatchet_sdk/v0/clients/rest/models/workflow_kind.py +38 -0
  248. hatchet_sdk/v0/clients/rest/models/workflow_list.py +120 -0
  249. hatchet_sdk/v0/clients/rest/models/workflow_metrics.py +97 -0
  250. hatchet_sdk/v0/clients/rest/models/workflow_run.py +188 -0
  251. hatchet_sdk/v0/clients/rest/models/workflow_run_cancel200_response.py +85 -0
  252. hatchet_sdk/v0/clients/rest/models/workflow_run_list.py +110 -0
  253. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_direction.py +37 -0
  254. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_field.py +39 -0
  255. hatchet_sdk/v0/clients/rest/models/workflow_run_shape.py +186 -0
  256. hatchet_sdk/v0/clients/rest/models/workflow_run_status.py +42 -0
  257. hatchet_sdk/v0/clients/rest/models/workflow_run_triggered_by.py +112 -0
  258. hatchet_sdk/v0/clients/rest/models/workflow_runs_cancel_request.py +85 -0
  259. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics.py +94 -0
  260. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics_counts.py +104 -0
  261. hatchet_sdk/v0/clients/rest/models/workflow_tag.py +84 -0
  262. hatchet_sdk/v0/clients/rest/models/workflow_trigger_cron_ref.py +86 -0
  263. hatchet_sdk/v0/clients/rest/models/workflow_trigger_event_ref.py +86 -0
  264. hatchet_sdk/v0/clients/rest/models/workflow_triggers.py +141 -0
  265. hatchet_sdk/v0/clients/rest/models/workflow_update_request.py +85 -0
  266. hatchet_sdk/v0/clients/rest/models/workflow_version.py +170 -0
  267. hatchet_sdk/v0/clients/rest/models/workflow_version_concurrency.py +114 -0
  268. hatchet_sdk/v0/clients/rest/models/workflow_version_definition.py +85 -0
  269. hatchet_sdk/v0/clients/rest/models/workflow_version_meta.py +123 -0
  270. hatchet_sdk/v0/clients/rest/models/workflow_workers_count.py +95 -0
  271. hatchet_sdk/v0/clients/rest/rest.py +187 -0
  272. hatchet_sdk/v0/clients/rest/tenacity_utils.py +39 -0
  273. hatchet_sdk/v0/clients/rest_client.py +622 -0
  274. hatchet_sdk/v0/clients/run_event_listener.py +260 -0
  275. hatchet_sdk/v0/clients/workflow_listener.py +277 -0
  276. hatchet_sdk/v0/connection.py +63 -0
  277. hatchet_sdk/v0/context/__init__.py +1 -0
  278. hatchet_sdk/v0/context/context.py +446 -0
  279. hatchet_sdk/v0/context/worker_context.py +28 -0
  280. hatchet_sdk/v0/contracts/dispatcher_pb2.py +102 -0
  281. hatchet_sdk/v0/contracts/dispatcher_pb2.pyi +387 -0
  282. hatchet_sdk/v0/contracts/dispatcher_pb2_grpc.py +621 -0
  283. hatchet_sdk/v0/contracts/events_pb2.py +46 -0
  284. hatchet_sdk/v0/contracts/events_pb2.pyi +87 -0
  285. hatchet_sdk/v0/contracts/events_pb2_grpc.py +274 -0
  286. hatchet_sdk/v0/contracts/workflows_pb2.py +80 -0
  287. hatchet_sdk/v0/contracts/workflows_pb2.pyi +312 -0
  288. hatchet_sdk/v0/contracts/workflows_pb2_grpc.py +277 -0
  289. hatchet_sdk/v0/features/cron.py +286 -0
  290. hatchet_sdk/v0/features/scheduled.py +248 -0
  291. hatchet_sdk/v0/hatchet.py +310 -0
  292. hatchet_sdk/v0/labels.py +10 -0
  293. hatchet_sdk/v0/logger.py +13 -0
  294. hatchet_sdk/v0/metadata.py +2 -0
  295. hatchet_sdk/v0/opentelemetry/instrumentor.py +396 -0
  296. hatchet_sdk/v0/rate_limit.py +126 -0
  297. hatchet_sdk/v0/token.py +27 -0
  298. hatchet_sdk/v0/utils/aio_utils.py +137 -0
  299. hatchet_sdk/v0/utils/backoff.py +9 -0
  300. hatchet_sdk/v0/utils/typing.py +12 -0
  301. hatchet_sdk/{v2 → v0/v2}/callable.py +8 -8
  302. hatchet_sdk/{v2 → v0/v2}/concurrency.py +2 -2
  303. hatchet_sdk/{v2 → v0/v2}/hatchet.py +10 -10
  304. hatchet_sdk/v0/worker/__init__.py +1 -0
  305. hatchet_sdk/v0/worker/action_listener_process.py +294 -0
  306. hatchet_sdk/v0/worker/runner/run_loop_manager.py +112 -0
  307. hatchet_sdk/v0/worker/runner/runner.py +460 -0
  308. hatchet_sdk/v0/worker/runner/utils/capture_logs.py +81 -0
  309. hatchet_sdk/v0/worker/worker.py +391 -0
  310. hatchet_sdk/{workflow.py → v0/workflow.py} +4 -4
  311. hatchet_sdk/v0/workflow_run.py +59 -0
  312. hatchet_sdk/waits.py +120 -0
  313. hatchet_sdk/worker/__init__.py +0 -1
  314. hatchet_sdk/worker/action_listener_process.py +80 -55
  315. hatchet_sdk/worker/runner/run_loop_manager.py +46 -34
  316. hatchet_sdk/worker/runner/runner.py +82 -87
  317. hatchet_sdk/worker/runner/utils/capture_logs.py +26 -23
  318. hatchet_sdk/worker/worker.py +172 -149
  319. hatchet_sdk/workflow_run.py +7 -21
  320. {hatchet_sdk-0.47.1.dist-info → hatchet_sdk-1.0.0a1.dist-info}/METADATA +2 -2
  321. hatchet_sdk-1.0.0a1.dist-info/RECORD +505 -0
  322. {hatchet_sdk-0.47.1.dist-info → hatchet_sdk-1.0.0a1.dist-info}/entry_points.txt +2 -0
  323. hatchet_sdk/utils/serialization.py +0 -18
  324. hatchet_sdk-0.47.1.dist-info/RECORD +0 -237
  325. /hatchet_sdk/{loader.py → v0/loader.py} +0 -0
  326. /hatchet_sdk/{semver.py → v0/semver.py} +0 -0
  327. /hatchet_sdk/{utils → v0/utils}/types.py +0 -0
  328. /hatchet_sdk/{worker → v0/worker}/runner/utils/error_with_traceback.py +0 -0
  329. {hatchet_sdk-0.47.1.dist-info → hatchet_sdk-1.0.0a1.dist-info}/WHEEL +0 -0
@@ -28,11 +28,13 @@ from hatchet_sdk.clients.rest.api.rate_limits_api import RateLimitsApi
28
28
  from hatchet_sdk.clients.rest.api.slack_api import SlackApi
29
29
  from hatchet_sdk.clients.rest.api.sns_api import SNSApi
30
30
  from hatchet_sdk.clients.rest.api.step_run_api import StepRunApi
31
+ from hatchet_sdk.clients.rest.api.task_api import TaskApi
31
32
  from hatchet_sdk.clients.rest.api.tenant_api import TenantApi
32
33
  from hatchet_sdk.clients.rest.api.user_api import UserApi
33
34
  from hatchet_sdk.clients.rest.api.worker_api import WorkerApi
34
35
  from hatchet_sdk.clients.rest.api.workflow_api import WorkflowApi
35
36
  from hatchet_sdk.clients.rest.api.workflow_run_api import WorkflowRunApi
37
+ from hatchet_sdk.clients.rest.api.workflow_runs_api import WorkflowRunsApi
36
38
  from hatchet_sdk.clients.rest.api_client import ApiClient
37
39
 
38
40
  # import ApiClient
@@ -204,6 +206,7 @@ from hatchet_sdk.clients.rest.models.tenant_resource_policy import TenantResourc
204
206
  from hatchet_sdk.clients.rest.models.tenant_step_run_queue_metrics import (
205
207
  TenantStepRunQueueMetrics,
206
208
  )
209
+ from hatchet_sdk.clients.rest.models.tenant_version import TenantVersion
207
210
  from hatchet_sdk.clients.rest.models.trigger_workflow_run_request import (
208
211
  TriggerWorkflowRunRequest,
209
212
  )
@@ -225,6 +228,35 @@ from hatchet_sdk.clients.rest.models.user_tenant_memberships_list import (
225
228
  UserTenantMembershipsList,
226
229
  )
227
230
  from hatchet_sdk.clients.rest.models.user_tenant_public import UserTenantPublic
231
+ from hatchet_sdk.clients.rest.models.v1_cancel_task_request import V1CancelTaskRequest
232
+ from hatchet_sdk.clients.rest.models.v1_dag_children import V1DagChildren
233
+ from hatchet_sdk.clients.rest.models.v1_log_line import V1LogLine
234
+ from hatchet_sdk.clients.rest.models.v1_log_line_level import V1LogLineLevel
235
+ from hatchet_sdk.clients.rest.models.v1_log_line_list import V1LogLineList
236
+ from hatchet_sdk.clients.rest.models.v1_replay_task_request import V1ReplayTaskRequest
237
+ from hatchet_sdk.clients.rest.models.v1_task_event import V1TaskEvent
238
+ from hatchet_sdk.clients.rest.models.v1_task_event_list import V1TaskEventList
239
+ from hatchet_sdk.clients.rest.models.v1_task_event_type import V1TaskEventType
240
+ from hatchet_sdk.clients.rest.models.v1_task_filter import V1TaskFilter
241
+ from hatchet_sdk.clients.rest.models.v1_task_point_metric import V1TaskPointMetric
242
+ from hatchet_sdk.clients.rest.models.v1_task_point_metrics import V1TaskPointMetrics
243
+ from hatchet_sdk.clients.rest.models.v1_task_run_metric import V1TaskRunMetric
244
+ from hatchet_sdk.clients.rest.models.v1_task_run_status import V1TaskRunStatus
245
+ from hatchet_sdk.clients.rest.models.v1_task_status import V1TaskStatus
246
+ from hatchet_sdk.clients.rest.models.v1_task_summary import V1TaskSummary
247
+ from hatchet_sdk.clients.rest.models.v1_task_summary_list import V1TaskSummaryList
248
+ from hatchet_sdk.clients.rest.models.v1_trigger_workflow_run_request import (
249
+ V1TriggerWorkflowRunRequest,
250
+ )
251
+ from hatchet_sdk.clients.rest.models.v1_workflow_run import V1WorkflowRun
252
+ from hatchet_sdk.clients.rest.models.v1_workflow_run_details import V1WorkflowRunDetails
253
+ from hatchet_sdk.clients.rest.models.v1_workflow_run_display_name import (
254
+ V1WorkflowRunDisplayName,
255
+ )
256
+ from hatchet_sdk.clients.rest.models.v1_workflow_run_display_name_list import (
257
+ V1WorkflowRunDisplayNameList,
258
+ )
259
+ from hatchet_sdk.clients.rest.models.v1_workflow_type import V1WorkflowType
228
260
  from hatchet_sdk.clients.rest.models.webhook_worker import WebhookWorker
229
261
  from hatchet_sdk.clients.rest.models.webhook_worker_create_request import (
230
262
  WebhookWorkerCreateRequest,
@@ -263,6 +295,9 @@ from hatchet_sdk.clients.rest.models.workflow_run_order_by_field import (
263
295
  WorkflowRunOrderByField,
264
296
  )
265
297
  from hatchet_sdk.clients.rest.models.workflow_run_shape import WorkflowRunShape
298
+ from hatchet_sdk.clients.rest.models.workflow_run_shape_item_for_workflow_run_details import (
299
+ WorkflowRunShapeItemForWorkflowRunDetails,
300
+ )
266
301
  from hatchet_sdk.clients.rest.models.workflow_run_status import WorkflowRunStatus
267
302
  from hatchet_sdk.clients.rest.models.workflow_run_triggered_by import (
268
303
  WorkflowRunTriggeredBy,
@@ -12,8 +12,10 @@ from hatchet_sdk.clients.rest.api.rate_limits_api import RateLimitsApi
12
12
  from hatchet_sdk.clients.rest.api.slack_api import SlackApi
13
13
  from hatchet_sdk.clients.rest.api.sns_api import SNSApi
14
14
  from hatchet_sdk.clients.rest.api.step_run_api import StepRunApi
15
+ from hatchet_sdk.clients.rest.api.task_api import TaskApi
15
16
  from hatchet_sdk.clients.rest.api.tenant_api import TenantApi
16
17
  from hatchet_sdk.clients.rest.api.user_api import UserApi
17
18
  from hatchet_sdk.clients.rest.api.worker_api import WorkerApi
18
19
  from hatchet_sdk.clients.rest.api.workflow_api import WorkflowApi
19
20
  from hatchet_sdk.clients.rest.api.workflow_run_api import WorkflowRunApi
21
+ from hatchet_sdk.clients.rest.api.workflow_runs_api import WorkflowRunsApi
@@ -25,6 +25,7 @@ from hatchet_sdk.clients.rest.models.log_line_order_by_direction import (
25
25
  LogLineOrderByDirection,
26
26
  )
27
27
  from hatchet_sdk.clients.rest.models.log_line_order_by_field import LogLineOrderByField
28
+ from hatchet_sdk.clients.rest.models.v1_log_line_list import V1LogLineList
28
29
  from hatchet_sdk.clients.rest.rest import RESTResponseType
29
30
 
30
31
 
@@ -445,3 +446,260 @@ class LogApi:
445
446
  _host=_host,
446
447
  _request_auth=_request_auth,
447
448
  )
449
+
450
+ @validate_call
451
+ async def v1_log_line_list(
452
+ self,
453
+ task: Annotated[
454
+ str,
455
+ Field(min_length=36, strict=True, max_length=36, description="The task id"),
456
+ ],
457
+ _request_timeout: Union[
458
+ None,
459
+ Annotated[StrictFloat, Field(gt=0)],
460
+ Tuple[
461
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
462
+ ],
463
+ ] = None,
464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
465
+ _content_type: Optional[StrictStr] = None,
466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
468
+ ) -> V1LogLineList:
469
+ """List log lines
470
+
471
+ Lists log lines for a task
472
+
473
+ :param task: The task id (required)
474
+ :type task: str
475
+ :param _request_timeout: timeout setting for this request. If one
476
+ number provided, it will be total request
477
+ timeout. It can also be a pair (tuple) of
478
+ (connection, read) timeouts.
479
+ :type _request_timeout: int, tuple(int, int), optional
480
+ :param _request_auth: set to override the auth_settings for an a single
481
+ request; this effectively ignores the
482
+ authentication in the spec for a single request.
483
+ :type _request_auth: dict, optional
484
+ :param _content_type: force content-type for the request.
485
+ :type _content_type: str, Optional
486
+ :param _headers: set to override the headers for a single
487
+ request; this effectively ignores the headers
488
+ in the spec for a single request.
489
+ :type _headers: dict, optional
490
+ :param _host_index: set to override the host_index for a single
491
+ request; this effectively ignores the host_index
492
+ in the spec for a single request.
493
+ :type _host_index: int, optional
494
+ :return: Returns the result object.
495
+ """ # noqa: E501
496
+
497
+ _param = self._v1_log_line_list_serialize(
498
+ task=task,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index,
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ "200": "V1LogLineList",
507
+ "400": "APIErrors",
508
+ "403": "APIErrors",
509
+ }
510
+ response_data = await self.api_client.call_api(
511
+ *_param, _request_timeout=_request_timeout
512
+ )
513
+ await response_data.read()
514
+ return self.api_client.response_deserialize(
515
+ response_data=response_data,
516
+ response_types_map=_response_types_map,
517
+ ).data
518
+
519
+ @validate_call
520
+ async def v1_log_line_list_with_http_info(
521
+ self,
522
+ task: Annotated[
523
+ str,
524
+ Field(min_length=36, strict=True, max_length=36, description="The task id"),
525
+ ],
526
+ _request_timeout: Union[
527
+ None,
528
+ Annotated[StrictFloat, Field(gt=0)],
529
+ Tuple[
530
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
531
+ ],
532
+ ] = None,
533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
534
+ _content_type: Optional[StrictStr] = None,
535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
537
+ ) -> ApiResponse[V1LogLineList]:
538
+ """List log lines
539
+
540
+ Lists log lines for a task
541
+
542
+ :param task: The task id (required)
543
+ :type task: str
544
+ :param _request_timeout: timeout setting for this request. If one
545
+ number provided, it will be total request
546
+ timeout. It can also be a pair (tuple) of
547
+ (connection, read) timeouts.
548
+ :type _request_timeout: int, tuple(int, int), optional
549
+ :param _request_auth: set to override the auth_settings for an a single
550
+ request; this effectively ignores the
551
+ authentication in the spec for a single request.
552
+ :type _request_auth: dict, optional
553
+ :param _content_type: force content-type for the request.
554
+ :type _content_type: str, Optional
555
+ :param _headers: set to override the headers for a single
556
+ request; this effectively ignores the headers
557
+ in the spec for a single request.
558
+ :type _headers: dict, optional
559
+ :param _host_index: set to override the host_index for a single
560
+ request; this effectively ignores the host_index
561
+ in the spec for a single request.
562
+ :type _host_index: int, optional
563
+ :return: Returns the result object.
564
+ """ # noqa: E501
565
+
566
+ _param = self._v1_log_line_list_serialize(
567
+ task=task,
568
+ _request_auth=_request_auth,
569
+ _content_type=_content_type,
570
+ _headers=_headers,
571
+ _host_index=_host_index,
572
+ )
573
+
574
+ _response_types_map: Dict[str, Optional[str]] = {
575
+ "200": "V1LogLineList",
576
+ "400": "APIErrors",
577
+ "403": "APIErrors",
578
+ }
579
+ response_data = await self.api_client.call_api(
580
+ *_param, _request_timeout=_request_timeout
581
+ )
582
+ await response_data.read()
583
+ return self.api_client.response_deserialize(
584
+ response_data=response_data,
585
+ response_types_map=_response_types_map,
586
+ )
587
+
588
+ @validate_call
589
+ async def v1_log_line_list_without_preload_content(
590
+ self,
591
+ task: Annotated[
592
+ str,
593
+ Field(min_length=36, strict=True, max_length=36, description="The task id"),
594
+ ],
595
+ _request_timeout: Union[
596
+ None,
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Tuple[
599
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
600
+ ],
601
+ ] = None,
602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
603
+ _content_type: Optional[StrictStr] = None,
604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
+ ) -> RESTResponseType:
607
+ """List log lines
608
+
609
+ Lists log lines for a task
610
+
611
+ :param task: The task id (required)
612
+ :type task: str
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._v1_log_line_list_serialize(
636
+ task=task,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index,
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ "200": "V1LogLineList",
645
+ "400": "APIErrors",
646
+ "403": "APIErrors",
647
+ }
648
+ response_data = await self.api_client.call_api(
649
+ *_param, _request_timeout=_request_timeout
650
+ )
651
+ return response_data.response
652
+
653
+ def _v1_log_line_list_serialize(
654
+ self,
655
+ task,
656
+ _request_auth,
657
+ _content_type,
658
+ _headers,
659
+ _host_index,
660
+ ) -> RequestSerialized:
661
+
662
+ _host = None
663
+
664
+ _collection_formats: Dict[str, str] = {}
665
+
666
+ _path_params: Dict[str, str] = {}
667
+ _query_params: List[Tuple[str, str]] = []
668
+ _header_params: Dict[str, Optional[str]] = _headers or {}
669
+ _form_params: List[Tuple[str, str]] = []
670
+ _files: Dict[
671
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
672
+ ] = {}
673
+ _body_params: Optional[bytes] = None
674
+
675
+ # process the path parameters
676
+ if task is not None:
677
+ _path_params["task"] = task
678
+ # process the query parameters
679
+ # process the header parameters
680
+ # process the form parameters
681
+ # process the body parameter
682
+
683
+ # set the HTTP header `Accept`
684
+ if "Accept" not in _header_params:
685
+ _header_params["Accept"] = self.api_client.select_header_accept(
686
+ ["application/json"]
687
+ )
688
+
689
+ # authentication setting
690
+ _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
691
+
692
+ return self.api_client.param_serialize(
693
+ method="GET",
694
+ resource_path="/api/v1/stable/tasks/{task}/logs",
695
+ path_params=_path_params,
696
+ query_params=_query_params,
697
+ header_params=_header_params,
698
+ body=_body_params,
699
+ post_params=_form_params,
700
+ files=_files,
701
+ auth_settings=_auth_settings,
702
+ collection_formats=_collection_formats,
703
+ _host=_host,
704
+ _request_auth=_request_auth,
705
+ )