blaxel 0.2.34__py3-none-any.whl → 0.2.35__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.
- blaxel/__init__.py +2 -2
- blaxel/core/client/api/agents/create_agent.py +64 -19
- blaxel/core/client/api/agents/delete_agent.py +44 -15
- blaxel/core/client/api/agents/get_agent.py +43 -14
- blaxel/core/client/api/agents/list_agents.py +40 -11
- blaxel/core/client/api/agents/update_agent.py +60 -19
- blaxel/core/client/api/compute/create_sandbox.py +60 -23
- blaxel/core/client/api/compute/delete_sandbox.py +40 -19
- blaxel/core/client/api/compute/get_sandbox.py +39 -18
- blaxel/core/client/api/compute/list_sandboxes.py +40 -19
- blaxel/core/client/api/compute/update_sandbox.py +56 -23
- blaxel/core/client/api/configurations/get_configuration.py +16 -4
- blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
- blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
- blaxel/core/client/api/default/get_template.py +8 -4
- blaxel/core/client/api/functions/create_function.py +62 -19
- blaxel/core/client/api/functions/delete_function.py +46 -15
- blaxel/core/client/api/functions/get_function.py +45 -14
- blaxel/core/client/api/functions/list_functions.py +44 -15
- blaxel/core/client/api/functions/update_function.py +62 -19
- blaxel/core/client/api/images/cleanup_images.py +12 -12
- blaxel/core/client/api/images/delete_image.py +12 -8
- blaxel/core/client/api/images/delete_image_tag.py +12 -8
- blaxel/core/client/api/images/get_image.py +12 -8
- blaxel/core/client/api/images/list_images.py +12 -8
- blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
- blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
- blaxel/core/client/api/integrations/get_integration.py +12 -8
- blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
- blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
- blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
- blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
- blaxel/core/client/api/jobs/create_job.py +20 -12
- blaxel/core/client/api/jobs/create_job_execution.py +22 -16
- blaxel/core/client/api/jobs/delete_job.py +12 -8
- blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
- blaxel/core/client/api/jobs/get_job.py +24 -20
- blaxel/core/client/api/jobs/get_job_execution.py +8 -4
- blaxel/core/client/api/jobs/list_job_executions.py +8 -4
- blaxel/core/client/api/jobs/list_jobs.py +12 -8
- blaxel/core/client/api/jobs/update_job.py +20 -12
- blaxel/core/client/api/locations/list_locations.py +12 -8
- blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
- blaxel/core/client/api/models/create_model.py +52 -23
- blaxel/core/client/api/models/delete_model.py +40 -19
- blaxel/core/client/api/models/get_model.py +40 -19
- blaxel/core/client/api/models/list_models.py +40 -19
- blaxel/core/client/api/models/update_model.py +52 -23
- blaxel/core/client/api/policies/create_policy.py +12 -8
- blaxel/core/client/api/policies/delete_policy.py +12 -8
- blaxel/core/client/api/policies/get_policy.py +12 -8
- blaxel/core/client/api/policies/list_policies.py +12 -8
- blaxel/core/client/api/policies/update_policy.py +12 -8
- blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
- blaxel/core/client/api/sandboxhub/__init__.py +0 -0
- blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
- blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
- blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
- blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
- blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
- blaxel/core/client/api/templates/list_templates.py +12 -8
- blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
- blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
- blaxel/core/client/api/volumes/create_volume.py +56 -23
- blaxel/core/client/api/volumes/delete_volume.py +44 -19
- blaxel/core/client/api/volumes/get_volume.py +40 -19
- blaxel/core/client/api/volumes/list_volumes.py +40 -19
- blaxel/core/client/api/workspaces/create_workspace.py +54 -23
- blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
- blaxel/core/client/api/workspaces/get_workspace.py +42 -19
- blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
- blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
- blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
- blaxel/core/client/api/workspaces/update_workspace.py +50 -19
- blaxel/core/client/models/__init__.py +76 -146
- blaxel/core/client/models/agent.py +43 -47
- blaxel/core/client/models/agent_runtime.py +139 -0
- blaxel/core/client/models/agent_runtime_generation.py +18 -0
- blaxel/core/client/models/agent_spec.py +33 -110
- blaxel/core/client/models/api_key.py +5 -4
- blaxel/core/client/models/core_event.py +5 -5
- blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
- blaxel/core/client/models/create_job_execution_request.py +1 -1
- blaxel/core/client/models/create_job_execution_response.py +13 -9
- blaxel/core/client/models/custom_domain.py +19 -36
- blaxel/core/client/models/custom_domain_metadata.py +4 -3
- blaxel/core/client/models/custom_domain_spec.py +14 -5
- blaxel/core/client/models/custom_domain_spec_status.py +19 -0
- blaxel/core/client/models/entrypoint.py +39 -13
- blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
- blaxel/core/client/models/entrypoint_env.py +3 -3
- blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
- blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
- blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
- blaxel/core/client/models/expiration_policy.py +30 -11
- blaxel/core/client/models/expiration_policy_action.py +17 -0
- blaxel/core/client/models/expiration_policy_type.py +19 -0
- blaxel/core/client/models/flavor.py +13 -5
- blaxel/core/client/models/flavor_type.py +18 -0
- blaxel/core/client/models/form.py +6 -6
- blaxel/core/client/models/function.py +43 -47
- blaxel/core/client/models/function_runtime.py +138 -0
- blaxel/core/client/models/function_runtime_generation.py +18 -0
- blaxel/core/client/models/function_spec.py +27 -73
- blaxel/core/client/models/function_spec_transport.py +18 -0
- blaxel/core/client/models/image.py +19 -36
- blaxel/core/client/models/integration_connection.py +25 -39
- blaxel/core/client/models/integration_connection_spec.py +8 -5
- blaxel/core/client/models/integration_connection_spec_config.py +1 -1
- blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
- blaxel/core/client/models/integration_endpoint.py +41 -11
- blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
- blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
- blaxel/core/client/models/job.py +43 -47
- blaxel/core/client/models/job_execution.py +30 -37
- blaxel/core/client/models/job_execution_metadata.py +3 -3
- blaxel/core/client/models/job_execution_spec.py +2 -2
- blaxel/core/client/models/job_execution_stats.py +5 -5
- blaxel/core/client/models/job_execution_status.py +24 -0
- blaxel/core/client/models/job_execution_task.py +12 -4
- blaxel/core/client/models/job_execution_task_metadata.py +1 -1
- blaxel/core/client/models/job_execution_task_spec.py +2 -2
- blaxel/core/client/models/job_execution_task_status.py +23 -0
- blaxel/core/client/models/job_runtime.py +172 -0
- blaxel/core/client/models/job_runtime_generation.py +18 -0
- blaxel/core/client/models/job_spec.py +20 -88
- blaxel/core/client/models/location_response.py +5 -5
- blaxel/core/client/models/mcp_definition.py +30 -17
- blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
- blaxel/core/client/models/metadata.py +23 -17
- blaxel/core/client/models/metadata_labels.py +4 -1
- blaxel/core/client/models/model.py +43 -47
- blaxel/core/client/models/model_runtime.py +99 -0
- blaxel/core/client/models/model_runtime_type.py +34 -0
- blaxel/core/client/models/model_spec.py +12 -58
- blaxel/core/client/models/o_auth.py +23 -6
- blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
- blaxel/core/client/models/pending_invitation_accept.py +2 -1
- blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
- blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
- blaxel/core/client/models/policy.py +20 -36
- blaxel/core/client/models/policy_location.py +13 -5
- blaxel/core/client/models/policy_location_type.py +19 -0
- blaxel/core/client/models/policy_max_tokens.py +6 -6
- blaxel/core/client/models/policy_resource_type.py +20 -0
- blaxel/core/client/models/policy_spec.py +31 -10
- blaxel/core/client/models/policy_spec_type.py +19 -0
- blaxel/core/client/models/port.py +25 -15
- blaxel/core/client/models/port_protocol.py +19 -0
- blaxel/core/client/models/preview.py +19 -36
- blaxel/core/client/models/preview_metadata.py +12 -10
- blaxel/core/client/models/preview_token.py +19 -36
- blaxel/core/client/models/preview_token_metadata.py +8 -6
- blaxel/core/client/models/repository.py +2 -2
- blaxel/core/client/models/revision_configuration.py +3 -3
- blaxel/core/client/models/sandbox.py +45 -58
- blaxel/core/client/models/sandbox_definition.py +37 -22
- blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
- blaxel/core/client/models/sandbox_error.py +148 -0
- blaxel/core/client/models/sandbox_error_details.py +45 -0
- blaxel/core/client/models/sandbox_lifecycle.py +3 -2
- blaxel/core/client/models/sandbox_runtime.py +145 -0
- blaxel/core/client/models/sandbox_spec.py +33 -134
- blaxel/core/client/models/status.py +25 -0
- blaxel/core/client/models/template.py +8 -7
- blaxel/core/client/models/template_variable.py +5 -5
- blaxel/core/client/models/trigger.py +14 -6
- blaxel/core/client/models/trigger_configuration.py +7 -6
- blaxel/core/client/models/trigger_type.py +19 -0
- blaxel/core/client/models/volume.py +35 -47
- blaxel/core/client/models/volume_attachment.py +6 -4
- blaxel/core/client/models/volume_spec.py +7 -4
- blaxel/core/client/models/volume_state.py +3 -3
- blaxel/core/client/models/volume_template.py +19 -33
- blaxel/core/client/models/volume_template_state.py +12 -4
- blaxel/core/client/models/volume_template_state_status.py +19 -0
- blaxel/core/client/models/volume_template_version.py +12 -4
- blaxel/core/client/models/volume_template_version_status.py +19 -0
- blaxel/core/client/models/workspace.py +35 -25
- blaxel/core/client/models/workspace_runtime.py +3 -2
- blaxel/core/client/models/workspace_status.py +22 -0
- blaxel/core/common/__init__.py +1 -1
- blaxel/core/jobs/__init__.py +0 -1
- blaxel/core/sandbox/__init__.py +2 -0
- blaxel/core/sandbox/client/api/process/post_process.py +8 -4
- blaxel/core/sandbox/client/models/__init__.py +0 -2
- blaxel/core/sandbox/client/models/process_response.py +16 -0
- blaxel/core/sandbox/client/models/process_response_status.py +9 -0
- blaxel/core/sandbox/default/__init__.py +2 -0
- blaxel/core/sandbox/default/interpreter.py +5 -1
- blaxel/core/sandbox/default/preview.py +3 -1
- blaxel/core/sandbox/default/sandbox.py +51 -16
- blaxel/core/sandbox/sync/process.py +2 -1
- blaxel/core/sandbox/sync/sandbox.py +34 -13
- blaxel/core/tools/common.py +16 -2
- blaxel/core/volume/__init__.py +2 -2
- blaxel/core/volume/volume.py +32 -10
- blaxel/langgraph/tools.py +34 -2
- blaxel/openai/tools.py +33 -1
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/RECORD +207 -246
- blaxel/core/client/models/acl.py +0 -133
- blaxel/core/client/models/billable_time_metric.py +0 -89
- blaxel/core/client/models/core_spec.py +0 -194
- blaxel/core/client/models/core_spec_configurations.py +0 -77
- blaxel/core/client/models/histogram_bucket.py +0 -79
- blaxel/core/client/models/histogram_stats.py +0 -88
- blaxel/core/client/models/integration_model.py +0 -162
- blaxel/core/client/models/job_execution_config.py +0 -79
- blaxel/core/client/models/job_metrics.py +0 -262
- blaxel/core/client/models/jobs_chart_value.py +0 -70
- blaxel/core/client/models/jobs_network_chart.py +0 -102
- blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
- blaxel/core/client/models/jobs_total.py +0 -88
- blaxel/core/client/models/last_n_requests_metric.py +0 -97
- blaxel/core/client/models/latency_metric.py +0 -148
- blaxel/core/client/models/logs_response.py +0 -63
- blaxel/core/client/models/logs_response_data.py +0 -99
- blaxel/core/client/models/mcp_definition_form.py +0 -45
- blaxel/core/client/models/memory_allocation_by_name.py +0 -70
- blaxel/core/client/models/memory_allocation_metric.py +0 -61
- blaxel/core/client/models/metric.py +0 -79
- blaxel/core/client/models/metrics.py +0 -273
- blaxel/core/client/models/metrics_models.py +0 -45
- blaxel/core/client/models/metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/pod_template_spec.py +0 -45
- blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
- blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
- blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
- blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
- blaxel/core/client/models/request_total_metric.py +0 -155
- blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
- blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
- blaxel/core/client/models/request_total_response_data.py +0 -97
- blaxel/core/client/models/resource.py +0 -99
- blaxel/core/client/models/resource_log.py +0 -88
- blaxel/core/client/models/resource_log_chart.py +0 -133
- blaxel/core/client/models/resource_log_response.py +0 -83
- blaxel/core/client/models/resource_metrics.py +0 -618
- blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
- blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
- blaxel/core/client/models/resource_trace.py +0 -97
- blaxel/core/client/models/runtime.py +0 -317
- blaxel/core/client/models/runtime_configuration.py +0 -45
- blaxel/core/client/models/runtime_startup_probe.py +0 -45
- blaxel/core/client/models/sandbox_metrics.py +0 -88
- blaxel/core/client/models/serverless_config.py +0 -117
- blaxel/core/client/models/serverless_config_configuration.py +0 -45
- blaxel/core/client/models/start_sandbox.py +0 -98
- blaxel/core/client/models/stop_sandbox.py +0 -98
- blaxel/core/client/models/store_agent.py +0 -181
- blaxel/core/client/models/store_agent_labels.py +0 -45
- blaxel/core/client/models/store_configuration.py +0 -156
- blaxel/core/client/models/store_configuration_option.py +0 -79
- blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
- blaxel/core/client/models/token_rate_metric.py +0 -106
- blaxel/core/client/models/token_rate_metrics.py +0 -124
- blaxel/core/client/models/token_total_metric.py +0 -112
- blaxel/core/client/models/trace_ids_response.py +0 -45
- blaxel/core/client/models/websocket_channel.py +0 -97
- blaxel/core/client/models/websocket_message.py +0 -106
- blaxel/core/sandbox/client/api/root/delete.py +0 -130
- blaxel/core/sandbox/client/api/root/get.py +0 -130
- blaxel/core/sandbox/client/api/root/options.py +0 -130
- blaxel/core/sandbox/client/api/root/patch.py +0 -130
- blaxel/core/sandbox/client/api/root/post.py +0 -130
- blaxel/core/sandbox/client/api/root/put.py +0 -130
- /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
- {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
+
from ..models.job_execution_task_status import JobExecutionTaskStatus
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
@@ -22,13 +23,13 @@ class JobExecutionTask:
|
|
|
22
23
|
conditions (Union[Unset, list['JobExecutionTaskCondition']]): Task conditions
|
|
23
24
|
metadata (Union[Unset, JobExecutionTaskMetadata]): Job execution task metadata
|
|
24
25
|
spec (Union[Unset, JobExecutionTaskSpec]): Job execution task specification
|
|
25
|
-
status (Union[Unset,
|
|
26
|
+
status (Union[Unset, JobExecutionTaskStatus]): Job execution task status
|
|
26
27
|
"""
|
|
27
28
|
|
|
28
29
|
conditions: Union[Unset, list["JobExecutionTaskCondition"]] = UNSET
|
|
29
30
|
metadata: Union[Unset, "JobExecutionTaskMetadata"] = UNSET
|
|
30
31
|
spec: Union[Unset, "JobExecutionTaskSpec"] = UNSET
|
|
31
|
-
status: Union[Unset,
|
|
32
|
+
status: Union[Unset, JobExecutionTaskStatus] = UNSET
|
|
32
33
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
34
|
|
|
34
35
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -58,7 +59,9 @@ class JobExecutionTask:
|
|
|
58
59
|
elif self.spec and isinstance(self.spec, dict):
|
|
59
60
|
spec = self.spec
|
|
60
61
|
|
|
61
|
-
status =
|
|
62
|
+
status: Union[Unset, str] = UNSET
|
|
63
|
+
if not isinstance(self.status, Unset):
|
|
64
|
+
status = self.status.value
|
|
62
65
|
|
|
63
66
|
field_dict: dict[str, Any] = {}
|
|
64
67
|
field_dict.update(self.additional_properties)
|
|
@@ -104,7 +107,12 @@ class JobExecutionTask:
|
|
|
104
107
|
else:
|
|
105
108
|
spec = JobExecutionTaskSpec.from_dict(_spec)
|
|
106
109
|
|
|
107
|
-
|
|
110
|
+
_status = d.pop("status", UNSET)
|
|
111
|
+
status: Union[Unset, JobExecutionTaskStatus]
|
|
112
|
+
if isinstance(_status, Unset):
|
|
113
|
+
status = UNSET
|
|
114
|
+
else:
|
|
115
|
+
status = JobExecutionTaskStatus(_status)
|
|
108
116
|
|
|
109
117
|
job_execution_task = cls(
|
|
110
118
|
conditions=conditions,
|
|
@@ -15,7 +15,7 @@ class JobExecutionTaskMetadata:
|
|
|
15
15
|
Attributes:
|
|
16
16
|
completed_at (Union[Unset, str]): Completion timestamp
|
|
17
17
|
created_at (Union[Unset, str]): Creation timestamp
|
|
18
|
-
name (Union[Unset, str]): Task name
|
|
18
|
+
name (Union[Unset, str]): Task name Example: task-0.
|
|
19
19
|
scheduled_at (Union[Unset, str]): Scheduled timestamp
|
|
20
20
|
started_at (Union[Unset, str]): Start timestamp
|
|
21
21
|
updated_at (Union[Unset, str]): Last update timestamp
|
|
@@ -13,8 +13,8 @@ class JobExecutionTaskSpec:
|
|
|
13
13
|
"""Job execution task specification
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
max_retries (Union[Unset, int]): Maximum number of retries
|
|
17
|
-
timeout (Union[Unset, str]): Task timeout duration
|
|
16
|
+
max_retries (Union[Unset, int]): Maximum number of retries Example: 3.
|
|
17
|
+
timeout (Union[Unset, str]): Task timeout duration Example: 30m.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
max_retries: Union[Unset, int] = UNSET
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class JobExecutionTaskStatus(str, Enum):
|
|
5
|
+
CANCELLED = "cancelled"
|
|
6
|
+
FAILED = "failed"
|
|
7
|
+
PENDING = "pending"
|
|
8
|
+
RECONCILING = "reconciling"
|
|
9
|
+
RUNNING = "running"
|
|
10
|
+
SUCCEEDED = "succeeded"
|
|
11
|
+
UNSPECIFIED = "unspecified"
|
|
12
|
+
|
|
13
|
+
def __str__(self) -> str:
|
|
14
|
+
return str(self.value)
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def _missing_(cls, value: object) -> "JobExecutionTaskStatus | None":
|
|
18
|
+
if isinstance(value, str):
|
|
19
|
+
upper_value = value.upper()
|
|
20
|
+
for member in cls:
|
|
21
|
+
if member.value.upper() == upper_value:
|
|
22
|
+
return member
|
|
23
|
+
return None
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.job_runtime_generation import JobRuntimeGeneration
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.env import Env
|
|
11
|
+
from ..models.port import Port
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="JobRuntime")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class JobRuntime:
|
|
19
|
+
"""Runtime configuration defining how batch job tasks are executed with parallelism and retry settings
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
envs (Union[Unset, list['Env']]): Environment variables injected into job tasks. Supports Kubernetes EnvVar
|
|
23
|
+
format with valueFrom references.
|
|
24
|
+
generation (Union[Unset, JobRuntimeGeneration]): Infrastructure generation: mk2 (containers, 2-10s cold starts)
|
|
25
|
+
or mk3 (microVMs, sub-25ms cold starts) Example: mk3.
|
|
26
|
+
image (Union[Unset, str]): Container image built by Blaxel when deploying with 'bl deploy'. This field is auto-
|
|
27
|
+
populated during deployment.
|
|
28
|
+
max_concurrent_tasks (Union[Unset, int]): Maximum number of tasks that can run simultaneously within a single
|
|
29
|
+
execution Example: 10.
|
|
30
|
+
max_retries (Union[Unset, int]): Number of automatic retry attempts for failed tasks before marking as failed
|
|
31
|
+
Example: 3.
|
|
32
|
+
memory (Union[Unset, int]): Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory
|
|
33
|
+
in MB / 2048, e.g., 4096MB = 2 CPUs). Example: 2048.
|
|
34
|
+
ports (Union[Unset, list['Port']]): Set of ports for a resource
|
|
35
|
+
timeout (Union[Unset, int]): Maximum execution time in seconds before a task is terminated Example: 3600.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
envs: Union[Unset, list["Env"]] = UNSET
|
|
39
|
+
generation: Union[Unset, JobRuntimeGeneration] = UNSET
|
|
40
|
+
image: Union[Unset, str] = UNSET
|
|
41
|
+
max_concurrent_tasks: Union[Unset, int] = UNSET
|
|
42
|
+
max_retries: Union[Unset, int] = UNSET
|
|
43
|
+
memory: Union[Unset, int] = UNSET
|
|
44
|
+
ports: Union[Unset, list["Port"]] = UNSET
|
|
45
|
+
timeout: Union[Unset, int] = UNSET
|
|
46
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
47
|
+
|
|
48
|
+
def to_dict(self) -> dict[str, Any]:
|
|
49
|
+
envs: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
50
|
+
if not isinstance(self.envs, Unset):
|
|
51
|
+
envs = []
|
|
52
|
+
for envs_item_data in self.envs:
|
|
53
|
+
if type(envs_item_data) is dict:
|
|
54
|
+
envs_item = envs_item_data
|
|
55
|
+
else:
|
|
56
|
+
envs_item = envs_item_data.to_dict()
|
|
57
|
+
envs.append(envs_item)
|
|
58
|
+
|
|
59
|
+
generation: Union[Unset, str] = UNSET
|
|
60
|
+
if not isinstance(self.generation, Unset):
|
|
61
|
+
generation = self.generation.value
|
|
62
|
+
|
|
63
|
+
image = self.image
|
|
64
|
+
|
|
65
|
+
max_concurrent_tasks = self.max_concurrent_tasks
|
|
66
|
+
|
|
67
|
+
max_retries = self.max_retries
|
|
68
|
+
|
|
69
|
+
memory = self.memory
|
|
70
|
+
|
|
71
|
+
ports: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
72
|
+
if not isinstance(self.ports, Unset):
|
|
73
|
+
ports = []
|
|
74
|
+
for componentsschemas_ports_item_data in self.ports:
|
|
75
|
+
if type(componentsschemas_ports_item_data) is dict:
|
|
76
|
+
componentsschemas_ports_item = componentsschemas_ports_item_data
|
|
77
|
+
else:
|
|
78
|
+
componentsschemas_ports_item = componentsschemas_ports_item_data.to_dict()
|
|
79
|
+
ports.append(componentsschemas_ports_item)
|
|
80
|
+
|
|
81
|
+
timeout = self.timeout
|
|
82
|
+
|
|
83
|
+
field_dict: dict[str, Any] = {}
|
|
84
|
+
field_dict.update(self.additional_properties)
|
|
85
|
+
field_dict.update({})
|
|
86
|
+
if envs is not UNSET:
|
|
87
|
+
field_dict["envs"] = envs
|
|
88
|
+
if generation is not UNSET:
|
|
89
|
+
field_dict["generation"] = generation
|
|
90
|
+
if image is not UNSET:
|
|
91
|
+
field_dict["image"] = image
|
|
92
|
+
if max_concurrent_tasks is not UNSET:
|
|
93
|
+
field_dict["maxConcurrentTasks"] = max_concurrent_tasks
|
|
94
|
+
if max_retries is not UNSET:
|
|
95
|
+
field_dict["maxRetries"] = max_retries
|
|
96
|
+
if memory is not UNSET:
|
|
97
|
+
field_dict["memory"] = memory
|
|
98
|
+
if ports is not UNSET:
|
|
99
|
+
field_dict["ports"] = ports
|
|
100
|
+
if timeout is not UNSET:
|
|
101
|
+
field_dict["timeout"] = timeout
|
|
102
|
+
|
|
103
|
+
return field_dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
107
|
+
from ..models.env import Env
|
|
108
|
+
from ..models.port import Port
|
|
109
|
+
|
|
110
|
+
if not src_dict:
|
|
111
|
+
return None
|
|
112
|
+
d = src_dict.copy()
|
|
113
|
+
envs = []
|
|
114
|
+
_envs = d.pop("envs", UNSET)
|
|
115
|
+
for envs_item_data in _envs or []:
|
|
116
|
+
envs_item = Env.from_dict(envs_item_data)
|
|
117
|
+
|
|
118
|
+
envs.append(envs_item)
|
|
119
|
+
|
|
120
|
+
_generation = d.pop("generation", UNSET)
|
|
121
|
+
generation: Union[Unset, JobRuntimeGeneration]
|
|
122
|
+
if isinstance(_generation, Unset):
|
|
123
|
+
generation = UNSET
|
|
124
|
+
else:
|
|
125
|
+
generation = JobRuntimeGeneration(_generation)
|
|
126
|
+
|
|
127
|
+
image = d.pop("image", UNSET)
|
|
128
|
+
|
|
129
|
+
max_concurrent_tasks = d.pop("maxConcurrentTasks", d.pop("max_concurrent_tasks", UNSET))
|
|
130
|
+
|
|
131
|
+
max_retries = d.pop("maxRetries", d.pop("max_retries", UNSET))
|
|
132
|
+
|
|
133
|
+
memory = d.pop("memory", UNSET)
|
|
134
|
+
|
|
135
|
+
ports = []
|
|
136
|
+
_ports = d.pop("ports", UNSET)
|
|
137
|
+
for componentsschemas_ports_item_data in _ports or []:
|
|
138
|
+
componentsschemas_ports_item = Port.from_dict(componentsschemas_ports_item_data)
|
|
139
|
+
|
|
140
|
+
ports.append(componentsschemas_ports_item)
|
|
141
|
+
|
|
142
|
+
timeout = d.pop("timeout", UNSET)
|
|
143
|
+
|
|
144
|
+
job_runtime = cls(
|
|
145
|
+
envs=envs,
|
|
146
|
+
generation=generation,
|
|
147
|
+
image=image,
|
|
148
|
+
max_concurrent_tasks=max_concurrent_tasks,
|
|
149
|
+
max_retries=max_retries,
|
|
150
|
+
memory=memory,
|
|
151
|
+
ports=ports,
|
|
152
|
+
timeout=timeout,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
job_runtime.additional_properties = d
|
|
156
|
+
return job_runtime
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def additional_keys(self) -> list[str]:
|
|
160
|
+
return list(self.additional_properties.keys())
|
|
161
|
+
|
|
162
|
+
def __getitem__(self, key: str) -> Any:
|
|
163
|
+
return self.additional_properties[key]
|
|
164
|
+
|
|
165
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
166
|
+
self.additional_properties[key] = value
|
|
167
|
+
|
|
168
|
+
def __delitem__(self, key: str) -> None:
|
|
169
|
+
del self.additional_properties[key]
|
|
170
|
+
|
|
171
|
+
def __contains__(self, key: str) -> bool:
|
|
172
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class JobRuntimeGeneration(str, Enum):
|
|
5
|
+
MK2 = "mk2"
|
|
6
|
+
MK3 = "mk3"
|
|
7
|
+
|
|
8
|
+
def __str__(self) -> str:
|
|
9
|
+
return str(self.value)
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
def _missing_(cls, value: object) -> "JobRuntimeGeneration | None":
|
|
13
|
+
if isinstance(value, str):
|
|
14
|
+
upper_value = value.upper()
|
|
15
|
+
for member in cls:
|
|
16
|
+
if member.value.upper() == upper_value:
|
|
17
|
+
return member
|
|
18
|
+
return None
|
|
@@ -6,10 +6,8 @@ from attrs import field as _attrs_field
|
|
|
6
6
|
from ..types import UNSET, Unset
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
from ..models.
|
|
10
|
-
from ..models.flavor import Flavor
|
|
9
|
+
from ..models.job_runtime import JobRuntime
|
|
11
10
|
from ..models.revision_configuration import RevisionConfiguration
|
|
12
|
-
from ..models.runtime import Runtime
|
|
13
11
|
from ..models.trigger import Trigger
|
|
14
12
|
|
|
15
13
|
|
|
@@ -18,64 +16,36 @@ T = TypeVar("T", bound="JobSpec")
|
|
|
18
16
|
|
|
19
17
|
@_attrs_define
|
|
20
18
|
class JobSpec:
|
|
21
|
-
"""
|
|
19
|
+
"""Configuration for a batch job including execution parameters, parallelism settings, and deployment region
|
|
22
20
|
|
|
23
21
|
Attributes:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
|
27
|
-
integration_connections (Union[Unset, list[str]]):
|
|
22
|
+
enabled (Union[Unset, bool]): When false, the job is disabled and new executions cannot be triggered Default:
|
|
23
|
+
True. Example: True.
|
|
28
24
|
policies (Union[Unset, list[str]]):
|
|
25
|
+
region (Union[Unset, str]): Region where the job should be created (e.g. us-was-1, eu-lon-1) Example: us-was-1.
|
|
29
26
|
revision (Union[Unset, RevisionConfiguration]): Revision configuration
|
|
30
|
-
runtime (Union[Unset,
|
|
31
|
-
|
|
32
|
-
region (Union[Unset, str]): Region where the job should be created (e.g. us-was-1, eu-lon-1)
|
|
27
|
+
runtime (Union[Unset, JobRuntime]): Runtime configuration defining how batch job tasks are executed with
|
|
28
|
+
parallelism and retry settings
|
|
33
29
|
triggers (Union[Unset, list['Trigger']]): Triggers to use your agent
|
|
34
30
|
"""
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
enabled: Union[Unset, bool] = UNSET
|
|
38
|
-
flavors: Union[Unset, list["Flavor"]] = UNSET
|
|
39
|
-
integration_connections: Union[Unset, list[str]] = UNSET
|
|
32
|
+
enabled: Union[Unset, bool] = True
|
|
40
33
|
policies: Union[Unset, list[str]] = UNSET
|
|
41
|
-
revision: Union[Unset, "RevisionConfiguration"] = UNSET
|
|
42
|
-
runtime: Union[Unset, "Runtime"] = UNSET
|
|
43
|
-
sandbox: Union[Unset, bool] = UNSET
|
|
44
34
|
region: Union[Unset, str] = UNSET
|
|
35
|
+
revision: Union[Unset, "RevisionConfiguration"] = UNSET
|
|
36
|
+
runtime: Union[Unset, "JobRuntime"] = UNSET
|
|
45
37
|
triggers: Union[Unset, list["Trigger"]] = UNSET
|
|
46
38
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
47
39
|
|
|
48
40
|
def to_dict(self) -> dict[str, Any]:
|
|
49
|
-
configurations: Union[Unset, dict[str, Any]] = UNSET
|
|
50
|
-
if (
|
|
51
|
-
self.configurations
|
|
52
|
-
and not isinstance(self.configurations, Unset)
|
|
53
|
-
and not isinstance(self.configurations, dict)
|
|
54
|
-
):
|
|
55
|
-
configurations = self.configurations.to_dict()
|
|
56
|
-
elif self.configurations and isinstance(self.configurations, dict):
|
|
57
|
-
configurations = self.configurations
|
|
58
|
-
|
|
59
41
|
enabled = self.enabled
|
|
60
42
|
|
|
61
|
-
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
62
|
-
if not isinstance(self.flavors, Unset):
|
|
63
|
-
flavors = []
|
|
64
|
-
for componentsschemas_flavors_item_data in self.flavors:
|
|
65
|
-
if type(componentsschemas_flavors_item_data) is dict:
|
|
66
|
-
componentsschemas_flavors_item = componentsschemas_flavors_item_data
|
|
67
|
-
else:
|
|
68
|
-
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
|
69
|
-
flavors.append(componentsschemas_flavors_item)
|
|
70
|
-
|
|
71
|
-
integration_connections: Union[Unset, list[str]] = UNSET
|
|
72
|
-
if not isinstance(self.integration_connections, Unset):
|
|
73
|
-
integration_connections = self.integration_connections
|
|
74
|
-
|
|
75
43
|
policies: Union[Unset, list[str]] = UNSET
|
|
76
44
|
if not isinstance(self.policies, Unset):
|
|
77
45
|
policies = self.policies
|
|
78
46
|
|
|
47
|
+
region = self.region
|
|
48
|
+
|
|
79
49
|
revision: Union[Unset, dict[str, Any]] = UNSET
|
|
80
50
|
if (
|
|
81
51
|
self.revision
|
|
@@ -96,10 +66,6 @@ class JobSpec:
|
|
|
96
66
|
elif self.runtime and isinstance(self.runtime, dict):
|
|
97
67
|
runtime = self.runtime
|
|
98
68
|
|
|
99
|
-
sandbox = self.sandbox
|
|
100
|
-
|
|
101
|
-
region = self.region
|
|
102
|
-
|
|
103
69
|
triggers: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
104
70
|
if not isinstance(self.triggers, Unset):
|
|
105
71
|
triggers = []
|
|
@@ -113,24 +79,16 @@ class JobSpec:
|
|
|
113
79
|
field_dict: dict[str, Any] = {}
|
|
114
80
|
field_dict.update(self.additional_properties)
|
|
115
81
|
field_dict.update({})
|
|
116
|
-
if configurations is not UNSET:
|
|
117
|
-
field_dict["configurations"] = configurations
|
|
118
82
|
if enabled is not UNSET:
|
|
119
83
|
field_dict["enabled"] = enabled
|
|
120
|
-
if flavors is not UNSET:
|
|
121
|
-
field_dict["flavors"] = flavors
|
|
122
|
-
if integration_connections is not UNSET:
|
|
123
|
-
field_dict["integrationConnections"] = integration_connections
|
|
124
84
|
if policies is not UNSET:
|
|
125
85
|
field_dict["policies"] = policies
|
|
86
|
+
if region is not UNSET:
|
|
87
|
+
field_dict["region"] = region
|
|
126
88
|
if revision is not UNSET:
|
|
127
89
|
field_dict["revision"] = revision
|
|
128
90
|
if runtime is not UNSET:
|
|
129
91
|
field_dict["runtime"] = runtime
|
|
130
|
-
if sandbox is not UNSET:
|
|
131
|
-
field_dict["sandbox"] = sandbox
|
|
132
|
-
if region is not UNSET:
|
|
133
|
-
field_dict["region"] = region
|
|
134
92
|
if triggers is not UNSET:
|
|
135
93
|
field_dict["triggers"] = triggers
|
|
136
94
|
|
|
@@ -138,37 +96,19 @@ class JobSpec:
|
|
|
138
96
|
|
|
139
97
|
@classmethod
|
|
140
98
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
141
|
-
from ..models.
|
|
142
|
-
from ..models.flavor import Flavor
|
|
99
|
+
from ..models.job_runtime import JobRuntime
|
|
143
100
|
from ..models.revision_configuration import RevisionConfiguration
|
|
144
|
-
from ..models.runtime import Runtime
|
|
145
101
|
from ..models.trigger import Trigger
|
|
146
102
|
|
|
147
103
|
if not src_dict:
|
|
148
104
|
return None
|
|
149
105
|
d = src_dict.copy()
|
|
150
|
-
_configurations = d.pop("configurations", UNSET)
|
|
151
|
-
configurations: Union[Unset, CoreSpecConfigurations]
|
|
152
|
-
if isinstance(_configurations, Unset):
|
|
153
|
-
configurations = UNSET
|
|
154
|
-
else:
|
|
155
|
-
configurations = CoreSpecConfigurations.from_dict(_configurations)
|
|
156
|
-
|
|
157
106
|
enabled = d.pop("enabled", UNSET)
|
|
158
107
|
|
|
159
|
-
flavors = []
|
|
160
|
-
_flavors = d.pop("flavors", UNSET)
|
|
161
|
-
for componentsschemas_flavors_item_data in _flavors or []:
|
|
162
|
-
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
|
163
|
-
|
|
164
|
-
flavors.append(componentsschemas_flavors_item)
|
|
165
|
-
|
|
166
|
-
integration_connections = cast(
|
|
167
|
-
list[str], d.pop("integrationConnections", d.pop("integration_connections", UNSET))
|
|
168
|
-
)
|
|
169
|
-
|
|
170
108
|
policies = cast(list[str], d.pop("policies", UNSET))
|
|
171
109
|
|
|
110
|
+
region = d.pop("region", UNSET)
|
|
111
|
+
|
|
172
112
|
_revision = d.pop("revision", UNSET)
|
|
173
113
|
revision: Union[Unset, RevisionConfiguration]
|
|
174
114
|
if isinstance(_revision, Unset):
|
|
@@ -177,15 +117,11 @@ class JobSpec:
|
|
|
177
117
|
revision = RevisionConfiguration.from_dict(_revision)
|
|
178
118
|
|
|
179
119
|
_runtime = d.pop("runtime", UNSET)
|
|
180
|
-
runtime: Union[Unset,
|
|
120
|
+
runtime: Union[Unset, JobRuntime]
|
|
181
121
|
if isinstance(_runtime, Unset):
|
|
182
122
|
runtime = UNSET
|
|
183
123
|
else:
|
|
184
|
-
runtime =
|
|
185
|
-
|
|
186
|
-
sandbox = d.pop("sandbox", UNSET)
|
|
187
|
-
|
|
188
|
-
region = d.pop("region", UNSET)
|
|
124
|
+
runtime = JobRuntime.from_dict(_runtime)
|
|
189
125
|
|
|
190
126
|
triggers = []
|
|
191
127
|
_triggers = d.pop("triggers", UNSET)
|
|
@@ -197,15 +133,11 @@ class JobSpec:
|
|
|
197
133
|
triggers.append(componentsschemas_triggers_item)
|
|
198
134
|
|
|
199
135
|
job_spec = cls(
|
|
200
|
-
configurations=configurations,
|
|
201
136
|
enabled=enabled,
|
|
202
|
-
flavors=flavors,
|
|
203
|
-
integration_connections=integration_connections,
|
|
204
137
|
policies=policies,
|
|
138
|
+
region=region,
|
|
205
139
|
revision=revision,
|
|
206
140
|
runtime=runtime,
|
|
207
|
-
sandbox=sandbox,
|
|
208
|
-
region=region,
|
|
209
141
|
triggers=triggers,
|
|
210
142
|
)
|
|
211
143
|
|
|
@@ -17,12 +17,12 @@ class LocationResponse:
|
|
|
17
17
|
"""Location availability for policies
|
|
18
18
|
|
|
19
19
|
Attributes:
|
|
20
|
-
continent (Union[Unset, str]): Continent of the location
|
|
21
|
-
country (Union[Unset, str]): Country of the location
|
|
20
|
+
continent (Union[Unset, str]): Continent of the location Example: NA.
|
|
21
|
+
country (Union[Unset, str]): Country of the location Example: US.
|
|
22
22
|
flavors (Union[Unset, list['Flavor']]): Hardware flavors available in the location
|
|
23
|
-
location (Union[Unset, str]): Name of the location
|
|
24
|
-
region (Union[Unset, str]): Region of the location
|
|
25
|
-
status (Union[Unset, str]): Status of the location
|
|
23
|
+
location (Union[Unset, str]): Name of the location Example: Portland.
|
|
24
|
+
region (Union[Unset, str]): Region of the location Example: us-pdx-1.
|
|
25
|
+
status (Union[Unset, str]): Status of the location Example: healthy.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
continent: Union[Unset, str] = UNSET
|
|
@@ -6,8 +6,9 @@ from attrs import field as _attrs_field
|
|
|
6
6
|
from ..types import UNSET, Unset
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
from ..models.
|
|
10
|
-
from ..models.
|
|
9
|
+
from ..models.entrypoint import Entrypoint
|
|
10
|
+
from ..models.form import Form
|
|
11
|
+
from ..models.mcp_definition_categories_item import MCPDefinitionCategoriesItem
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
T = TypeVar("T", bound="MCPDefinition")
|
|
@@ -20,13 +21,13 @@ class MCPDefinition:
|
|
|
20
21
|
Attributes:
|
|
21
22
|
created_at (Union[Unset, str]): The date and time when the resource was created
|
|
22
23
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
|
23
|
-
categories (Union[Unset, list[
|
|
24
|
+
categories (Union[Unset, list['MCPDefinitionCategoriesItem']]): Categories of the artifact
|
|
24
25
|
coming_soon (Union[Unset, bool]): If the artifact is coming soon
|
|
25
26
|
description (Union[Unset, str]): Description of the artifact
|
|
26
27
|
display_name (Union[Unset, str]): Display name of the artifact
|
|
27
28
|
enterprise (Union[Unset, bool]): If the artifact is enterprise
|
|
28
|
-
entrypoint (Union[Unset,
|
|
29
|
-
form (Union[Unset,
|
|
29
|
+
entrypoint (Union[Unset, Entrypoint]): Entrypoint of the artifact
|
|
30
|
+
form (Union[Unset, Form]): Form of the artifact
|
|
30
31
|
hidden (Union[Unset, bool]): If the artifact is hidden
|
|
31
32
|
hidden_secrets (Union[Unset, list[str]]): Hidden secrets of the artifact
|
|
32
33
|
icon (Union[Unset, str]): Icon of the artifact
|
|
@@ -40,13 +41,13 @@ class MCPDefinition:
|
|
|
40
41
|
|
|
41
42
|
created_at: Union[Unset, str] = UNSET
|
|
42
43
|
updated_at: Union[Unset, str] = UNSET
|
|
43
|
-
categories: Union[Unset, list[
|
|
44
|
+
categories: Union[Unset, list["MCPDefinitionCategoriesItem"]] = UNSET
|
|
44
45
|
coming_soon: Union[Unset, bool] = UNSET
|
|
45
46
|
description: Union[Unset, str] = UNSET
|
|
46
47
|
display_name: Union[Unset, str] = UNSET
|
|
47
48
|
enterprise: Union[Unset, bool] = UNSET
|
|
48
|
-
entrypoint: Union[Unset, "
|
|
49
|
-
form: Union[Unset, "
|
|
49
|
+
entrypoint: Union[Unset, "Entrypoint"] = UNSET
|
|
50
|
+
form: Union[Unset, "Form"] = UNSET
|
|
50
51
|
hidden: Union[Unset, bool] = UNSET
|
|
51
52
|
hidden_secrets: Union[Unset, list[str]] = UNSET
|
|
52
53
|
icon: Union[Unset, str] = UNSET
|
|
@@ -63,9 +64,15 @@ class MCPDefinition:
|
|
|
63
64
|
|
|
64
65
|
updated_at = self.updated_at
|
|
65
66
|
|
|
66
|
-
categories: Union[Unset, list[Any]] = UNSET
|
|
67
|
+
categories: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
67
68
|
if not isinstance(self.categories, Unset):
|
|
68
|
-
categories =
|
|
69
|
+
categories = []
|
|
70
|
+
for categories_item_data in self.categories:
|
|
71
|
+
if type(categories_item_data) is dict:
|
|
72
|
+
categories_item = categories_item_data
|
|
73
|
+
else:
|
|
74
|
+
categories_item = categories_item_data.to_dict()
|
|
75
|
+
categories.append(categories_item)
|
|
69
76
|
|
|
70
77
|
coming_soon = self.coming_soon
|
|
71
78
|
|
|
@@ -155,8 +162,9 @@ class MCPDefinition:
|
|
|
155
162
|
|
|
156
163
|
@classmethod
|
|
157
164
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
158
|
-
from ..models.
|
|
159
|
-
from ..models.
|
|
165
|
+
from ..models.entrypoint import Entrypoint
|
|
166
|
+
from ..models.form import Form
|
|
167
|
+
from ..models.mcp_definition_categories_item import MCPDefinitionCategoriesItem
|
|
160
168
|
|
|
161
169
|
if not src_dict:
|
|
162
170
|
return None
|
|
@@ -165,7 +173,12 @@ class MCPDefinition:
|
|
|
165
173
|
|
|
166
174
|
updated_at = d.pop("updatedAt", d.pop("updated_at", UNSET))
|
|
167
175
|
|
|
168
|
-
categories =
|
|
176
|
+
categories = []
|
|
177
|
+
_categories = d.pop("categories", UNSET)
|
|
178
|
+
for categories_item_data in _categories or []:
|
|
179
|
+
categories_item = MCPDefinitionCategoriesItem.from_dict(categories_item_data)
|
|
180
|
+
|
|
181
|
+
categories.append(categories_item)
|
|
169
182
|
|
|
170
183
|
coming_soon = d.pop("coming_soon", UNSET)
|
|
171
184
|
|
|
@@ -176,18 +189,18 @@ class MCPDefinition:
|
|
|
176
189
|
enterprise = d.pop("enterprise", UNSET)
|
|
177
190
|
|
|
178
191
|
_entrypoint = d.pop("entrypoint", UNSET)
|
|
179
|
-
entrypoint: Union[Unset,
|
|
192
|
+
entrypoint: Union[Unset, Entrypoint]
|
|
180
193
|
if isinstance(_entrypoint, Unset):
|
|
181
194
|
entrypoint = UNSET
|
|
182
195
|
else:
|
|
183
|
-
entrypoint =
|
|
196
|
+
entrypoint = Entrypoint.from_dict(_entrypoint)
|
|
184
197
|
|
|
185
198
|
_form = d.pop("form", UNSET)
|
|
186
|
-
form: Union[Unset,
|
|
199
|
+
form: Union[Unset, Form]
|
|
187
200
|
if isinstance(_form, Unset):
|
|
188
201
|
form = UNSET
|
|
189
202
|
else:
|
|
190
|
-
form =
|
|
203
|
+
form = Form.from_dict(_form)
|
|
191
204
|
|
|
192
205
|
hidden = d.pop("hidden", UNSET)
|
|
193
206
|
|
|
@@ -3,12 +3,12 @@ from typing import Any, TypeVar
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
-
T = TypeVar("T", bound="
|
|
6
|
+
T = TypeVar("T", bound="MCPDefinitionCategoriesItem")
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@_attrs_define
|
|
10
|
-
class
|
|
11
|
-
"""
|
|
10
|
+
class MCPDefinitionCategoriesItem:
|
|
11
|
+
""" """
|
|
12
12
|
|
|
13
13
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
14
14
|
|
|
@@ -23,10 +23,10 @@ class JobMetricsTasksTotal:
|
|
|
23
23
|
if not src_dict:
|
|
24
24
|
return None
|
|
25
25
|
d = src_dict.copy()
|
|
26
|
-
|
|
26
|
+
mcp_definition_categories_item = cls()
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
return
|
|
28
|
+
mcp_definition_categories_item.additional_properties = d
|
|
29
|
+
return mcp_definition_categories_item
|
|
30
30
|
|
|
31
31
|
@property
|
|
32
32
|
def additional_keys(self) -> list[str]:
|