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
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Union
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import Client
|
|
8
|
+
from ...models.error import Error
|
|
8
9
|
from ...models.volume import Volume
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
@@ -20,18 +21,38 @@ def _get_kwargs(
|
|
|
20
21
|
return _kwargs
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
def _parse_response(*, client: Client, response: httpx.Response) -> Volume | None:
|
|
24
|
+
def _parse_response(*, client: Client, response: httpx.Response) -> Union[Error, Volume] | None:
|
|
24
25
|
if response.status_code == 200:
|
|
25
26
|
response_200 = Volume.from_dict(response.json())
|
|
26
27
|
|
|
27
28
|
return response_200
|
|
29
|
+
if response.status_code == 401:
|
|
30
|
+
response_401 = Error.from_dict(response.json())
|
|
31
|
+
|
|
32
|
+
return response_401
|
|
33
|
+
if response.status_code == 403:
|
|
34
|
+
response_403 = Error.from_dict(response.json())
|
|
35
|
+
|
|
36
|
+
return response_403
|
|
37
|
+
if response.status_code == 404:
|
|
38
|
+
response_404 = Error.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_404
|
|
41
|
+
if response.status_code == 409:
|
|
42
|
+
response_409 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_409
|
|
45
|
+
if response.status_code == 500:
|
|
46
|
+
response_500 = Error.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_500
|
|
28
49
|
if client.raise_on_unexpected_status:
|
|
29
50
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
51
|
else:
|
|
31
52
|
return None
|
|
32
53
|
|
|
33
54
|
|
|
34
|
-
def _build_response(*, client: Client, response: httpx.Response) -> Response[Volume]:
|
|
55
|
+
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Error, Volume]]:
|
|
35
56
|
return Response(
|
|
36
57
|
status_code=HTTPStatus(response.status_code),
|
|
37
58
|
content=response.content,
|
|
@@ -44,10 +65,11 @@ def sync_detailed(
|
|
|
44
65
|
volume_name: str,
|
|
45
66
|
*,
|
|
46
67
|
client: Client,
|
|
47
|
-
) -> Response[Volume]:
|
|
48
|
-
"""Delete volume
|
|
68
|
+
) -> Response[Union[Error, Volume]]:
|
|
69
|
+
"""Delete persistent volume
|
|
49
70
|
|
|
50
|
-
|
|
71
|
+
Permanently deletes a volume and all its data. The volume must not be attached to any sandbox. This
|
|
72
|
+
action cannot be undone.
|
|
51
73
|
|
|
52
74
|
Args:
|
|
53
75
|
volume_name (str):
|
|
@@ -57,7 +79,7 @@ def sync_detailed(
|
|
|
57
79
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
58
80
|
|
|
59
81
|
Returns:
|
|
60
|
-
Response[Volume]
|
|
82
|
+
Response[Union[Error, Volume]]
|
|
61
83
|
"""
|
|
62
84
|
|
|
63
85
|
kwargs = _get_kwargs(
|
|
@@ -75,10 +97,11 @@ def sync(
|
|
|
75
97
|
volume_name: str,
|
|
76
98
|
*,
|
|
77
99
|
client: Client,
|
|
78
|
-
) -> Volume | None:
|
|
79
|
-
"""Delete volume
|
|
100
|
+
) -> Union[Error, Volume] | None:
|
|
101
|
+
"""Delete persistent volume
|
|
80
102
|
|
|
81
|
-
|
|
103
|
+
Permanently deletes a volume and all its data. The volume must not be attached to any sandbox. This
|
|
104
|
+
action cannot be undone.
|
|
82
105
|
|
|
83
106
|
Args:
|
|
84
107
|
volume_name (str):
|
|
@@ -88,7 +111,7 @@ def sync(
|
|
|
88
111
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
112
|
|
|
90
113
|
Returns:
|
|
91
|
-
Volume
|
|
114
|
+
Union[Error, Volume]
|
|
92
115
|
"""
|
|
93
116
|
|
|
94
117
|
return sync_detailed(
|
|
@@ -101,10 +124,11 @@ async def asyncio_detailed(
|
|
|
101
124
|
volume_name: str,
|
|
102
125
|
*,
|
|
103
126
|
client: Client,
|
|
104
|
-
) -> Response[Volume]:
|
|
105
|
-
"""Delete volume
|
|
127
|
+
) -> Response[Union[Error, Volume]]:
|
|
128
|
+
"""Delete persistent volume
|
|
106
129
|
|
|
107
|
-
|
|
130
|
+
Permanently deletes a volume and all its data. The volume must not be attached to any sandbox. This
|
|
131
|
+
action cannot be undone.
|
|
108
132
|
|
|
109
133
|
Args:
|
|
110
134
|
volume_name (str):
|
|
@@ -114,7 +138,7 @@ async def asyncio_detailed(
|
|
|
114
138
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
115
139
|
|
|
116
140
|
Returns:
|
|
117
|
-
Response[Volume]
|
|
141
|
+
Response[Union[Error, Volume]]
|
|
118
142
|
"""
|
|
119
143
|
|
|
120
144
|
kwargs = _get_kwargs(
|
|
@@ -130,10 +154,11 @@ async def asyncio(
|
|
|
130
154
|
volume_name: str,
|
|
131
155
|
*,
|
|
132
156
|
client: Client,
|
|
133
|
-
) -> Volume | None:
|
|
134
|
-
"""Delete volume
|
|
157
|
+
) -> Union[Error, Volume] | None:
|
|
158
|
+
"""Delete persistent volume
|
|
135
159
|
|
|
136
|
-
|
|
160
|
+
Permanently deletes a volume and all its data. The volume must not be attached to any sandbox. This
|
|
161
|
+
action cannot be undone.
|
|
137
162
|
|
|
138
163
|
Args:
|
|
139
164
|
volume_name (str):
|
|
@@ -143,7 +168,7 @@ async def asyncio(
|
|
|
143
168
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
169
|
|
|
145
170
|
Returns:
|
|
146
|
-
Volume
|
|
171
|
+
Union[Error, Volume]
|
|
147
172
|
"""
|
|
148
173
|
|
|
149
174
|
return (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Union
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import Client
|
|
8
|
+
from ...models.error import Error
|
|
8
9
|
from ...models.volume import Volume
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
@@ -20,18 +21,34 @@ def _get_kwargs(
|
|
|
20
21
|
return _kwargs
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
def _parse_response(*, client: Client, response: httpx.Response) -> Volume | None:
|
|
24
|
+
def _parse_response(*, client: Client, response: httpx.Response) -> Union[Error, Volume] | None:
|
|
24
25
|
if response.status_code == 200:
|
|
25
26
|
response_200 = Volume.from_dict(response.json())
|
|
26
27
|
|
|
27
28
|
return response_200
|
|
29
|
+
if response.status_code == 401:
|
|
30
|
+
response_401 = Error.from_dict(response.json())
|
|
31
|
+
|
|
32
|
+
return response_401
|
|
33
|
+
if response.status_code == 403:
|
|
34
|
+
response_403 = Error.from_dict(response.json())
|
|
35
|
+
|
|
36
|
+
return response_403
|
|
37
|
+
if response.status_code == 404:
|
|
38
|
+
response_404 = Error.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_404
|
|
41
|
+
if response.status_code == 500:
|
|
42
|
+
response_500 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_500
|
|
28
45
|
if client.raise_on_unexpected_status:
|
|
29
46
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
47
|
else:
|
|
31
48
|
return None
|
|
32
49
|
|
|
33
50
|
|
|
34
|
-
def _build_response(*, client: Client, response: httpx.Response) -> Response[Volume]:
|
|
51
|
+
def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Error, Volume]]:
|
|
35
52
|
return Response(
|
|
36
53
|
status_code=HTTPStatus(response.status_code),
|
|
37
54
|
content=response.content,
|
|
@@ -44,10 +61,11 @@ def sync_detailed(
|
|
|
44
61
|
volume_name: str,
|
|
45
62
|
*,
|
|
46
63
|
client: Client,
|
|
47
|
-
) -> Response[Volume]:
|
|
48
|
-
"""Get volume
|
|
64
|
+
) -> Response[Union[Error, Volume]]:
|
|
65
|
+
"""Get persistent volume
|
|
49
66
|
|
|
50
|
-
Returns a volume
|
|
67
|
+
Returns detailed information about a volume including its size, region, attachment status, and any
|
|
68
|
+
events history.
|
|
51
69
|
|
|
52
70
|
Args:
|
|
53
71
|
volume_name (str):
|
|
@@ -57,7 +75,7 @@ def sync_detailed(
|
|
|
57
75
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
58
76
|
|
|
59
77
|
Returns:
|
|
60
|
-
Response[Volume]
|
|
78
|
+
Response[Union[Error, Volume]]
|
|
61
79
|
"""
|
|
62
80
|
|
|
63
81
|
kwargs = _get_kwargs(
|
|
@@ -75,10 +93,11 @@ def sync(
|
|
|
75
93
|
volume_name: str,
|
|
76
94
|
*,
|
|
77
95
|
client: Client,
|
|
78
|
-
) -> Volume | None:
|
|
79
|
-
"""Get volume
|
|
96
|
+
) -> Union[Error, Volume] | None:
|
|
97
|
+
"""Get persistent volume
|
|
80
98
|
|
|
81
|
-
Returns a volume
|
|
99
|
+
Returns detailed information about a volume including its size, region, attachment status, and any
|
|
100
|
+
events history.
|
|
82
101
|
|
|
83
102
|
Args:
|
|
84
103
|
volume_name (str):
|
|
@@ -88,7 +107,7 @@ def sync(
|
|
|
88
107
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
108
|
|
|
90
109
|
Returns:
|
|
91
|
-
Volume
|
|
110
|
+
Union[Error, Volume]
|
|
92
111
|
"""
|
|
93
112
|
|
|
94
113
|
return sync_detailed(
|
|
@@ -101,10 +120,11 @@ async def asyncio_detailed(
|
|
|
101
120
|
volume_name: str,
|
|
102
121
|
*,
|
|
103
122
|
client: Client,
|
|
104
|
-
) -> Response[Volume]:
|
|
105
|
-
"""Get volume
|
|
123
|
+
) -> Response[Union[Error, Volume]]:
|
|
124
|
+
"""Get persistent volume
|
|
106
125
|
|
|
107
|
-
Returns a volume
|
|
126
|
+
Returns detailed information about a volume including its size, region, attachment status, and any
|
|
127
|
+
events history.
|
|
108
128
|
|
|
109
129
|
Args:
|
|
110
130
|
volume_name (str):
|
|
@@ -114,7 +134,7 @@ async def asyncio_detailed(
|
|
|
114
134
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
115
135
|
|
|
116
136
|
Returns:
|
|
117
|
-
Response[Volume]
|
|
137
|
+
Response[Union[Error, Volume]]
|
|
118
138
|
"""
|
|
119
139
|
|
|
120
140
|
kwargs = _get_kwargs(
|
|
@@ -130,10 +150,11 @@ async def asyncio(
|
|
|
130
150
|
volume_name: str,
|
|
131
151
|
*,
|
|
132
152
|
client: Client,
|
|
133
|
-
) -> Volume | None:
|
|
134
|
-
"""Get volume
|
|
153
|
+
) -> Union[Error, Volume] | None:
|
|
154
|
+
"""Get persistent volume
|
|
135
155
|
|
|
136
|
-
Returns a volume
|
|
156
|
+
Returns detailed information about a volume including its size, region, attachment status, and any
|
|
157
|
+
events history.
|
|
137
158
|
|
|
138
159
|
Args:
|
|
139
160
|
volume_name (str):
|
|
@@ -143,7 +164,7 @@ async def asyncio(
|
|
|
143
164
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
165
|
|
|
145
166
|
Returns:
|
|
146
|
-
Volume
|
|
167
|
+
Union[Error, Volume]
|
|
147
168
|
"""
|
|
148
169
|
|
|
149
170
|
return (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Union
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import Client
|
|
8
|
+
from ...models.error import Error
|
|
8
9
|
from ...models.volume import Volume
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
@@ -18,7 +19,9 @@ def _get_kwargs() -> dict[str, Any]:
|
|
|
18
19
|
return _kwargs
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
def _parse_response(
|
|
22
|
+
def _parse_response(
|
|
23
|
+
*, client: Client, response: httpx.Response
|
|
24
|
+
) -> Union[Error, list["Volume"]] | None:
|
|
22
25
|
if response.status_code == 200:
|
|
23
26
|
response_200 = []
|
|
24
27
|
_response_200 = response.json()
|
|
@@ -28,13 +31,27 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Volume
|
|
|
28
31
|
response_200.append(response_200_item)
|
|
29
32
|
|
|
30
33
|
return response_200
|
|
34
|
+
if response.status_code == 401:
|
|
35
|
+
response_401 = Error.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_401
|
|
38
|
+
if response.status_code == 403:
|
|
39
|
+
response_403 = Error.from_dict(response.json())
|
|
40
|
+
|
|
41
|
+
return response_403
|
|
42
|
+
if response.status_code == 500:
|
|
43
|
+
response_500 = Error.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_500
|
|
31
46
|
if client.raise_on_unexpected_status:
|
|
32
47
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
33
48
|
else:
|
|
34
49
|
return None
|
|
35
50
|
|
|
36
51
|
|
|
37
|
-
def _build_response(
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: Client, response: httpx.Response
|
|
54
|
+
) -> Response[Union[Error, list["Volume"]]]:
|
|
38
55
|
return Response(
|
|
39
56
|
status_code=HTTPStatus(response.status_code),
|
|
40
57
|
content=response.content,
|
|
@@ -46,17 +63,18 @@ def _build_response(*, client: Client, response: httpx.Response) -> Response[lis
|
|
|
46
63
|
def sync_detailed(
|
|
47
64
|
*,
|
|
48
65
|
client: Client,
|
|
49
|
-
) -> Response[list["Volume"]]:
|
|
50
|
-
"""List volumes
|
|
66
|
+
) -> Response[Union[Error, list["Volume"]]]:
|
|
67
|
+
"""List persistent volumes
|
|
51
68
|
|
|
52
|
-
Returns
|
|
69
|
+
Returns all persistent storage volumes in the workspace. Volumes can be attached to sandboxes for
|
|
70
|
+
durable file storage that persists across sessions and sandbox deletions.
|
|
53
71
|
|
|
54
72
|
Raises:
|
|
55
73
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
56
74
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
57
75
|
|
|
58
76
|
Returns:
|
|
59
|
-
Response[list['Volume']]
|
|
77
|
+
Response[Union[Error, list['Volume']]]
|
|
60
78
|
"""
|
|
61
79
|
|
|
62
80
|
kwargs = _get_kwargs()
|
|
@@ -71,17 +89,18 @@ def sync_detailed(
|
|
|
71
89
|
def sync(
|
|
72
90
|
*,
|
|
73
91
|
client: Client,
|
|
74
|
-
) -> list["Volume"] | None:
|
|
75
|
-
"""List volumes
|
|
92
|
+
) -> Union[Error, list["Volume"]] | None:
|
|
93
|
+
"""List persistent volumes
|
|
76
94
|
|
|
77
|
-
Returns
|
|
95
|
+
Returns all persistent storage volumes in the workspace. Volumes can be attached to sandboxes for
|
|
96
|
+
durable file storage that persists across sessions and sandbox deletions.
|
|
78
97
|
|
|
79
98
|
Raises:
|
|
80
99
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
100
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
101
|
|
|
83
102
|
Returns:
|
|
84
|
-
list['Volume']
|
|
103
|
+
Union[Error, list['Volume']]
|
|
85
104
|
"""
|
|
86
105
|
|
|
87
106
|
return sync_detailed(
|
|
@@ -92,17 +111,18 @@ def sync(
|
|
|
92
111
|
async def asyncio_detailed(
|
|
93
112
|
*,
|
|
94
113
|
client: Client,
|
|
95
|
-
) -> Response[list["Volume"]]:
|
|
96
|
-
"""List volumes
|
|
114
|
+
) -> Response[Union[Error, list["Volume"]]]:
|
|
115
|
+
"""List persistent volumes
|
|
97
116
|
|
|
98
|
-
Returns
|
|
117
|
+
Returns all persistent storage volumes in the workspace. Volumes can be attached to sandboxes for
|
|
118
|
+
durable file storage that persists across sessions and sandbox deletions.
|
|
99
119
|
|
|
100
120
|
Raises:
|
|
101
121
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
122
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
123
|
|
|
104
124
|
Returns:
|
|
105
|
-
Response[list['Volume']]
|
|
125
|
+
Response[Union[Error, list['Volume']]]
|
|
106
126
|
"""
|
|
107
127
|
|
|
108
128
|
kwargs = _get_kwargs()
|
|
@@ -115,17 +135,18 @@ async def asyncio_detailed(
|
|
|
115
135
|
async def asyncio(
|
|
116
136
|
*,
|
|
117
137
|
client: Client,
|
|
118
|
-
) -> list["Volume"] | None:
|
|
119
|
-
"""List volumes
|
|
138
|
+
) -> Union[Error, list["Volume"]] | None:
|
|
139
|
+
"""List persistent volumes
|
|
120
140
|
|
|
121
|
-
Returns
|
|
141
|
+
Returns all persistent storage volumes in the workspace. Volumes can be attached to sandboxes for
|
|
142
|
+
durable file storage that persists across sessions and sandbox deletions.
|
|
122
143
|
|
|
123
144
|
Raises:
|
|
124
145
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
125
146
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
147
|
|
|
127
148
|
Returns:
|
|
128
|
-
list['Volume']
|
|
149
|
+
Union[Error, list['Volume']]
|
|
129
150
|
"""
|
|
130
151
|
|
|
131
152
|
return (
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any
|
|
2
|
+
from typing import Any, Union
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import Client
|
|
8
|
+
from ...models.error import Error
|
|
8
9
|
from ...models.workspace import Workspace
|
|
9
10
|
from ...types import Response
|
|
10
11
|
|
|
@@ -32,18 +33,40 @@ def _get_kwargs(
|
|
|
32
33
|
return _kwargs
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
def _parse_response(*, client: Client, response: httpx.Response) -> Workspace | None:
|
|
36
|
+
def _parse_response(*, client: Client, response: httpx.Response) -> Union[Error, Workspace] | None:
|
|
36
37
|
if response.status_code == 200:
|
|
37
38
|
response_200 = Workspace.from_dict(response.json())
|
|
38
39
|
|
|
39
40
|
return response_200
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
if response.status_code == 401:
|
|
46
|
+
response_401 = Error.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_401
|
|
49
|
+
if response.status_code == 403:
|
|
50
|
+
response_403 = Error.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_403
|
|
53
|
+
if response.status_code == 409:
|
|
54
|
+
response_409 = Error.from_dict(response.json())
|
|
55
|
+
|
|
56
|
+
return response_409
|
|
57
|
+
if response.status_code == 500:
|
|
58
|
+
response_500 = Error.from_dict(response.json())
|
|
59
|
+
|
|
60
|
+
return response_500
|
|
40
61
|
if client.raise_on_unexpected_status:
|
|
41
62
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
42
63
|
else:
|
|
43
64
|
return None
|
|
44
65
|
|
|
45
66
|
|
|
46
|
-
def _build_response(
|
|
67
|
+
def _build_response(
|
|
68
|
+
*, client: Client, response: httpx.Response
|
|
69
|
+
) -> Response[Union[Error, Workspace]]:
|
|
47
70
|
return Response(
|
|
48
71
|
status_code=HTTPStatus(response.status_code),
|
|
49
72
|
content=response.content,
|
|
@@ -56,20 +79,22 @@ def sync_detailed(
|
|
|
56
79
|
*,
|
|
57
80
|
client: Client,
|
|
58
81
|
body: Workspace,
|
|
59
|
-
) -> Response[Workspace]:
|
|
60
|
-
"""Create
|
|
82
|
+
) -> Response[Union[Error, Workspace]]:
|
|
83
|
+
"""Create workspace tenant
|
|
61
84
|
|
|
62
|
-
Creates a workspace.
|
|
85
|
+
Creates a new workspace tenant. The authenticated user becomes the workspace admin. Requires a
|
|
86
|
+
linked billing account.
|
|
63
87
|
|
|
64
88
|
Args:
|
|
65
|
-
body (Workspace):
|
|
89
|
+
body (Workspace): Tenant container that groups all Blaxel resources (agents, functions,
|
|
90
|
+
models, etc.) with shared team access control and billing.
|
|
66
91
|
|
|
67
92
|
Raises:
|
|
68
93
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
69
94
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
70
95
|
|
|
71
96
|
Returns:
|
|
72
|
-
Response[Workspace]
|
|
97
|
+
Response[Union[Error, Workspace]]
|
|
73
98
|
"""
|
|
74
99
|
|
|
75
100
|
kwargs = _get_kwargs(
|
|
@@ -87,20 +112,22 @@ def sync(
|
|
|
87
112
|
*,
|
|
88
113
|
client: Client,
|
|
89
114
|
body: Workspace,
|
|
90
|
-
) -> Workspace | None:
|
|
91
|
-
"""Create
|
|
115
|
+
) -> Union[Error, Workspace] | None:
|
|
116
|
+
"""Create workspace tenant
|
|
92
117
|
|
|
93
|
-
Creates a workspace.
|
|
118
|
+
Creates a new workspace tenant. The authenticated user becomes the workspace admin. Requires a
|
|
119
|
+
linked billing account.
|
|
94
120
|
|
|
95
121
|
Args:
|
|
96
|
-
body (Workspace):
|
|
122
|
+
body (Workspace): Tenant container that groups all Blaxel resources (agents, functions,
|
|
123
|
+
models, etc.) with shared team access control and billing.
|
|
97
124
|
|
|
98
125
|
Raises:
|
|
99
126
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
127
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
128
|
|
|
102
129
|
Returns:
|
|
103
|
-
Workspace
|
|
130
|
+
Union[Error, Workspace]
|
|
104
131
|
"""
|
|
105
132
|
|
|
106
133
|
return sync_detailed(
|
|
@@ -113,20 +140,22 @@ async def asyncio_detailed(
|
|
|
113
140
|
*,
|
|
114
141
|
client: Client,
|
|
115
142
|
body: Workspace,
|
|
116
|
-
) -> Response[Workspace]:
|
|
117
|
-
"""Create
|
|
143
|
+
) -> Response[Union[Error, Workspace]]:
|
|
144
|
+
"""Create workspace tenant
|
|
118
145
|
|
|
119
|
-
Creates a workspace.
|
|
146
|
+
Creates a new workspace tenant. The authenticated user becomes the workspace admin. Requires a
|
|
147
|
+
linked billing account.
|
|
120
148
|
|
|
121
149
|
Args:
|
|
122
|
-
body (Workspace):
|
|
150
|
+
body (Workspace): Tenant container that groups all Blaxel resources (agents, functions,
|
|
151
|
+
models, etc.) with shared team access control and billing.
|
|
123
152
|
|
|
124
153
|
Raises:
|
|
125
154
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
126
155
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
156
|
|
|
128
157
|
Returns:
|
|
129
|
-
Response[Workspace]
|
|
158
|
+
Response[Union[Error, Workspace]]
|
|
130
159
|
"""
|
|
131
160
|
|
|
132
161
|
kwargs = _get_kwargs(
|
|
@@ -142,20 +171,22 @@ async def asyncio(
|
|
|
142
171
|
*,
|
|
143
172
|
client: Client,
|
|
144
173
|
body: Workspace,
|
|
145
|
-
) -> Workspace | None:
|
|
146
|
-
"""Create
|
|
174
|
+
) -> Union[Error, Workspace] | None:
|
|
175
|
+
"""Create workspace tenant
|
|
147
176
|
|
|
148
|
-
Creates a workspace.
|
|
177
|
+
Creates a new workspace tenant. The authenticated user becomes the workspace admin. Requires a
|
|
178
|
+
linked billing account.
|
|
149
179
|
|
|
150
180
|
Args:
|
|
151
|
-
body (Workspace):
|
|
181
|
+
body (Workspace): Tenant container that groups all Blaxel resources (agents, functions,
|
|
182
|
+
models, etc.) with shared team access control and billing.
|
|
152
183
|
|
|
153
184
|
Raises:
|
|
154
185
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
186
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
187
|
|
|
157
188
|
Returns:
|
|
158
|
-
Workspace
|
|
189
|
+
Union[Error, Workspace]
|
|
159
190
|
"""
|
|
160
191
|
|
|
161
192
|
return (
|