blaxel 0.2.33__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/__init__.py +2 -1
- 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 +85 -26
- blaxel/core/sandbox/sync/process.py +2 -1
- blaxel/core/sandbox/sync/sandbox.py +68 -23
- blaxel/core/sandbox/types.py +3 -0
- blaxel/core/tools/common.py +16 -2
- blaxel/core/volume/__init__.py +2 -2
- blaxel/core/volume/volume.py +227 -11
- blaxel/langgraph/tools.py +34 -2
- blaxel/openai/tools.py +33 -1
- {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
- {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/RECORD +209 -248
- 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.33.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
- {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
|
@@ -13,29 +13,31 @@ class PreviewMetadata:
|
|
|
13
13
|
"""PreviewMetadata
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
+
name (str): Preview name
|
|
16
17
|
created_at (Union[Unset, str]): The date and time when the resource was created
|
|
17
18
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
|
18
19
|
created_by (Union[Unset, str]): The user or service account who created the resource
|
|
19
20
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
|
20
21
|
display_name (Union[Unset, str]): Model display name
|
|
21
|
-
name (Union[Unset, str]): Preview name
|
|
22
22
|
resource_name (Union[Unset, str]): Resource name
|
|
23
23
|
resource_type (Union[Unset, str]): Resource type
|
|
24
24
|
workspace (Union[Unset, str]): Workspace name
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
+
name: str
|
|
27
28
|
created_at: Union[Unset, str] = UNSET
|
|
28
29
|
updated_at: Union[Unset, str] = UNSET
|
|
29
30
|
created_by: Union[Unset, str] = UNSET
|
|
30
31
|
updated_by: Union[Unset, str] = UNSET
|
|
31
32
|
display_name: Union[Unset, str] = UNSET
|
|
32
|
-
name: Union[Unset, str] = UNSET
|
|
33
33
|
resource_name: Union[Unset, str] = UNSET
|
|
34
34
|
resource_type: Union[Unset, str] = UNSET
|
|
35
35
|
workspace: Union[Unset, str] = UNSET
|
|
36
36
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
37
|
|
|
38
38
|
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
name = self.name
|
|
40
|
+
|
|
39
41
|
created_at = self.created_at
|
|
40
42
|
|
|
41
43
|
updated_at = self.updated_at
|
|
@@ -46,8 +48,6 @@ class PreviewMetadata:
|
|
|
46
48
|
|
|
47
49
|
display_name = self.display_name
|
|
48
50
|
|
|
49
|
-
name = self.name
|
|
50
|
-
|
|
51
51
|
resource_name = self.resource_name
|
|
52
52
|
|
|
53
53
|
resource_type = self.resource_type
|
|
@@ -56,7 +56,11 @@ class PreviewMetadata:
|
|
|
56
56
|
|
|
57
57
|
field_dict: dict[str, Any] = {}
|
|
58
58
|
field_dict.update(self.additional_properties)
|
|
59
|
-
field_dict.update(
|
|
59
|
+
field_dict.update(
|
|
60
|
+
{
|
|
61
|
+
"name": name,
|
|
62
|
+
}
|
|
63
|
+
)
|
|
60
64
|
if created_at is not UNSET:
|
|
61
65
|
field_dict["createdAt"] = created_at
|
|
62
66
|
if updated_at is not UNSET:
|
|
@@ -67,8 +71,6 @@ class PreviewMetadata:
|
|
|
67
71
|
field_dict["updatedBy"] = updated_by
|
|
68
72
|
if display_name is not UNSET:
|
|
69
73
|
field_dict["displayName"] = display_name
|
|
70
|
-
if name is not UNSET:
|
|
71
|
-
field_dict["name"] = name
|
|
72
74
|
if resource_name is not UNSET:
|
|
73
75
|
field_dict["resourceName"] = resource_name
|
|
74
76
|
if resource_type is not UNSET:
|
|
@@ -83,6 +85,8 @@ class PreviewMetadata:
|
|
|
83
85
|
if not src_dict:
|
|
84
86
|
return None
|
|
85
87
|
d = src_dict.copy()
|
|
88
|
+
name = d.pop("name")
|
|
89
|
+
|
|
86
90
|
created_at = d.pop("createdAt", d.pop("created_at", UNSET))
|
|
87
91
|
|
|
88
92
|
updated_at = d.pop("updatedAt", d.pop("updated_at", UNSET))
|
|
@@ -93,8 +97,6 @@ class PreviewMetadata:
|
|
|
93
97
|
|
|
94
98
|
display_name = d.pop("displayName", d.pop("display_name", UNSET))
|
|
95
99
|
|
|
96
|
-
name = d.pop("name", UNSET)
|
|
97
|
-
|
|
98
100
|
resource_name = d.pop("resourceName", d.pop("resource_name", UNSET))
|
|
99
101
|
|
|
100
102
|
resource_type = d.pop("resourceType", d.pop("resource_type", UNSET))
|
|
@@ -102,12 +104,12 @@ class PreviewMetadata:
|
|
|
102
104
|
workspace = d.pop("workspace", UNSET)
|
|
103
105
|
|
|
104
106
|
preview_metadata = cls(
|
|
107
|
+
name=name,
|
|
105
108
|
created_at=created_at,
|
|
106
109
|
updated_at=updated_at,
|
|
107
110
|
created_by=created_by,
|
|
108
111
|
updated_by=updated_by,
|
|
109
112
|
display_name=display_name,
|
|
110
|
-
name=name,
|
|
111
113
|
resource_name=resource_name,
|
|
112
114
|
resource_type=resource_type,
|
|
113
115
|
workspace=workspace,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
2
2
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
5
5
|
|
|
6
|
-
from ..types import UNSET, Unset
|
|
7
|
-
|
|
8
6
|
if TYPE_CHECKING:
|
|
9
7
|
from ..models.preview_token_metadata import PreviewTokenMetadata
|
|
10
8
|
from ..models.preview_token_spec import PreviewTokenSpec
|
|
@@ -18,38 +16,33 @@ class PreviewToken:
|
|
|
18
16
|
"""Token for a Preview
|
|
19
17
|
|
|
20
18
|
Attributes:
|
|
21
|
-
metadata (
|
|
22
|
-
spec (
|
|
19
|
+
metadata (PreviewTokenMetadata): PreviewTokenMetadata
|
|
20
|
+
spec (PreviewTokenSpec): Spec for a Preview Token
|
|
23
21
|
"""
|
|
24
22
|
|
|
25
|
-
metadata:
|
|
26
|
-
spec:
|
|
23
|
+
metadata: "PreviewTokenMetadata"
|
|
24
|
+
spec: "PreviewTokenSpec"
|
|
27
25
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
26
|
|
|
29
27
|
def to_dict(self) -> dict[str, Any]:
|
|
30
|
-
metadata
|
|
31
|
-
if (
|
|
32
|
-
self.metadata
|
|
33
|
-
and not isinstance(self.metadata, Unset)
|
|
34
|
-
and not isinstance(self.metadata, dict)
|
|
35
|
-
):
|
|
36
|
-
metadata = self.metadata.to_dict()
|
|
37
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
28
|
+
if type(self.metadata) is dict:
|
|
38
29
|
metadata = self.metadata
|
|
30
|
+
else:
|
|
31
|
+
metadata = self.metadata.to_dict()
|
|
39
32
|
|
|
40
|
-
spec
|
|
41
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
42
|
-
spec = self.spec.to_dict()
|
|
43
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
33
|
+
if type(self.spec) is dict:
|
|
44
34
|
spec = self.spec
|
|
35
|
+
else:
|
|
36
|
+
spec = self.spec.to_dict()
|
|
45
37
|
|
|
46
38
|
field_dict: dict[str, Any] = {}
|
|
47
39
|
field_dict.update(self.additional_properties)
|
|
48
|
-
field_dict.update(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"metadata": metadata,
|
|
43
|
+
"spec": spec,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
53
46
|
|
|
54
47
|
return field_dict
|
|
55
48
|
|
|
@@ -61,19 +54,9 @@ class PreviewToken:
|
|
|
61
54
|
if not src_dict:
|
|
62
55
|
return None
|
|
63
56
|
d = src_dict.copy()
|
|
64
|
-
|
|
65
|
-
metadata: Union[Unset, PreviewTokenMetadata]
|
|
66
|
-
if isinstance(_metadata, Unset):
|
|
67
|
-
metadata = UNSET
|
|
68
|
-
else:
|
|
69
|
-
metadata = PreviewTokenMetadata.from_dict(_metadata)
|
|
57
|
+
metadata = PreviewTokenMetadata.from_dict(d.pop("metadata"))
|
|
70
58
|
|
|
71
|
-
|
|
72
|
-
spec: Union[Unset, PreviewTokenSpec]
|
|
73
|
-
if isinstance(_spec, Unset):
|
|
74
|
-
spec = UNSET
|
|
75
|
-
else:
|
|
76
|
-
spec = PreviewTokenSpec.from_dict(_spec)
|
|
59
|
+
spec = PreviewTokenSpec.from_dict(d.pop("spec"))
|
|
77
60
|
|
|
78
61
|
preview_token = cls(
|
|
79
62
|
metadata=metadata,
|
|
@@ -13,14 +13,14 @@ class PreviewTokenMetadata:
|
|
|
13
13
|
"""PreviewTokenMetadata
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
name (
|
|
16
|
+
name (str): Token name
|
|
17
17
|
preview_name (Union[Unset, str]): Preview name
|
|
18
18
|
resource_name (Union[Unset, str]): Resource name
|
|
19
19
|
resource_type (Union[Unset, str]): Resource type
|
|
20
20
|
workspace (Union[Unset, str]): Workspace name
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
name:
|
|
23
|
+
name: str
|
|
24
24
|
preview_name: Union[Unset, str] = UNSET
|
|
25
25
|
resource_name: Union[Unset, str] = UNSET
|
|
26
26
|
resource_type: Union[Unset, str] = UNSET
|
|
@@ -40,9 +40,11 @@ class PreviewTokenMetadata:
|
|
|
40
40
|
|
|
41
41
|
field_dict: dict[str, Any] = {}
|
|
42
42
|
field_dict.update(self.additional_properties)
|
|
43
|
-
field_dict.update(
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"name": name,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
46
48
|
if preview_name is not UNSET:
|
|
47
49
|
field_dict["previewName"] = preview_name
|
|
48
50
|
if resource_name is not UNSET:
|
|
@@ -59,7 +61,7 @@ class PreviewTokenMetadata:
|
|
|
59
61
|
if not src_dict:
|
|
60
62
|
return None
|
|
61
63
|
d = src_dict.copy()
|
|
62
|
-
name = d.pop("name"
|
|
64
|
+
name = d.pop("name")
|
|
63
65
|
|
|
64
66
|
preview_name = d.pop("previewName", d.pop("preview_name", UNSET))
|
|
65
67
|
|
|
@@ -13,8 +13,8 @@ class Repository:
|
|
|
13
13
|
"""Repository
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
type_ (Union[Unset, str]): Repository type
|
|
17
|
-
url (Union[Unset, str]): Repository URL
|
|
16
|
+
type_ (Union[Unset, str]): Repository type Example: github.
|
|
17
|
+
url (Union[Unset, str]): Repository URL Example: https://github.com/my-org/my-agent.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
type_: Union[Unset, str] = UNSET
|
|
@@ -13,11 +13,11 @@ class RevisionConfiguration:
|
|
|
13
13
|
"""Revision configuration
|
|
14
14
|
|
|
15
15
|
Attributes:
|
|
16
|
-
active (Union[Unset, str]): Active revision id
|
|
16
|
+
active (Union[Unset, str]): Active revision id Example: rev-abc123.
|
|
17
17
|
canary (Union[Unset, str]): Canary revision id
|
|
18
|
-
canary_percent (Union[Unset, int]): Canary revision percent
|
|
18
|
+
canary_percent (Union[Unset, int]): Canary revision percent Example: 10.
|
|
19
19
|
sticky_session_ttl (Union[Unset, int]): Sticky session TTL in seconds (0 = disabled)
|
|
20
|
-
traffic (Union[Unset, int]): Traffic percentage
|
|
20
|
+
traffic (Union[Unset, int]): Traffic percentage Example: 100.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
active: Union[Unset, str] = UNSET
|
|
@@ -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.status import Status
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
8
9
|
if TYPE_CHECKING:
|
|
@@ -16,26 +17,37 @@ T = TypeVar("T", bound="Sandbox")
|
|
|
16
17
|
|
|
17
18
|
@_attrs_define
|
|
18
19
|
class Sandbox:
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
"""Lightweight virtual machine for secure AI code execution. Sandboxes resume from standby in under 25ms and
|
|
21
|
+
automatically scale to zero after inactivity, preserving memory state including running processes and filesystem.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
|
|
25
|
+
and ownership information
|
|
26
|
+
spec (SandboxSpec): Configuration for a sandbox including its image, memory, ports, region, and lifecycle
|
|
27
|
+
policies
|
|
28
|
+
events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
|
|
29
|
+
last_used_at (Union[Unset, str]): Last time the sandbox was used (read-only, managed by the system)
|
|
30
|
+
status (Union[Unset, Status]): Deployment status of a resource deployed on Blaxel
|
|
28
31
|
"""
|
|
29
32
|
|
|
33
|
+
metadata: "Metadata"
|
|
34
|
+
spec: "SandboxSpec"
|
|
30
35
|
events: Union[Unset, list["CoreEvent"]] = UNSET
|
|
31
36
|
last_used_at: Union[Unset, str] = UNSET
|
|
32
|
-
|
|
33
|
-
spec: Union[Unset, "SandboxSpec"] = UNSET
|
|
34
|
-
status: Union[Unset, str] = UNSET
|
|
35
|
-
ttl: Union[Unset, int] = UNSET
|
|
37
|
+
status: Union[Unset, Status] = UNSET
|
|
36
38
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
39
|
|
|
38
40
|
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
if type(self.metadata) is dict:
|
|
42
|
+
metadata = self.metadata
|
|
43
|
+
else:
|
|
44
|
+
metadata = self.metadata.to_dict()
|
|
45
|
+
|
|
46
|
+
if type(self.spec) is dict:
|
|
47
|
+
spec = self.spec
|
|
48
|
+
else:
|
|
49
|
+
spec = self.spec.to_dict()
|
|
50
|
+
|
|
39
51
|
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
40
52
|
if not isinstance(self.events, Unset):
|
|
41
53
|
events = []
|
|
@@ -50,41 +62,24 @@ class Sandbox:
|
|
|
50
62
|
|
|
51
63
|
last_used_at = self.last_used_at
|
|
52
64
|
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
self.
|
|
56
|
-
and not isinstance(self.metadata, Unset)
|
|
57
|
-
and not isinstance(self.metadata, dict)
|
|
58
|
-
):
|
|
59
|
-
metadata = self.metadata.to_dict()
|
|
60
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
61
|
-
metadata = self.metadata
|
|
62
|
-
|
|
63
|
-
spec: Union[Unset, dict[str, Any]] = UNSET
|
|
64
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
65
|
-
spec = self.spec.to_dict()
|
|
66
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
67
|
-
spec = self.spec
|
|
68
|
-
|
|
69
|
-
status = self.status
|
|
70
|
-
|
|
71
|
-
ttl = self.ttl
|
|
65
|
+
status: Union[Unset, str] = UNSET
|
|
66
|
+
if not isinstance(self.status, Unset):
|
|
67
|
+
status = self.status.value
|
|
72
68
|
|
|
73
69
|
field_dict: dict[str, Any] = {}
|
|
74
70
|
field_dict.update(self.additional_properties)
|
|
75
|
-
field_dict.update(
|
|
71
|
+
field_dict.update(
|
|
72
|
+
{
|
|
73
|
+
"metadata": metadata,
|
|
74
|
+
"spec": spec,
|
|
75
|
+
}
|
|
76
|
+
)
|
|
76
77
|
if events is not UNSET:
|
|
77
78
|
field_dict["events"] = events
|
|
78
79
|
if last_used_at is not UNSET:
|
|
79
80
|
field_dict["lastUsedAt"] = last_used_at
|
|
80
|
-
if metadata is not UNSET:
|
|
81
|
-
field_dict["metadata"] = metadata
|
|
82
|
-
if spec is not UNSET:
|
|
83
|
-
field_dict["spec"] = spec
|
|
84
81
|
if status is not UNSET:
|
|
85
82
|
field_dict["status"] = status
|
|
86
|
-
if ttl is not UNSET:
|
|
87
|
-
field_dict["ttl"] = ttl
|
|
88
83
|
|
|
89
84
|
return field_dict
|
|
90
85
|
|
|
@@ -97,6 +92,10 @@ class Sandbox:
|
|
|
97
92
|
if not src_dict:
|
|
98
93
|
return None
|
|
99
94
|
d = src_dict.copy()
|
|
95
|
+
metadata = Metadata.from_dict(d.pop("metadata"))
|
|
96
|
+
|
|
97
|
+
spec = SandboxSpec.from_dict(d.pop("spec"))
|
|
98
|
+
|
|
100
99
|
events = []
|
|
101
100
|
_events = d.pop("events", UNSET)
|
|
102
101
|
for componentsschemas_core_events_item_data in _events or []:
|
|
@@ -108,31 +107,19 @@ class Sandbox:
|
|
|
108
107
|
|
|
109
108
|
last_used_at = d.pop("lastUsedAt", d.pop("last_used_at", UNSET))
|
|
110
109
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if isinstance(
|
|
114
|
-
|
|
115
|
-
else:
|
|
116
|
-
metadata = Metadata.from_dict(_metadata)
|
|
117
|
-
|
|
118
|
-
_spec = d.pop("spec", UNSET)
|
|
119
|
-
spec: Union[Unset, SandboxSpec]
|
|
120
|
-
if isinstance(_spec, Unset):
|
|
121
|
-
spec = UNSET
|
|
110
|
+
_status = d.pop("status", UNSET)
|
|
111
|
+
status: Union[Unset, Status]
|
|
112
|
+
if isinstance(_status, Unset):
|
|
113
|
+
status = UNSET
|
|
122
114
|
else:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
status = d.pop("status", UNSET)
|
|
126
|
-
|
|
127
|
-
ttl = d.pop("ttl", UNSET)
|
|
115
|
+
status = Status(_status)
|
|
128
116
|
|
|
129
117
|
sandbox = cls(
|
|
130
|
-
events=events,
|
|
131
|
-
last_used_at=last_used_at,
|
|
132
118
|
metadata=metadata,
|
|
133
119
|
spec=spec,
|
|
120
|
+
events=events,
|
|
121
|
+
last_used_at=last_used_at,
|
|
134
122
|
status=status,
|
|
135
|
-
ttl=ttl,
|
|
136
123
|
)
|
|
137
124
|
|
|
138
125
|
sandbox.additional_properties = d
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
2
2
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
9
|
from ..models.port import Port
|
|
10
|
+
from ..models.sandbox_definition_categories_item import SandboxDefinitionCategoriesItem
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
T = TypeVar("T", bound="SandboxDefinition")
|
|
@@ -14,26 +15,28 @@ T = TypeVar("T", bound="SandboxDefinition")
|
|
|
14
15
|
|
|
15
16
|
@_attrs_define
|
|
16
17
|
class SandboxDefinition:
|
|
17
|
-
"""Sandbox
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
"""Pre-configured sandbox template available in the Sandbox Hub for quick deployment with predefined tools and
|
|
19
|
+
configurations
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
categories (Union[Unset, list['SandboxDefinitionCategoriesItem']]): Categories of the defintion
|
|
23
|
+
coming_soon (Union[Unset, bool]): If the definition is coming soon
|
|
24
|
+
description (Union[Unset, str]): Description of the defintion Example: Python environment with data science
|
|
25
|
+
libraries pre-installed.
|
|
26
|
+
display_name (Union[Unset, str]): Display name of the definition Example: Python Data Science.
|
|
27
|
+
enterprise (Union[Unset, bool]): If the definition is enterprise
|
|
28
|
+
hidden (Union[Unset, bool]): If the definition is hidden
|
|
29
|
+
icon (Union[Unset, str]): Icon of the definition
|
|
30
|
+
image (Union[Unset, str]): Image of the Sandbox definition Example: blaxel/python-data-science:latest.
|
|
31
|
+
long_description (Union[Unset, str]): Long description of the defintion
|
|
32
|
+
memory (Union[Unset, int]): Memory of the Sandbox definition in MB Example: 2048.
|
|
33
|
+
name (Union[Unset, str]): Name of the artifact Example: python-data-science.
|
|
34
|
+
ports (Union[Unset, list['Port']]): Set of ports for a resource
|
|
35
|
+
tags (Union[Unset, str]): Tags of the definition
|
|
36
|
+
url (Union[Unset, str]): URL of the definition
|
|
34
37
|
"""
|
|
35
38
|
|
|
36
|
-
categories: Union[Unset, list[
|
|
39
|
+
categories: Union[Unset, list["SandboxDefinitionCategoriesItem"]] = UNSET
|
|
37
40
|
coming_soon: Union[Unset, bool] = UNSET
|
|
38
41
|
description: Union[Unset, str] = UNSET
|
|
39
42
|
display_name: Union[Unset, str] = UNSET
|
|
@@ -50,9 +53,15 @@ class SandboxDefinition:
|
|
|
50
53
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
54
|
|
|
52
55
|
def to_dict(self) -> dict[str, Any]:
|
|
53
|
-
categories: Union[Unset, list[Any]] = UNSET
|
|
56
|
+
categories: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
54
57
|
if not isinstance(self.categories, Unset):
|
|
55
|
-
categories =
|
|
58
|
+
categories = []
|
|
59
|
+
for categories_item_data in self.categories:
|
|
60
|
+
if type(categories_item_data) is dict:
|
|
61
|
+
categories_item = categories_item_data
|
|
62
|
+
else:
|
|
63
|
+
categories_item = categories_item_data.to_dict()
|
|
64
|
+
categories.append(categories_item)
|
|
56
65
|
|
|
57
66
|
coming_soon = self.coming_soon
|
|
58
67
|
|
|
@@ -125,11 +134,17 @@ class SandboxDefinition:
|
|
|
125
134
|
@classmethod
|
|
126
135
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
127
136
|
from ..models.port import Port
|
|
137
|
+
from ..models.sandbox_definition_categories_item import SandboxDefinitionCategoriesItem
|
|
128
138
|
|
|
129
139
|
if not src_dict:
|
|
130
140
|
return None
|
|
131
141
|
d = src_dict.copy()
|
|
132
|
-
categories =
|
|
142
|
+
categories = []
|
|
143
|
+
_categories = d.pop("categories", UNSET)
|
|
144
|
+
for categories_item_data in _categories or []:
|
|
145
|
+
categories_item = SandboxDefinitionCategoriesItem.from_dict(categories_item_data)
|
|
146
|
+
|
|
147
|
+
categories.append(categories_item)
|
|
133
148
|
|
|
134
149
|
coming_soon = d.pop("coming_soon", UNSET)
|
|
135
150
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from typing import Any, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="SandboxDefinitionCategoriesItem")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class SandboxDefinitionCategoriesItem:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
|
16
|
+
field_dict: dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
|
|
19
|
+
return field_dict
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
23
|
+
if not src_dict:
|
|
24
|
+
return None
|
|
25
|
+
d = src_dict.copy()
|
|
26
|
+
sandbox_definition_categories_item = cls()
|
|
27
|
+
|
|
28
|
+
sandbox_definition_categories_item.additional_properties = d
|
|
29
|
+
return sandbox_definition_categories_item
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def additional_keys(self) -> list[str]:
|
|
33
|
+
return list(self.additional_properties.keys())
|
|
34
|
+
|
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
|
36
|
+
return self.additional_properties[key]
|
|
37
|
+
|
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
39
|
+
self.additional_properties[key] = value
|
|
40
|
+
|
|
41
|
+
def __delitem__(self, key: str) -> None:
|
|
42
|
+
del self.additional_properties[key]
|
|
43
|
+
|
|
44
|
+
def __contains__(self, key: str) -> bool:
|
|
45
|
+
return key in self.additional_properties
|