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.
- hatchet_sdk/__init__.py +45 -25
- hatchet_sdk/client.py +19 -94
- hatchet_sdk/clients/admin.py +309 -389
- hatchet_sdk/clients/dispatcher/action_listener.py +131 -109
- hatchet_sdk/clients/dispatcher/dispatcher.py +39 -37
- hatchet_sdk/clients/durable_event_listener.py +327 -0
- hatchet_sdk/clients/event_ts.py +23 -10
- hatchet_sdk/clients/events.py +96 -99
- hatchet_sdk/clients/rest/__init__.py +35 -0
- hatchet_sdk/clients/rest/api/__init__.py +2 -0
- hatchet_sdk/clients/rest/api/log_api.py +258 -0
- hatchet_sdk/clients/rest/api/task_api.py +2200 -0
- hatchet_sdk/clients/rest/api/workflow_runs_api.py +1274 -116
- hatchet_sdk/clients/rest/api_client.py +1 -1
- hatchet_sdk/clients/rest/configuration.py +8 -1
- hatchet_sdk/clients/rest/exceptions.py +21 -0
- hatchet_sdk/clients/rest/models/__init__.py +33 -0
- hatchet_sdk/clients/rest/models/tenant.py +4 -0
- hatchet_sdk/clients/rest/models/tenant_version.py +37 -0
- hatchet_sdk/clients/rest/models/update_tenant_request.py +7 -0
- hatchet_sdk/clients/rest/models/v1_cancel_task_request.py +104 -0
- hatchet_sdk/clients/rest/models/v1_dag_children.py +102 -0
- hatchet_sdk/clients/rest/models/v1_log_line.py +94 -0
- hatchet_sdk/clients/rest/models/v1_log_line_level.py +39 -0
- hatchet_sdk/clients/rest/models/v1_log_line_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_replay_task_request.py +104 -0
- hatchet_sdk/clients/rest/models/v1_task.py +174 -0
- hatchet_sdk/clients/rest/models/v1_task_event.py +118 -0
- hatchet_sdk/clients/rest/models/v1_task_event_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_task_event_type.py +55 -0
- hatchet_sdk/clients/rest/models/v1_task_filter.py +106 -0
- hatchet_sdk/clients/rest/models/v1_task_point_metric.py +92 -0
- hatchet_sdk/clients/rest/models/v1_task_point_metrics.py +100 -0
- hatchet_sdk/clients/rest/models/v1_task_run_metric.py +88 -0
- hatchet_sdk/clients/rest/models/v1_task_run_status.py +40 -0
- hatchet_sdk/clients/rest/models/v1_task_status.py +40 -0
- hatchet_sdk/clients/rest/models/v1_task_summary.py +228 -0
- hatchet_sdk/clients/rest/models/v1_task_summary_list.py +110 -0
- hatchet_sdk/clients/rest/models/v1_trigger_workflow_run_request.py +95 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run.py +171 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run_details.py +145 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run_display_name.py +98 -0
- hatchet_sdk/clients/rest/models/v1_workflow_run_display_name_list.py +114 -0
- hatchet_sdk/clients/rest/models/v1_workflow_type.py +37 -0
- hatchet_sdk/clients/rest/models/workflow_run_shape_item_for_workflow_run_details.py +104 -0
- hatchet_sdk/clients/rest/rest.py +37 -26
- hatchet_sdk/clients/rest/tenacity_utils.py +1 -1
- hatchet_sdk/clients/rest_client.py +153 -116
- hatchet_sdk/clients/run_event_listener.py +65 -60
- hatchet_sdk/clients/workflow_listener.py +75 -66
- hatchet_sdk/config.py +117 -0
- hatchet_sdk/connection.py +27 -13
- hatchet_sdk/context/__init__.py +0 -1
- hatchet_sdk/context/context.py +118 -280
- hatchet_sdk/contracts/dispatcher_pb2_grpc.py +1 -1
- hatchet_sdk/contracts/events_pb2.py +2 -2
- hatchet_sdk/contracts/events_pb2_grpc.py +1 -1
- hatchet_sdk/contracts/v1/dispatcher_pb2.py +36 -0
- hatchet_sdk/contracts/v1/dispatcher_pb2.pyi +38 -0
- hatchet_sdk/contracts/v1/dispatcher_pb2_grpc.py +145 -0
- hatchet_sdk/contracts/v1/shared/condition_pb2.py +39 -0
- hatchet_sdk/contracts/v1/shared/condition_pb2.pyi +72 -0
- hatchet_sdk/contracts/v1/shared/condition_pb2_grpc.py +29 -0
- hatchet_sdk/contracts/v1/workflows_pb2.py +67 -0
- hatchet_sdk/contracts/v1/workflows_pb2.pyi +228 -0
- hatchet_sdk/contracts/v1/workflows_pb2_grpc.py +234 -0
- hatchet_sdk/contracts/workflows_pb2_grpc.py +1 -1
- hatchet_sdk/features/cron.py +43 -57
- hatchet_sdk/features/scheduled.py +60 -74
- hatchet_sdk/hatchet.py +491 -218
- hatchet_sdk/labels.py +4 -6
- hatchet_sdk/metadata.py +1 -1
- hatchet_sdk/opentelemetry/instrumentor.py +17 -18
- hatchet_sdk/rate_limit.py +40 -55
- hatchet_sdk/runnables/contextvars.py +12 -0
- hatchet_sdk/runnables/standalone.py +194 -0
- hatchet_sdk/runnables/task.py +144 -0
- hatchet_sdk/runnables/types.py +138 -0
- hatchet_sdk/runnables/workflow.py +764 -0
- hatchet_sdk/token.py +13 -9
- hatchet_sdk/utils/aio_utils.py +0 -119
- hatchet_sdk/utils/proto_enums.py +47 -0
- hatchet_sdk/utils/timedelta_to_expression.py +23 -0
- hatchet_sdk/utils/typing.py +10 -2
- hatchet_sdk/v0/__init__.py +251 -0
- hatchet_sdk/v0/client.py +119 -0
- hatchet_sdk/v0/clients/admin.py +541 -0
- hatchet_sdk/v0/clients/dispatcher/action_listener.py +422 -0
- hatchet_sdk/v0/clients/dispatcher/dispatcher.py +204 -0
- hatchet_sdk/v0/clients/event_ts.py +28 -0
- hatchet_sdk/v0/clients/events.py +182 -0
- hatchet_sdk/v0/clients/rest/__init__.py +307 -0
- hatchet_sdk/v0/clients/rest/api/__init__.py +19 -0
- hatchet_sdk/v0/clients/rest/api/api_token_api.py +858 -0
- hatchet_sdk/v0/clients/rest/api/default_api.py +2259 -0
- hatchet_sdk/v0/clients/rest/api/event_api.py +2548 -0
- hatchet_sdk/v0/clients/rest/api/github_api.py +331 -0
- hatchet_sdk/v0/clients/rest/api/healthcheck_api.py +483 -0
- hatchet_sdk/v0/clients/rest/api/log_api.py +449 -0
- hatchet_sdk/v0/clients/rest/api/metadata_api.py +728 -0
- hatchet_sdk/v0/clients/rest/api/rate_limits_api.py +423 -0
- hatchet_sdk/v0/clients/rest/api/slack_api.py +577 -0
- hatchet_sdk/v0/clients/rest/api/sns_api.py +872 -0
- hatchet_sdk/v0/clients/rest/api/step_run_api.py +2202 -0
- hatchet_sdk/v0/clients/rest/api/tenant_api.py +4430 -0
- hatchet_sdk/v0/clients/rest/api/user_api.py +2888 -0
- hatchet_sdk/v0/clients/rest/api/worker_api.py +858 -0
- hatchet_sdk/v0/clients/rest/api/workflow_api.py +6312 -0
- hatchet_sdk/v0/clients/rest/api/workflow_run_api.py +1932 -0
- hatchet_sdk/v0/clients/rest/api/workflow_runs_api.py +610 -0
- hatchet_sdk/v0/clients/rest/api_client.py +759 -0
- hatchet_sdk/v0/clients/rest/api_response.py +22 -0
- hatchet_sdk/v0/clients/rest/configuration.py +611 -0
- hatchet_sdk/v0/clients/rest/exceptions.py +200 -0
- hatchet_sdk/v0/clients/rest/models/__init__.py +274 -0
- hatchet_sdk/v0/clients/rest/models/accept_invite_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/api_error.py +102 -0
- hatchet_sdk/v0/clients/rest/models/api_errors.py +100 -0
- hatchet_sdk/v0/clients/rest/models/api_meta.py +144 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_auth.py +85 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_integration.py +88 -0
- hatchet_sdk/v0/clients/rest/models/api_meta_posthog.py +90 -0
- hatchet_sdk/v0/clients/rest/models/api_resource_meta.py +98 -0
- hatchet_sdk/v0/clients/rest/models/api_token.py +105 -0
- hatchet_sdk/v0/clients/rest/models/bulk_create_event_request.py +100 -0
- hatchet_sdk/v0/clients/rest/models/bulk_create_event_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/cancel_event_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/cancel_step_run_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/concurrency_limit_strategy.py +39 -0
- hatchet_sdk/v0/clients/rest/models/create_api_token_request.py +92 -0
- hatchet_sdk/v0/clients/rest/models/create_api_token_response.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_cron_workflow_trigger_request.py +98 -0
- hatchet_sdk/v0/clients/rest/models/create_event_request.py +95 -0
- hatchet_sdk/v0/clients/rest/models/create_pull_request_from_step_run.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_sns_integration_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_alert_email_group_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_invite_request.py +86 -0
- hatchet_sdk/v0/clients/rest/models/create_tenant_request.py +84 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows.py +131 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_method.py +37 -0
- hatchet_sdk/v0/clients/rest/models/cron_workflows_order_by_field.py +37 -0
- hatchet_sdk/v0/clients/rest/models/event.py +143 -0
- hatchet_sdk/v0/clients/rest/models/event_data.py +83 -0
- hatchet_sdk/v0/clients/rest/models/event_key_list.py +98 -0
- hatchet_sdk/v0/clients/rest/models/event_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/event_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/event_order_by_field.py +36 -0
- hatchet_sdk/v0/clients/rest/models/event_update_cancel200_response.py +85 -0
- hatchet_sdk/v0/clients/rest/models/event_workflow_run_summary.py +116 -0
- hatchet_sdk/v0/clients/rest/models/events.py +110 -0
- hatchet_sdk/v0/clients/rest/models/get_step_run_diff_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/github_app_installation.py +107 -0
- hatchet_sdk/v0/clients/rest/models/github_branch.py +86 -0
- hatchet_sdk/v0/clients/rest/models/github_repo.py +86 -0
- hatchet_sdk/v0/clients/rest/models/info_get_version200_response.py +83 -0
- hatchet_sdk/v0/clients/rest/models/job.py +132 -0
- hatchet_sdk/v0/clients/rest/models/job_run.py +176 -0
- hatchet_sdk/v0/clients/rest/models/job_run_status.py +41 -0
- hatchet_sdk/v0/clients/rest/models/link_github_repository_request.py +106 -0
- hatchet_sdk/v0/clients/rest/models/list_api_tokens_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/list_github_app_installations_response.py +112 -0
- hatchet_sdk/v0/clients/rest/models/list_pull_requests_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/list_slack_webhooks.py +110 -0
- hatchet_sdk/v0/clients/rest/models/list_sns_integrations.py +110 -0
- hatchet_sdk/v0/clients/rest/models/log_line.py +94 -0
- hatchet_sdk/v0/clients/rest/models/log_line_level.py +39 -0
- hatchet_sdk/v0/clients/rest/models/log_line_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/log_line_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/log_line_order_by_field.py +36 -0
- hatchet_sdk/v0/clients/rest/models/pagination_response.py +95 -0
- hatchet_sdk/v0/clients/rest/models/pull_request.py +112 -0
- hatchet_sdk/v0/clients/rest/models/pull_request_state.py +37 -0
- hatchet_sdk/v0/clients/rest/models/queue_metrics.py +97 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit.py +117 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_field.py +38 -0
- hatchet_sdk/v0/clients/rest/models/recent_step_runs.py +118 -0
- hatchet_sdk/v0/clients/rest/models/reject_invite_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/replay_event_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_response.py +100 -0
- hatchet_sdk/v0/clients/rest/models/rerun_step_run_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/schedule_workflow_run_request.py +92 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_run_status.py +42 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows.py +149 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_method.py +37 -0
- hatchet_sdk/v0/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
- hatchet_sdk/v0/clients/rest/models/semaphore_slots.py +113 -0
- hatchet_sdk/v0/clients/rest/models/slack_webhook.py +127 -0
- hatchet_sdk/v0/clients/rest/models/sns_integration.py +114 -0
- hatchet_sdk/v0/clients/rest/models/step.py +123 -0
- hatchet_sdk/v0/clients/rest/models/step_run.py +202 -0
- hatchet_sdk/v0/clients/rest/models/step_run_archive.py +142 -0
- hatchet_sdk/v0/clients/rest/models/step_run_archive_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/step_run_diff.py +91 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event.py +122 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_reason.py +52 -0
- hatchet_sdk/v0/clients/rest/models/step_run_event_severity.py +38 -0
- hatchet_sdk/v0/clients/rest/models/step_run_status.py +44 -0
- hatchet_sdk/v0/clients/rest/models/tenant.py +118 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group.py +98 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group_list.py +112 -0
- hatchet_sdk/v0/clients/rest/models/tenant_alerting_settings.py +143 -0
- hatchet_sdk/v0/clients/rest/models/tenant_invite.py +120 -0
- hatchet_sdk/v0/clients/rest/models/tenant_invite_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member.py +123 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/tenant_member_role.py +38 -0
- hatchet_sdk/v0/clients/rest/models/tenant_queue_metrics.py +116 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource.py +40 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource_limit.py +135 -0
- hatchet_sdk/v0/clients/rest/models/tenant_resource_policy.py +102 -0
- hatchet_sdk/v0/clients/rest/models/tenant_step_run_queue_metrics.py +83 -0
- hatchet_sdk/v0/clients/rest/models/trigger_workflow_run_request.py +91 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_alert_email_group_request.py +83 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_invite_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/update_tenant_request.py +137 -0
- hatchet_sdk/v0/clients/rest/models/update_worker_request.py +87 -0
- hatchet_sdk/v0/clients/rest/models/user.py +126 -0
- hatchet_sdk/v0/clients/rest/models/user_change_password_request.py +88 -0
- hatchet_sdk/v0/clients/rest/models/user_login_request.py +86 -0
- hatchet_sdk/v0/clients/rest/models/user_register_request.py +91 -0
- hatchet_sdk/v0/clients/rest/models/user_tenant_memberships_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/user_tenant_public.py +86 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker.py +100 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_create_request.py +94 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_create_response.py +98 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_created.py +102 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_list_response.py +110 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request.py +102 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request_list_response.py +104 -0
- hatchet_sdk/v0/clients/rest/models/webhook_worker_request_method.py +38 -0
- hatchet_sdk/v0/clients/rest/models/worker.py +239 -0
- hatchet_sdk/v0/clients/rest/models/worker_label.py +102 -0
- hatchet_sdk/v0/clients/rest/models/worker_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/worker_runtime_info.py +103 -0
- hatchet_sdk/v0/clients/rest/models/worker_runtime_sdks.py +38 -0
- hatchet_sdk/v0/clients/rest/models/worker_type.py +38 -0
- hatchet_sdk/v0/clients/rest/models/workflow.py +165 -0
- hatchet_sdk/v0/clients/rest/models/workflow_concurrency.py +107 -0
- hatchet_sdk/v0/clients/rest/models/workflow_deployment_config.py +136 -0
- hatchet_sdk/v0/clients/rest/models/workflow_kind.py +38 -0
- hatchet_sdk/v0/clients/rest/models/workflow_list.py +120 -0
- hatchet_sdk/v0/clients/rest/models/workflow_metrics.py +97 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run.py +188 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_cancel200_response.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_list.py +110 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_direction.py +37 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_field.py +39 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_shape.py +186 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_status.py +42 -0
- hatchet_sdk/v0/clients/rest/models/workflow_run_triggered_by.py +112 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_cancel_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics.py +94 -0
- hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics_counts.py +104 -0
- hatchet_sdk/v0/clients/rest/models/workflow_tag.py +84 -0
- hatchet_sdk/v0/clients/rest/models/workflow_trigger_cron_ref.py +86 -0
- hatchet_sdk/v0/clients/rest/models/workflow_trigger_event_ref.py +86 -0
- hatchet_sdk/v0/clients/rest/models/workflow_triggers.py +141 -0
- hatchet_sdk/v0/clients/rest/models/workflow_update_request.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version.py +170 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_concurrency.py +114 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_definition.py +85 -0
- hatchet_sdk/v0/clients/rest/models/workflow_version_meta.py +123 -0
- hatchet_sdk/v0/clients/rest/models/workflow_workers_count.py +95 -0
- hatchet_sdk/v0/clients/rest/rest.py +187 -0
- hatchet_sdk/v0/clients/rest/tenacity_utils.py +39 -0
- hatchet_sdk/v0/clients/rest_client.py +622 -0
- hatchet_sdk/v0/clients/run_event_listener.py +260 -0
- hatchet_sdk/v0/clients/workflow_listener.py +277 -0
- hatchet_sdk/v0/connection.py +63 -0
- hatchet_sdk/v0/context/__init__.py +1 -0
- hatchet_sdk/v0/context/context.py +446 -0
- hatchet_sdk/v0/context/worker_context.py +28 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2.py +102 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2.pyi +387 -0
- hatchet_sdk/v0/contracts/dispatcher_pb2_grpc.py +621 -0
- hatchet_sdk/v0/contracts/events_pb2.py +46 -0
- hatchet_sdk/v0/contracts/events_pb2.pyi +87 -0
- hatchet_sdk/v0/contracts/events_pb2_grpc.py +274 -0
- hatchet_sdk/v0/contracts/workflows_pb2.py +80 -0
- hatchet_sdk/v0/contracts/workflows_pb2.pyi +312 -0
- hatchet_sdk/v0/contracts/workflows_pb2_grpc.py +277 -0
- hatchet_sdk/v0/features/cron.py +286 -0
- hatchet_sdk/v0/features/scheduled.py +248 -0
- hatchet_sdk/v0/hatchet.py +310 -0
- hatchet_sdk/v0/labels.py +10 -0
- hatchet_sdk/v0/logger.py +13 -0
- hatchet_sdk/v0/metadata.py +2 -0
- hatchet_sdk/v0/opentelemetry/instrumentor.py +396 -0
- hatchet_sdk/v0/rate_limit.py +126 -0
- hatchet_sdk/v0/token.py +27 -0
- hatchet_sdk/v0/utils/aio_utils.py +137 -0
- hatchet_sdk/v0/utils/backoff.py +9 -0
- hatchet_sdk/v0/utils/typing.py +12 -0
- hatchet_sdk/{v2 → v0/v2}/callable.py +8 -8
- hatchet_sdk/{v2 → v0/v2}/concurrency.py +2 -2
- hatchet_sdk/{v2 → v0/v2}/hatchet.py +10 -10
- hatchet_sdk/v0/worker/__init__.py +1 -0
- hatchet_sdk/v0/worker/action_listener_process.py +294 -0
- hatchet_sdk/v0/worker/runner/run_loop_manager.py +112 -0
- hatchet_sdk/v0/worker/runner/runner.py +460 -0
- hatchet_sdk/v0/worker/runner/utils/capture_logs.py +81 -0
- hatchet_sdk/v0/worker/worker.py +391 -0
- hatchet_sdk/{workflow.py → v0/workflow.py} +4 -4
- hatchet_sdk/v0/workflow_run.py +59 -0
- hatchet_sdk/waits.py +120 -0
- hatchet_sdk/worker/__init__.py +0 -1
- hatchet_sdk/worker/action_listener_process.py +80 -55
- hatchet_sdk/worker/runner/run_loop_manager.py +46 -34
- hatchet_sdk/worker/runner/runner.py +82 -87
- hatchet_sdk/worker/runner/utils/capture_logs.py +26 -23
- hatchet_sdk/worker/worker.py +172 -149
- hatchet_sdk/workflow_run.py +7 -21
- {hatchet_sdk-0.47.1.dist-info → hatchet_sdk-1.0.0a1.dist-info}/METADATA +2 -2
- hatchet_sdk-1.0.0a1.dist-info/RECORD +505 -0
- {hatchet_sdk-0.47.1.dist-info → hatchet_sdk-1.0.0a1.dist-info}/entry_points.txt +2 -0
- hatchet_sdk/utils/serialization.py +0 -18
- hatchet_sdk-0.47.1.dist-info/RECORD +0 -237
- /hatchet_sdk/{loader.py → v0/loader.py} +0 -0
- /hatchet_sdk/{semver.py → v0/semver.py} +0 -0
- /hatchet_sdk/{utils → v0/utils}/types.py +0 -0
- /hatchet_sdk/{worker → v0/worker}/runner/utils/error_with_traceback.py +0 -0
- {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
|
+
)
|