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
|
@@ -14,34 +14,40 @@ T = TypeVar("T", bound="Metadata")
|
|
|
14
14
|
|
|
15
15
|
@_attrs_define
|
|
16
16
|
class Metadata:
|
|
17
|
-
"""
|
|
17
|
+
"""Common metadata fields shared by all Blaxel resources including name, labels, timestamps, and ownership information
|
|
18
18
|
|
|
19
19
|
Attributes:
|
|
20
|
+
name (str): Unique identifier for the resource within the workspace. Must be lowercase alphanumeric with
|
|
21
|
+
hyphens, max 49 characters. Immutable after creation. Example: my-resource.
|
|
20
22
|
created_at (Union[Unset, str]): The date and time when the resource was created
|
|
21
23
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
|
22
24
|
created_by (Union[Unset, str]): The user or service account who created the resource
|
|
23
25
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
|
24
|
-
display_name (Union[Unset, str]):
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
display_name (Union[Unset, str]): Human-readable name for display in the UI. Can contain spaces and special
|
|
27
|
+
characters, max 63 characters. Example: My Resource.
|
|
28
|
+
labels (Union[Unset, MetadataLabels]): Key-value pairs for organizing and filtering resources. Labels can be
|
|
29
|
+
used to categorize resources by environment, project, team, or any custom taxonomy.
|
|
30
|
+
plan (Union[Unset, str]): Billing plan tier applied to this resource (inherited from workspace account)
|
|
31
|
+
url (Union[Unset, str]): Auto-generated endpoint URL for accessing this resource (for agents, functions, models,
|
|
32
|
+
sandboxes)
|
|
33
|
+
workspace (Union[Unset, str]): Name of the workspace this resource belongs to (read-only, set automatically)
|
|
30
34
|
"""
|
|
31
35
|
|
|
36
|
+
name: str
|
|
32
37
|
created_at: Union[Unset, str] = UNSET
|
|
33
38
|
updated_at: Union[Unset, str] = UNSET
|
|
34
39
|
created_by: Union[Unset, str] = UNSET
|
|
35
40
|
updated_by: Union[Unset, str] = UNSET
|
|
36
41
|
display_name: Union[Unset, str] = UNSET
|
|
37
42
|
labels: Union[Unset, "MetadataLabels"] = UNSET
|
|
38
|
-
|
|
39
|
-
plan: Union[Unset, Any] = UNSET
|
|
43
|
+
plan: Union[Unset, str] = UNSET
|
|
40
44
|
url: Union[Unset, str] = UNSET
|
|
41
45
|
workspace: Union[Unset, str] = UNSET
|
|
42
46
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
43
47
|
|
|
44
48
|
def to_dict(self) -> dict[str, Any]:
|
|
49
|
+
name = self.name
|
|
50
|
+
|
|
45
51
|
created_at = self.created_at
|
|
46
52
|
|
|
47
53
|
updated_at = self.updated_at
|
|
@@ -58,8 +64,6 @@ class Metadata:
|
|
|
58
64
|
elif self.labels and isinstance(self.labels, dict):
|
|
59
65
|
labels = self.labels
|
|
60
66
|
|
|
61
|
-
name = self.name
|
|
62
|
-
|
|
63
67
|
plan = self.plan
|
|
64
68
|
|
|
65
69
|
url = self.url
|
|
@@ -68,7 +72,11 @@ class Metadata:
|
|
|
68
72
|
|
|
69
73
|
field_dict: dict[str, Any] = {}
|
|
70
74
|
field_dict.update(self.additional_properties)
|
|
71
|
-
field_dict.update(
|
|
75
|
+
field_dict.update(
|
|
76
|
+
{
|
|
77
|
+
"name": name,
|
|
78
|
+
}
|
|
79
|
+
)
|
|
72
80
|
if created_at is not UNSET:
|
|
73
81
|
field_dict["createdAt"] = created_at
|
|
74
82
|
if updated_at is not UNSET:
|
|
@@ -81,8 +89,6 @@ class Metadata:
|
|
|
81
89
|
field_dict["displayName"] = display_name
|
|
82
90
|
if labels is not UNSET:
|
|
83
91
|
field_dict["labels"] = labels
|
|
84
|
-
if name is not UNSET:
|
|
85
|
-
field_dict["name"] = name
|
|
86
92
|
if plan is not UNSET:
|
|
87
93
|
field_dict["plan"] = plan
|
|
88
94
|
if url is not UNSET:
|
|
@@ -99,6 +105,8 @@ class Metadata:
|
|
|
99
105
|
if not src_dict:
|
|
100
106
|
return None
|
|
101
107
|
d = src_dict.copy()
|
|
108
|
+
name = d.pop("name")
|
|
109
|
+
|
|
102
110
|
created_at = d.pop("createdAt", d.pop("created_at", UNSET))
|
|
103
111
|
|
|
104
112
|
updated_at = d.pop("updatedAt", d.pop("updated_at", UNSET))
|
|
@@ -116,8 +124,6 @@ class Metadata:
|
|
|
116
124
|
else:
|
|
117
125
|
labels = MetadataLabels.from_dict(_labels)
|
|
118
126
|
|
|
119
|
-
name = d.pop("name", UNSET)
|
|
120
|
-
|
|
121
127
|
plan = d.pop("plan", UNSET)
|
|
122
128
|
|
|
123
129
|
url = d.pop("url", UNSET)
|
|
@@ -125,13 +131,13 @@ class Metadata:
|
|
|
125
131
|
workspace = d.pop("workspace", UNSET)
|
|
126
132
|
|
|
127
133
|
metadata = cls(
|
|
134
|
+
name=name,
|
|
128
135
|
created_at=created_at,
|
|
129
136
|
updated_at=updated_at,
|
|
130
137
|
created_by=created_by,
|
|
131
138
|
updated_by=updated_by,
|
|
132
139
|
display_name=display_name,
|
|
133
140
|
labels=labels,
|
|
134
|
-
name=name,
|
|
135
141
|
plan=plan,
|
|
136
142
|
url=url,
|
|
137
143
|
workspace=workspace,
|
|
@@ -8,7 +8,10 @@ T = TypeVar("T", bound="MetadataLabels")
|
|
|
8
8
|
|
|
9
9
|
@_attrs_define
|
|
10
10
|
class MetadataLabels:
|
|
11
|
-
"""Labels
|
|
11
|
+
"""Key-value pairs for organizing and filtering resources. Labels can be used to categorize resources by environment,
|
|
12
|
+
project, team, or any custom taxonomy.
|
|
13
|
+
|
|
14
|
+
"""
|
|
12
15
|
|
|
13
16
|
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
14
17
|
|
|
@@ -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,22 +17,35 @@ T = TypeVar("T", bound="Model")
|
|
|
16
17
|
|
|
17
18
|
@_attrs_define
|
|
18
19
|
class Model:
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
"""Gateway endpoint to external LLM provider APIs (OpenAI, Anthropic, etc.) with unified access control, credentials
|
|
21
|
+
management, and usage tracking.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
|
|
25
|
+
and ownership information
|
|
26
|
+
spec (ModelSpec): Configuration for a model gateway endpoint including provider type, credentials, and access
|
|
27
|
+
policies
|
|
28
|
+
events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
|
|
29
|
+
status (Union[Unset, Status]): Deployment status of a resource deployed on Blaxel
|
|
26
30
|
"""
|
|
27
31
|
|
|
32
|
+
metadata: "Metadata"
|
|
33
|
+
spec: "ModelSpec"
|
|
28
34
|
events: Union[Unset, list["CoreEvent"]] = UNSET
|
|
29
|
-
|
|
30
|
-
spec: Union[Unset, "ModelSpec"] = UNSET
|
|
31
|
-
status: Union[Unset, str] = UNSET
|
|
35
|
+
status: Union[Unset, Status] = UNSET
|
|
32
36
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
37
|
|
|
34
38
|
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
if type(self.metadata) is dict:
|
|
40
|
+
metadata = self.metadata
|
|
41
|
+
else:
|
|
42
|
+
metadata = self.metadata.to_dict()
|
|
43
|
+
|
|
44
|
+
if type(self.spec) is dict:
|
|
45
|
+
spec = self.spec
|
|
46
|
+
else:
|
|
47
|
+
spec = self.spec.to_dict()
|
|
48
|
+
|
|
35
49
|
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
36
50
|
if not isinstance(self.events, Unset):
|
|
37
51
|
events = []
|
|
@@ -44,33 +58,20 @@ class Model:
|
|
|
44
58
|
)
|
|
45
59
|
events.append(componentsschemas_core_events_item)
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
self.
|
|
50
|
-
and not isinstance(self.metadata, Unset)
|
|
51
|
-
and not isinstance(self.metadata, dict)
|
|
52
|
-
):
|
|
53
|
-
metadata = self.metadata.to_dict()
|
|
54
|
-
elif self.metadata and isinstance(self.metadata, dict):
|
|
55
|
-
metadata = self.metadata
|
|
56
|
-
|
|
57
|
-
spec: Union[Unset, dict[str, Any]] = UNSET
|
|
58
|
-
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
|
59
|
-
spec = self.spec.to_dict()
|
|
60
|
-
elif self.spec and isinstance(self.spec, dict):
|
|
61
|
-
spec = self.spec
|
|
62
|
-
|
|
63
|
-
status = self.status
|
|
61
|
+
status: Union[Unset, str] = UNSET
|
|
62
|
+
if not isinstance(self.status, Unset):
|
|
63
|
+
status = self.status.value
|
|
64
64
|
|
|
65
65
|
field_dict: dict[str, Any] = {}
|
|
66
66
|
field_dict.update(self.additional_properties)
|
|
67
|
-
field_dict.update(
|
|
67
|
+
field_dict.update(
|
|
68
|
+
{
|
|
69
|
+
"metadata": metadata,
|
|
70
|
+
"spec": spec,
|
|
71
|
+
}
|
|
72
|
+
)
|
|
68
73
|
if events is not UNSET:
|
|
69
74
|
field_dict["events"] = events
|
|
70
|
-
if metadata is not UNSET:
|
|
71
|
-
field_dict["metadata"] = metadata
|
|
72
|
-
if spec is not UNSET:
|
|
73
|
-
field_dict["spec"] = spec
|
|
74
75
|
if status is not UNSET:
|
|
75
76
|
field_dict["status"] = status
|
|
76
77
|
|
|
@@ -85,6 +86,10 @@ class Model:
|
|
|
85
86
|
if not src_dict:
|
|
86
87
|
return None
|
|
87
88
|
d = src_dict.copy()
|
|
89
|
+
metadata = Metadata.from_dict(d.pop("metadata"))
|
|
90
|
+
|
|
91
|
+
spec = ModelSpec.from_dict(d.pop("spec"))
|
|
92
|
+
|
|
88
93
|
events = []
|
|
89
94
|
_events = d.pop("events", UNSET)
|
|
90
95
|
for componentsschemas_core_events_item_data in _events or []:
|
|
@@ -94,26 +99,17 @@ class Model:
|
|
|
94
99
|
|
|
95
100
|
events.append(componentsschemas_core_events_item)
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if isinstance(
|
|
100
|
-
|
|
102
|
+
_status = d.pop("status", UNSET)
|
|
103
|
+
status: Union[Unset, Status]
|
|
104
|
+
if isinstance(_status, Unset):
|
|
105
|
+
status = UNSET
|
|
101
106
|
else:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
_spec = d.pop("spec", UNSET)
|
|
105
|
-
spec: Union[Unset, ModelSpec]
|
|
106
|
-
if isinstance(_spec, Unset):
|
|
107
|
-
spec = UNSET
|
|
108
|
-
else:
|
|
109
|
-
spec = ModelSpec.from_dict(_spec)
|
|
110
|
-
|
|
111
|
-
status = d.pop("status", UNSET)
|
|
107
|
+
status = Status(_status)
|
|
112
108
|
|
|
113
109
|
model = cls(
|
|
114
|
-
events=events,
|
|
115
110
|
metadata=metadata,
|
|
116
111
|
spec=spec,
|
|
112
|
+
events=events,
|
|
117
113
|
status=status,
|
|
118
114
|
)
|
|
119
115
|
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from typing import Any, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.model_runtime_type import ModelRuntimeType
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ModelRuntime")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ModelRuntime:
|
|
14
|
+
"""Configuration identifying which external LLM provider and model this gateway endpoint proxies to
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
endpoint_name (Union[Unset, str]): Provider-specific endpoint name (e.g., HuggingFace Inference Endpoints name)
|
|
18
|
+
model (Union[Unset, str]): Model identifier at the provider (e.g., gpt-4.1, claude-sonnet-4-20250514, mistral-
|
|
19
|
+
large-latest) Example: gpt-4.1.
|
|
20
|
+
organization (Union[Unset, str]): Organization or account identifier at the provider (required for some
|
|
21
|
+
providers like OpenAI) Example: org-abc123.
|
|
22
|
+
type_ (Union[Unset, ModelRuntimeType]): LLM provider type determining the API protocol and authentication method
|
|
23
|
+
Example: openai.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
endpoint_name: Union[Unset, str] = UNSET
|
|
27
|
+
model: Union[Unset, str] = UNSET
|
|
28
|
+
organization: Union[Unset, str] = UNSET
|
|
29
|
+
type_: Union[Unset, ModelRuntimeType] = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
endpoint_name = self.endpoint_name
|
|
34
|
+
|
|
35
|
+
model = self.model
|
|
36
|
+
|
|
37
|
+
organization = self.organization
|
|
38
|
+
|
|
39
|
+
type_: Union[Unset, str] = UNSET
|
|
40
|
+
if not isinstance(self.type_, Unset):
|
|
41
|
+
type_ = self.type_.value
|
|
42
|
+
|
|
43
|
+
field_dict: dict[str, Any] = {}
|
|
44
|
+
field_dict.update(self.additional_properties)
|
|
45
|
+
field_dict.update({})
|
|
46
|
+
if endpoint_name is not UNSET:
|
|
47
|
+
field_dict["endpointName"] = endpoint_name
|
|
48
|
+
if model is not UNSET:
|
|
49
|
+
field_dict["model"] = model
|
|
50
|
+
if organization is not UNSET:
|
|
51
|
+
field_dict["organization"] = organization
|
|
52
|
+
if type_ is not UNSET:
|
|
53
|
+
field_dict["type"] = type_
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
59
|
+
if not src_dict:
|
|
60
|
+
return None
|
|
61
|
+
d = src_dict.copy()
|
|
62
|
+
endpoint_name = d.pop("endpointName", d.pop("endpoint_name", UNSET))
|
|
63
|
+
|
|
64
|
+
model = d.pop("model", UNSET)
|
|
65
|
+
|
|
66
|
+
organization = d.pop("organization", UNSET)
|
|
67
|
+
|
|
68
|
+
_type_ = d.pop("type", d.pop("type_", UNSET))
|
|
69
|
+
type_: Union[Unset, ModelRuntimeType]
|
|
70
|
+
if isinstance(_type_, Unset):
|
|
71
|
+
type_ = UNSET
|
|
72
|
+
else:
|
|
73
|
+
type_ = ModelRuntimeType(_type_)
|
|
74
|
+
|
|
75
|
+
model_runtime = cls(
|
|
76
|
+
endpoint_name=endpoint_name,
|
|
77
|
+
model=model,
|
|
78
|
+
organization=organization,
|
|
79
|
+
type_=type_,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
model_runtime.additional_properties = d
|
|
83
|
+
return model_runtime
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def additional_keys(self) -> list[str]:
|
|
87
|
+
return list(self.additional_properties.keys())
|
|
88
|
+
|
|
89
|
+
def __getitem__(self, key: str) -> Any:
|
|
90
|
+
return self.additional_properties[key]
|
|
91
|
+
|
|
92
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
93
|
+
self.additional_properties[key] = value
|
|
94
|
+
|
|
95
|
+
def __delitem__(self, key: str) -> None:
|
|
96
|
+
del self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __contains__(self, key: str) -> bool:
|
|
99
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ModelRuntimeType(str, Enum):
|
|
5
|
+
ANTHROPIC = "anthropic"
|
|
6
|
+
AZURE_AI_INFERENCE = "azure-ai-inference"
|
|
7
|
+
AZURE_MARKETPLACE = "azure-marketplace"
|
|
8
|
+
AZURE_OPENAI_SERVICE = "azure-openai-service"
|
|
9
|
+
CEREBRAS = "cerebras"
|
|
10
|
+
COHERE = "cohere"
|
|
11
|
+
DEEPSEEK = "deepseek"
|
|
12
|
+
GEMINI = "gemini"
|
|
13
|
+
GROQ = "groq"
|
|
14
|
+
HF_PRIVATE_ENDPOINT = "hf_private_endpoint"
|
|
15
|
+
HF_PUBLIC_ENDPOINT = "hf_public_endpoint"
|
|
16
|
+
HUGGINGFACE = "huggingface"
|
|
17
|
+
MCP = "mcp"
|
|
18
|
+
MISTRAL = "mistral"
|
|
19
|
+
OPENAI = "openai"
|
|
20
|
+
PUBLIC_MODEL = "public_model"
|
|
21
|
+
VERTEXAI = "vertexai"
|
|
22
|
+
XAI = "xai"
|
|
23
|
+
|
|
24
|
+
def __str__(self) -> str:
|
|
25
|
+
return str(self.value)
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def _missing_(cls, value: object) -> "ModelRuntimeType | None":
|
|
29
|
+
if isinstance(value, str):
|
|
30
|
+
upper_value = value.upper()
|
|
31
|
+
for member in cls:
|
|
32
|
+
if member.value.upper() == upper_value:
|
|
33
|
+
return member
|
|
34
|
+
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.core_spec_configurations import CoreSpecConfigurations
|
|
10
9
|
from ..models.flavor import Flavor
|
|
11
|
-
from ..models.
|
|
12
|
-
from ..models.runtime import Runtime
|
|
10
|
+
from ..models.model_runtime import ModelRuntime
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
T = TypeVar("T", bound="ModelSpec")
|
|
@@ -17,40 +15,28 @@ T = TypeVar("T", bound="ModelSpec")
|
|
|
17
15
|
|
|
18
16
|
@_attrs_define
|
|
19
17
|
class ModelSpec:
|
|
20
|
-
"""
|
|
18
|
+
"""Configuration for a model gateway endpoint including provider type, credentials, and access policies
|
|
21
19
|
|
|
22
20
|
Attributes:
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
enabled (Union[Unset, bool]): When false, the model endpoint is disabled and will not accept inference requests
|
|
22
|
+
Default: True. Example: True.
|
|
25
23
|
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
|
26
24
|
integration_connections (Union[Unset, list[str]]):
|
|
27
25
|
policies (Union[Unset, list[str]]):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
sandbox (Union[Unset, bool]):
|
|
26
|
+
runtime (Union[Unset, ModelRuntime]): Configuration identifying which external LLM provider and model this
|
|
27
|
+
gateway endpoint proxies to
|
|
28
|
+
sandbox (Union[Unset, bool]): When true, uses sandbox/test credentials from the integration connection
|
|
31
29
|
"""
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
enabled: Union[Unset, bool] = UNSET
|
|
31
|
+
enabled: Union[Unset, bool] = True
|
|
35
32
|
flavors: Union[Unset, list["Flavor"]] = UNSET
|
|
36
33
|
integration_connections: Union[Unset, list[str]] = UNSET
|
|
37
34
|
policies: Union[Unset, list[str]] = UNSET
|
|
38
|
-
|
|
39
|
-
runtime: Union[Unset, "Runtime"] = UNSET
|
|
35
|
+
runtime: Union[Unset, "ModelRuntime"] = UNSET
|
|
40
36
|
sandbox: Union[Unset, bool] = UNSET
|
|
41
37
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
38
|
|
|
43
39
|
def to_dict(self) -> dict[str, Any]:
|
|
44
|
-
configurations: Union[Unset, dict[str, Any]] = UNSET
|
|
45
|
-
if (
|
|
46
|
-
self.configurations
|
|
47
|
-
and not isinstance(self.configurations, Unset)
|
|
48
|
-
and not isinstance(self.configurations, dict)
|
|
49
|
-
):
|
|
50
|
-
configurations = self.configurations.to_dict()
|
|
51
|
-
elif self.configurations and isinstance(self.configurations, dict):
|
|
52
|
-
configurations = self.configurations
|
|
53
|
-
|
|
54
40
|
enabled = self.enabled
|
|
55
41
|
|
|
56
42
|
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
@@ -71,16 +57,6 @@ class ModelSpec:
|
|
|
71
57
|
if not isinstance(self.policies, Unset):
|
|
72
58
|
policies = self.policies
|
|
73
59
|
|
|
74
|
-
revision: Union[Unset, dict[str, Any]] = UNSET
|
|
75
|
-
if (
|
|
76
|
-
self.revision
|
|
77
|
-
and not isinstance(self.revision, Unset)
|
|
78
|
-
and not isinstance(self.revision, dict)
|
|
79
|
-
):
|
|
80
|
-
revision = self.revision.to_dict()
|
|
81
|
-
elif self.revision and isinstance(self.revision, dict):
|
|
82
|
-
revision = self.revision
|
|
83
|
-
|
|
84
60
|
runtime: Union[Unset, dict[str, Any]] = UNSET
|
|
85
61
|
if (
|
|
86
62
|
self.runtime
|
|
@@ -96,8 +72,6 @@ class ModelSpec:
|
|
|
96
72
|
field_dict: dict[str, Any] = {}
|
|
97
73
|
field_dict.update(self.additional_properties)
|
|
98
74
|
field_dict.update({})
|
|
99
|
-
if configurations is not UNSET:
|
|
100
|
-
field_dict["configurations"] = configurations
|
|
101
75
|
if enabled is not UNSET:
|
|
102
76
|
field_dict["enabled"] = enabled
|
|
103
77
|
if flavors is not UNSET:
|
|
@@ -106,8 +80,6 @@ class ModelSpec:
|
|
|
106
80
|
field_dict["integrationConnections"] = integration_connections
|
|
107
81
|
if policies is not UNSET:
|
|
108
82
|
field_dict["policies"] = policies
|
|
109
|
-
if revision is not UNSET:
|
|
110
|
-
field_dict["revision"] = revision
|
|
111
83
|
if runtime is not UNSET:
|
|
112
84
|
field_dict["runtime"] = runtime
|
|
113
85
|
if sandbox is not UNSET:
|
|
@@ -117,21 +89,12 @@ class ModelSpec:
|
|
|
117
89
|
|
|
118
90
|
@classmethod
|
|
119
91
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
120
|
-
from ..models.core_spec_configurations import CoreSpecConfigurations
|
|
121
92
|
from ..models.flavor import Flavor
|
|
122
|
-
from ..models.
|
|
123
|
-
from ..models.runtime import Runtime
|
|
93
|
+
from ..models.model_runtime import ModelRuntime
|
|
124
94
|
|
|
125
95
|
if not src_dict:
|
|
126
96
|
return None
|
|
127
97
|
d = src_dict.copy()
|
|
128
|
-
_configurations = d.pop("configurations", UNSET)
|
|
129
|
-
configurations: Union[Unset, CoreSpecConfigurations]
|
|
130
|
-
if isinstance(_configurations, Unset):
|
|
131
|
-
configurations = UNSET
|
|
132
|
-
else:
|
|
133
|
-
configurations = CoreSpecConfigurations.from_dict(_configurations)
|
|
134
|
-
|
|
135
98
|
enabled = d.pop("enabled", UNSET)
|
|
136
99
|
|
|
137
100
|
flavors = []
|
|
@@ -147,29 +110,20 @@ class ModelSpec:
|
|
|
147
110
|
|
|
148
111
|
policies = cast(list[str], d.pop("policies", UNSET))
|
|
149
112
|
|
|
150
|
-
_revision = d.pop("revision", UNSET)
|
|
151
|
-
revision: Union[Unset, RevisionConfiguration]
|
|
152
|
-
if isinstance(_revision, Unset):
|
|
153
|
-
revision = UNSET
|
|
154
|
-
else:
|
|
155
|
-
revision = RevisionConfiguration.from_dict(_revision)
|
|
156
|
-
|
|
157
113
|
_runtime = d.pop("runtime", UNSET)
|
|
158
|
-
runtime: Union[Unset,
|
|
114
|
+
runtime: Union[Unset, ModelRuntime]
|
|
159
115
|
if isinstance(_runtime, Unset):
|
|
160
116
|
runtime = UNSET
|
|
161
117
|
else:
|
|
162
|
-
runtime =
|
|
118
|
+
runtime = ModelRuntime.from_dict(_runtime)
|
|
163
119
|
|
|
164
120
|
sandbox = d.pop("sandbox", UNSET)
|
|
165
121
|
|
|
166
122
|
model_spec = cls(
|
|
167
|
-
configurations=configurations,
|
|
168
123
|
enabled=enabled,
|
|
169
124
|
flavors=flavors,
|
|
170
125
|
integration_connections=integration_connections,
|
|
171
126
|
policies=policies,
|
|
172
|
-
revision=revision,
|
|
173
127
|
runtime=runtime,
|
|
174
128
|
sandbox=sandbox,
|
|
175
129
|
)
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
from typing import 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
|
|
5
5
|
|
|
6
6
|
from ..types import UNSET, Unset
|
|
7
7
|
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.o_auth_scope_item import OAuthScopeItem
|
|
10
|
+
|
|
11
|
+
|
|
8
12
|
T = TypeVar("T", bound="OAuth")
|
|
9
13
|
|
|
10
14
|
|
|
@@ -13,18 +17,24 @@ class OAuth:
|
|
|
13
17
|
"""OAuth of the artifact
|
|
14
18
|
|
|
15
19
|
Attributes:
|
|
16
|
-
scope (Union[Unset, list[
|
|
20
|
+
scope (Union[Unset, list['OAuthScopeItem']]): Scope of the OAuth
|
|
17
21
|
type_ (Union[Unset, str]): Type of the OAuth
|
|
18
22
|
"""
|
|
19
23
|
|
|
20
|
-
scope: Union[Unset, list[
|
|
24
|
+
scope: Union[Unset, list["OAuthScopeItem"]] = UNSET
|
|
21
25
|
type_: Union[Unset, str] = UNSET
|
|
22
26
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
27
|
|
|
24
28
|
def to_dict(self) -> dict[str, Any]:
|
|
25
|
-
scope: Union[Unset, list[Any]] = UNSET
|
|
29
|
+
scope: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
26
30
|
if not isinstance(self.scope, Unset):
|
|
27
|
-
scope =
|
|
31
|
+
scope = []
|
|
32
|
+
for scope_item_data in self.scope:
|
|
33
|
+
if type(scope_item_data) is dict:
|
|
34
|
+
scope_item = scope_item_data
|
|
35
|
+
else:
|
|
36
|
+
scope_item = scope_item_data.to_dict()
|
|
37
|
+
scope.append(scope_item)
|
|
28
38
|
|
|
29
39
|
type_ = self.type_
|
|
30
40
|
|
|
@@ -40,10 +50,17 @@ class OAuth:
|
|
|
40
50
|
|
|
41
51
|
@classmethod
|
|
42
52
|
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
|
|
53
|
+
from ..models.o_auth_scope_item import OAuthScopeItem
|
|
54
|
+
|
|
43
55
|
if not src_dict:
|
|
44
56
|
return None
|
|
45
57
|
d = src_dict.copy()
|
|
46
|
-
scope =
|
|
58
|
+
scope = []
|
|
59
|
+
_scope = d.pop("scope", UNSET)
|
|
60
|
+
for scope_item_data in _scope or []:
|
|
61
|
+
scope_item = OAuthScopeItem.from_dict(scope_item_data)
|
|
62
|
+
|
|
63
|
+
scope.append(scope_item)
|
|
47
64
|
|
|
48
65
|
type_ = d.pop("type", d.pop("type_", UNSET))
|
|
49
66
|
|
|
@@ -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="OAuthScopeItem")
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@_attrs_define
|
|
10
|
-
class
|
|
11
|
-
"""
|
|
10
|
+
class OAuthScopeItem:
|
|
11
|
+
""" """
|
|
12
12
|
|
|
13
13
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
14
14
|
|
|
@@ -23,10 +23,10 @@ class FormOauth:
|
|
|
23
23
|
if not src_dict:
|
|
24
24
|
return None
|
|
25
25
|
d = src_dict.copy()
|
|
26
|
-
|
|
26
|
+
o_auth_scope_item = cls()
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
return
|
|
28
|
+
o_auth_scope_item.additional_properties = d
|
|
29
|
+
return o_auth_scope_item
|
|
30
30
|
|
|
31
31
|
@property
|
|
32
32
|
def additional_keys(self) -> list[str]:
|
|
@@ -18,7 +18,8 @@ class PendingInvitationAccept:
|
|
|
18
18
|
|
|
19
19
|
Attributes:
|
|
20
20
|
email (Union[Unset, str]): User email
|
|
21
|
-
workspace (Union[Unset, Workspace]):
|
|
21
|
+
workspace (Union[Unset, Workspace]): Tenant container that groups all Blaxel resources (agents, functions,
|
|
22
|
+
models, etc.) with shared team access control and billing.
|
|
22
23
|
"""
|
|
23
24
|
|
|
24
25
|
email: Union[Unset, str] = UNSET
|