blaxel 0.64.0__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 +8 -0
- blaxel/agents/__init__.py +5 -0
- blaxel/agents/chain.py +153 -0
- blaxel/agents/chat.py +286 -0
- blaxel/agents/decorator.py +208 -0
- blaxel/agents/thread.py +24 -0
- blaxel/agents/voice/openai.py +255 -0
- blaxel/agents/voice/utils.py +25 -0
- blaxel/api/__init__.py +1 -0
- blaxel/api/agents/__init__.py +0 -0
- blaxel/api/agents/create_agent.py +155 -0
- blaxel/api/agents/delete_agent.py +146 -0
- blaxel/api/agents/get_agent.py +146 -0
- blaxel/api/agents/get_agent_logs.py +151 -0
- blaxel/api/agents/get_agent_metrics.py +150 -0
- blaxel/api/agents/get_agent_trace_ids.py +201 -0
- blaxel/api/agents/list_agent_revisions.py +155 -0
- blaxel/api/agents/list_agents.py +127 -0
- blaxel/api/agents/update_agent.py +168 -0
- blaxel/api/configurations/__init__.py +0 -0
- blaxel/api/configurations/get_configuration.py +122 -0
- blaxel/api/default/__init__.py +0 -0
- blaxel/api/default/get_trace.py +150 -0
- blaxel/api/default/get_trace_ids.py +218 -0
- blaxel/api/default/get_trace_logs.py +186 -0
- blaxel/api/default/list_mcp_hub_definitions.py +127 -0
- blaxel/api/functions/__init__.py +0 -0
- blaxel/api/functions/create_function.py +155 -0
- blaxel/api/functions/delete_function.py +146 -0
- blaxel/api/functions/get_function.py +146 -0
- blaxel/api/functions/get_function_logs.py +151 -0
- blaxel/api/functions/get_function_metrics.py +150 -0
- blaxel/api/functions/get_function_trace_ids.py +201 -0
- blaxel/api/functions/list_function_revisions.py +158 -0
- blaxel/api/functions/list_functions.py +131 -0
- blaxel/api/functions/update_function.py +168 -0
- blaxel/api/integrations/__init__.py +0 -0
- blaxel/api/integrations/create_integration_connection.py +167 -0
- blaxel/api/integrations/delete_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration.py +97 -0
- blaxel/api/integrations/get_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration_connection_model.py +104 -0
- blaxel/api/integrations/get_integration_connection_model_endpoint_configurations.py +97 -0
- blaxel/api/integrations/list_integration_connection_models.py +97 -0
- blaxel/api/integrations/list_integration_connections.py +139 -0
- blaxel/api/integrations/update_integration_connection.py +180 -0
- blaxel/api/invitations/__init__.py +0 -0
- blaxel/api/invitations/list_all_pending_invitations.py +142 -0
- blaxel/api/knowledgebases/__init__.py +0 -0
- blaxel/api/knowledgebases/create_knowledgebase.py +163 -0
- blaxel/api/knowledgebases/delete_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/get_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/list_knowledgebase_revisions.py +158 -0
- blaxel/api/knowledgebases/list_knowledgebases.py +139 -0
- blaxel/api/knowledgebases/update_knowledgebase.py +176 -0
- blaxel/api/locations/__init__.py +0 -0
- blaxel/api/locations/list_locations.py +139 -0
- blaxel/api/metrics/__init__.py +0 -0
- blaxel/api/metrics/get_metrics.py +130 -0
- blaxel/api/models/__init__.py +0 -0
- blaxel/api/models/create_model.py +163 -0
- blaxel/api/models/delete_model.py +154 -0
- blaxel/api/models/get_model.py +154 -0
- blaxel/api/models/get_model_logs.py +155 -0
- blaxel/api/models/get_model_metrics.py +158 -0
- blaxel/api/models/get_model_trace_ids.py +201 -0
- blaxel/api/models/list_model_revisions.py +158 -0
- blaxel/api/models/list_models.py +135 -0
- blaxel/api/models/update_model.py +176 -0
- blaxel/api/policies/__init__.py +0 -0
- blaxel/api/policies/create_policy.py +167 -0
- blaxel/api/policies/delete_policy.py +154 -0
- blaxel/api/policies/get_policy.py +154 -0
- blaxel/api/policies/list_policies.py +139 -0
- blaxel/api/policies/update_policy.py +180 -0
- blaxel/api/privateclusters/__init__.py +0 -0
- blaxel/api/privateclusters/create_private_cluster.py +132 -0
- blaxel/api/privateclusters/delete_private_cluster.py +156 -0
- blaxel/api/privateclusters/get_private_cluster.py +159 -0
- blaxel/api/privateclusters/get_private_cluster_health.py +97 -0
- blaxel/api/privateclusters/list_private_clusters.py +140 -0
- blaxel/api/privateclusters/update_private_cluster.py +156 -0
- blaxel/api/privateclusters/update_private_cluster_health.py +97 -0
- blaxel/api/service_accounts/__init__.py +0 -0
- blaxel/api/service_accounts/create_api_key_for_service_account.py +177 -0
- blaxel/api/service_accounts/create_workspace_service_account.py +170 -0
- blaxel/api/service_accounts/delete_api_key_for_service_account.py +104 -0
- blaxel/api/service_accounts/delete_workspace_service_account.py +160 -0
- blaxel/api/service_accounts/get_workspace_service_accounts.py +141 -0
- blaxel/api/service_accounts/list_api_keys_for_service_account.py +163 -0
- blaxel/api/service_accounts/update_workspace_service_account.py +183 -0
- blaxel/api/store/__init__.py +0 -0
- blaxel/api/store/get_store_agent.py +146 -0
- blaxel/api/store/get_store_function.py +146 -0
- blaxel/api/store/list_store_agents.py +131 -0
- blaxel/api/store/list_store_functions.py +131 -0
- blaxel/api/workspaces/__init__.py +0 -0
- blaxel/api/workspaces/accept_workspace_invitation.py +161 -0
- blaxel/api/workspaces/create_worspace.py +163 -0
- blaxel/api/workspaces/decline_workspace_invitation.py +158 -0
- blaxel/api/workspaces/delete_workspace.py +154 -0
- blaxel/api/workspaces/get_workspace.py +154 -0
- blaxel/api/workspaces/invite_workspace_user.py +174 -0
- blaxel/api/workspaces/leave_workspace.py +161 -0
- blaxel/api/workspaces/list_workspace_users.py +139 -0
- blaxel/api/workspaces/list_workspaces.py +139 -0
- blaxel/api/workspaces/remove_workspace_user.py +101 -0
- blaxel/api/workspaces/update_workspace.py +176 -0
- blaxel/api/workspaces/update_workspace_user_role.py +187 -0
- blaxel/authentication/__init__.py +45 -0
- blaxel/authentication/apikey.py +50 -0
- blaxel/authentication/authentication.py +176 -0
- blaxel/authentication/clientcredentials.py +103 -0
- blaxel/authentication/credentials.py +295 -0
- blaxel/authentication/device_mode.py +197 -0
- blaxel/client.py +281 -0
- blaxel/common/__init__.py +17 -0
- blaxel/common/error.py +27 -0
- blaxel/common/instrumentation.py +317 -0
- blaxel/common/logger.py +60 -0
- blaxel/common/secrets.py +39 -0
- blaxel/common/settings.py +150 -0
- blaxel/common/slugify.py +18 -0
- blaxel/common/utils.py +34 -0
- blaxel/deploy/__init__.py +8 -0
- blaxel/deploy/deploy.py +316 -0
- blaxel/deploy/format.py +46 -0
- blaxel/deploy/parser.py +192 -0
- blaxel/errors.py +16 -0
- blaxel/functions/__init__.py +7 -0
- blaxel/functions/common.py +228 -0
- blaxel/functions/decorator.py +64 -0
- blaxel/functions/local/local.py +48 -0
- blaxel/functions/mcp/client.py +96 -0
- blaxel/functions/mcp/mcp.py +168 -0
- blaxel/functions/mcp/utils.py +56 -0
- blaxel/functions/remote/remote.py +183 -0
- blaxel/models/__init__.py +233 -0
- blaxel/models/acl.py +133 -0
- blaxel/models/agent.py +126 -0
- blaxel/models/agent_chain.py +88 -0
- blaxel/models/agent_spec.py +346 -0
- blaxel/models/api_key.py +142 -0
- blaxel/models/configuration.py +85 -0
- blaxel/models/continent.py +70 -0
- blaxel/models/core_event.py +97 -0
- blaxel/models/core_spec.py +249 -0
- blaxel/models/core_spec_configurations.py +77 -0
- blaxel/models/country.py +70 -0
- blaxel/models/create_api_key_for_service_account_body.py +69 -0
- blaxel/models/create_workspace_service_account_body.py +71 -0
- blaxel/models/create_workspace_service_account_response_200.py +105 -0
- blaxel/models/delete_workspace_service_account_response_200.py +96 -0
- blaxel/models/entrypoint.py +96 -0
- blaxel/models/entrypoint_env.py +45 -0
- blaxel/models/flavor.py +70 -0
- blaxel/models/form.py +120 -0
- blaxel/models/form_config.py +45 -0
- blaxel/models/form_oauthomitempty.py +45 -0
- blaxel/models/form_secrets.py +45 -0
- blaxel/models/function.py +126 -0
- blaxel/models/function_kit.py +97 -0
- blaxel/models/function_spec.py +310 -0
- blaxel/models/get_trace_ids_response_200.py +45 -0
- blaxel/models/get_trace_logs_response_200.py +45 -0
- blaxel/models/get_trace_response_200.py +45 -0
- blaxel/models/get_workspace_service_accounts_response_200_item.py +96 -0
- blaxel/models/histogram_bucket.py +79 -0
- blaxel/models/histogram_stats.py +88 -0
- blaxel/models/integration_connection.py +96 -0
- blaxel/models/integration_connection_spec.py +114 -0
- blaxel/models/integration_connection_spec_config.py +45 -0
- blaxel/models/integration_connection_spec_secret.py +45 -0
- blaxel/models/integration_model.py +162 -0
- blaxel/models/integration_repository.py +88 -0
- blaxel/models/invite_workspace_user_body.py +60 -0
- blaxel/models/knowledgebase.py +126 -0
- blaxel/models/knowledgebase_spec.py +163 -0
- blaxel/models/knowledgebase_spec_options.py +45 -0
- blaxel/models/last_n_requests_metric.py +79 -0
- blaxel/models/latency_metric.py +144 -0
- blaxel/models/location_response.py +113 -0
- blaxel/models/mcp_definition.py +188 -0
- blaxel/models/mcp_definition_entrypoint.py +45 -0
- blaxel/models/mcp_definition_form.py +45 -0
- blaxel/models/metadata.py +139 -0
- blaxel/models/metadata_labels.py +45 -0
- blaxel/models/metric.py +79 -0
- blaxel/models/metrics.py +169 -0
- blaxel/models/metrics_models.py +45 -0
- blaxel/models/metrics_request_total_per_code.py +45 -0
- blaxel/models/metrics_rps_per_code.py +45 -0
- blaxel/models/model.py +126 -0
- blaxel/models/model_private_cluster.py +79 -0
- blaxel/models/model_spec.py +249 -0
- blaxel/models/o_auth.py +72 -0
- blaxel/models/owner_fields.py +70 -0
- blaxel/models/pending_invitation.py +124 -0
- blaxel/models/pending_invitation_accept.py +85 -0
- blaxel/models/pending_invitation_render.py +147 -0
- blaxel/models/pending_invitation_render_invited_by.py +88 -0
- blaxel/models/pending_invitation_render_workspace.py +70 -0
- blaxel/models/pending_invitation_workspace_details.py +72 -0
- blaxel/models/pod_template_spec.py +45 -0
- blaxel/models/policy.py +96 -0
- blaxel/models/policy_location.py +70 -0
- blaxel/models/policy_max_tokens.py +106 -0
- blaxel/models/policy_spec.py +151 -0
- blaxel/models/private_cluster.py +183 -0
- blaxel/models/private_location.py +61 -0
- blaxel/models/repository.py +70 -0
- blaxel/models/request_duration_over_time_metric.py +97 -0
- blaxel/models/request_duration_over_time_metrics.py +80 -0
- blaxel/models/request_total_by_origin_metric.py +115 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin.py +45 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +45 -0
- blaxel/models/request_total_metric.py +123 -0
- blaxel/models/request_total_metric_request_total_per_code.py +45 -0
- blaxel/models/request_total_metric_rps_per_code.py +45 -0
- blaxel/models/resource_log.py +79 -0
- blaxel/models/resource_metrics.py +270 -0
- blaxel/models/resource_metrics_request_total_per_code.py +45 -0
- blaxel/models/resource_metrics_rps_per_code.py +45 -0
- blaxel/models/revision_configuration.py +97 -0
- blaxel/models/revision_metadata.py +124 -0
- blaxel/models/runtime.py +196 -0
- blaxel/models/runtime_startup_probe.py +45 -0
- blaxel/models/serverless_config.py +80 -0
- blaxel/models/spec_configuration.py +70 -0
- blaxel/models/store_agent.py +178 -0
- blaxel/models/store_agent_labels.py +45 -0
- blaxel/models/store_configuration.py +151 -0
- blaxel/models/store_configuration_option.py +79 -0
- blaxel/models/store_function.py +211 -0
- blaxel/models/store_function_kit.py +97 -0
- blaxel/models/store_function_labels.py +45 -0
- blaxel/models/store_function_parameter.py +88 -0
- blaxel/models/time_fields.py +70 -0
- blaxel/models/token_rate_metric.py +88 -0
- blaxel/models/token_rate_metrics.py +120 -0
- blaxel/models/token_total_metric.py +106 -0
- blaxel/models/trace_ids_response.py +45 -0
- blaxel/models/update_workspace_service_account_body.py +69 -0
- blaxel/models/update_workspace_service_account_response_200.py +96 -0
- blaxel/models/update_workspace_user_role_body.py +60 -0
- blaxel/models/websocket_channel.py +88 -0
- blaxel/models/workspace.py +148 -0
- blaxel/models/workspace_labels.py +45 -0
- blaxel/models/workspace_user.py +115 -0
- blaxel/py.typed +1 -0
- blaxel/run.py +108 -0
- blaxel/serve/app.py +131 -0
- blaxel/serve/middlewares/__init__.py +10 -0
- blaxel/serve/middlewares/accesslog.py +32 -0
- blaxel/serve/middlewares/processtime.py +28 -0
- blaxel/types.py +46 -0
- blaxel-0.64.0.dist-info/METADATA +96 -0
- blaxel-0.64.0.dist-info/RECORD +261 -0
- blaxel-0.64.0.dist-info/WHEEL +4 -0
- blaxel-0.64.0.dist-info/entry_points.txt +2 -0
- blaxel-0.64.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,77 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.spec_configuration import SpecConfiguration
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="CoreSpecConfigurations")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class CoreSpecConfigurations:
|
17
|
+
"""Optional configurations for the object
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
key (Union[Unset, SpecConfiguration]): Configuration, this is a key value storage. In your object you can
|
21
|
+
retrieve the value with config[key]
|
22
|
+
"""
|
23
|
+
|
24
|
+
key: Union[Unset, "SpecConfiguration"] = UNSET
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
26
|
+
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
28
|
+
key: Union[Unset, dict[str, Any]] = UNSET
|
29
|
+
if self.key and not isinstance(self.key, Unset) and not isinstance(self.key, dict):
|
30
|
+
key = self.key.to_dict()
|
31
|
+
elif self.key and isinstance(self.key, dict):
|
32
|
+
key = self.key
|
33
|
+
|
34
|
+
field_dict: dict[str, Any] = {}
|
35
|
+
field_dict.update(self.additional_properties)
|
36
|
+
field_dict.update({})
|
37
|
+
if key is not UNSET:
|
38
|
+
field_dict["key"] = key
|
39
|
+
|
40
|
+
return field_dict
|
41
|
+
|
42
|
+
@classmethod
|
43
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
44
|
+
from ..models.spec_configuration import SpecConfiguration
|
45
|
+
|
46
|
+
if not src_dict:
|
47
|
+
return None
|
48
|
+
d = src_dict.copy()
|
49
|
+
_key = d.pop("key", UNSET)
|
50
|
+
key: Union[Unset, SpecConfiguration]
|
51
|
+
if isinstance(_key, Unset):
|
52
|
+
key = UNSET
|
53
|
+
else:
|
54
|
+
key = SpecConfiguration.from_dict(_key)
|
55
|
+
|
56
|
+
core_spec_configurations = cls(
|
57
|
+
key=key,
|
58
|
+
)
|
59
|
+
|
60
|
+
core_spec_configurations.additional_properties = d
|
61
|
+
return core_spec_configurations
|
62
|
+
|
63
|
+
@property
|
64
|
+
def additional_keys(self) -> list[str]:
|
65
|
+
return list(self.additional_properties.keys())
|
66
|
+
|
67
|
+
def __getitem__(self, key: str) -> Any:
|
68
|
+
return self.additional_properties[key]
|
69
|
+
|
70
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
71
|
+
self.additional_properties[key] = value
|
72
|
+
|
73
|
+
def __delitem__(self, key: str) -> None:
|
74
|
+
del self.additional_properties[key]
|
75
|
+
|
76
|
+
def __contains__(self, key: str) -> bool:
|
77
|
+
return key in self.additional_properties
|
blaxel/models/country.py
ADDED
@@ -0,0 +1,70 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="Country")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class Country:
|
13
|
+
"""Configuration
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
display_name (Union[Unset, str]): Country display name
|
17
|
+
name (Union[Unset, str]): Country code
|
18
|
+
"""
|
19
|
+
|
20
|
+
display_name: Union[Unset, str] = UNSET
|
21
|
+
name: Union[Unset, str] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
display_name = self.display_name
|
26
|
+
|
27
|
+
name = self.name
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if display_name is not UNSET:
|
33
|
+
field_dict["displayName"] = display_name
|
34
|
+
if name is not UNSET:
|
35
|
+
field_dict["name"] = name
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
|
+
if not src_dict:
|
42
|
+
return None
|
43
|
+
d = src_dict.copy()
|
44
|
+
display_name = d.pop("displayName", UNSET)
|
45
|
+
|
46
|
+
name = d.pop("name", UNSET)
|
47
|
+
|
48
|
+
country = cls(
|
49
|
+
display_name=display_name,
|
50
|
+
name=name,
|
51
|
+
)
|
52
|
+
|
53
|
+
country.additional_properties = d
|
54
|
+
return country
|
55
|
+
|
56
|
+
@property
|
57
|
+
def additional_keys(self) -> list[str]:
|
58
|
+
return list(self.additional_properties.keys())
|
59
|
+
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
61
|
+
return self.additional_properties[key]
|
62
|
+
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
64
|
+
self.additional_properties[key] = value
|
65
|
+
|
66
|
+
def __delitem__(self, key: str) -> None:
|
67
|
+
del self.additional_properties[key]
|
68
|
+
|
69
|
+
def __contains__(self, key: str) -> bool:
|
70
|
+
return key in self.additional_properties
|
@@ -0,0 +1,69 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="CreateApiKeyForServiceAccountBody")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class CreateApiKeyForServiceAccountBody:
|
13
|
+
"""
|
14
|
+
Attributes:
|
15
|
+
expires_in (Union[Unset, str]): Expiration period for the API key
|
16
|
+
name (Union[Unset, str]): Name for the API key
|
17
|
+
"""
|
18
|
+
|
19
|
+
expires_in: Union[Unset, str] = UNSET
|
20
|
+
name: Union[Unset, str] = UNSET
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
22
|
+
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
24
|
+
expires_in = self.expires_in
|
25
|
+
|
26
|
+
name = self.name
|
27
|
+
|
28
|
+
field_dict: dict[str, Any] = {}
|
29
|
+
field_dict.update(self.additional_properties)
|
30
|
+
field_dict.update({})
|
31
|
+
if expires_in is not UNSET:
|
32
|
+
field_dict["expires_in"] = expires_in
|
33
|
+
if name is not UNSET:
|
34
|
+
field_dict["name"] = name
|
35
|
+
|
36
|
+
return field_dict
|
37
|
+
|
38
|
+
@classmethod
|
39
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
40
|
+
if not src_dict:
|
41
|
+
return None
|
42
|
+
d = src_dict.copy()
|
43
|
+
expires_in = d.pop("expires_in", UNSET)
|
44
|
+
|
45
|
+
name = d.pop("name", UNSET)
|
46
|
+
|
47
|
+
create_api_key_for_service_account_body = cls(
|
48
|
+
expires_in=expires_in,
|
49
|
+
name=name,
|
50
|
+
)
|
51
|
+
|
52
|
+
create_api_key_for_service_account_body.additional_properties = d
|
53
|
+
return create_api_key_for_service_account_body
|
54
|
+
|
55
|
+
@property
|
56
|
+
def additional_keys(self) -> list[str]:
|
57
|
+
return list(self.additional_properties.keys())
|
58
|
+
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
60
|
+
return self.additional_properties[key]
|
61
|
+
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
63
|
+
self.additional_properties[key] = value
|
64
|
+
|
65
|
+
def __delitem__(self, key: str) -> None:
|
66
|
+
del self.additional_properties[key]
|
67
|
+
|
68
|
+
def __contains__(self, key: str) -> bool:
|
69
|
+
return key in self.additional_properties
|
@@ -0,0 +1,71 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="CreateWorkspaceServiceAccountBody")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class CreateWorkspaceServiceAccountBody:
|
13
|
+
"""
|
14
|
+
Attributes:
|
15
|
+
name (str): Service account name
|
16
|
+
description (Union[Unset, str]): Service account description
|
17
|
+
"""
|
18
|
+
|
19
|
+
name: str
|
20
|
+
description: Union[Unset, str] = UNSET
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
22
|
+
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
24
|
+
name = self.name
|
25
|
+
|
26
|
+
description = self.description
|
27
|
+
|
28
|
+
field_dict: dict[str, Any] = {}
|
29
|
+
field_dict.update(self.additional_properties)
|
30
|
+
field_dict.update(
|
31
|
+
{
|
32
|
+
"name": name,
|
33
|
+
}
|
34
|
+
)
|
35
|
+
if description is not UNSET:
|
36
|
+
field_dict["description"] = description
|
37
|
+
|
38
|
+
return field_dict
|
39
|
+
|
40
|
+
@classmethod
|
41
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
42
|
+
if not src_dict:
|
43
|
+
return None
|
44
|
+
d = src_dict.copy()
|
45
|
+
name = d.pop("name")
|
46
|
+
|
47
|
+
description = d.pop("description", UNSET)
|
48
|
+
|
49
|
+
create_workspace_service_account_body = cls(
|
50
|
+
name=name,
|
51
|
+
description=description,
|
52
|
+
)
|
53
|
+
|
54
|
+
create_workspace_service_account_body.additional_properties = d
|
55
|
+
return create_workspace_service_account_body
|
56
|
+
|
57
|
+
@property
|
58
|
+
def additional_keys(self) -> list[str]:
|
59
|
+
return list(self.additional_properties.keys())
|
60
|
+
|
61
|
+
def __getitem__(self, key: str) -> Any:
|
62
|
+
return self.additional_properties[key]
|
63
|
+
|
64
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
65
|
+
self.additional_properties[key] = value
|
66
|
+
|
67
|
+
def __delitem__(self, key: str) -> None:
|
68
|
+
del self.additional_properties[key]
|
69
|
+
|
70
|
+
def __contains__(self, key: str) -> bool:
|
71
|
+
return key in self.additional_properties
|
@@ -0,0 +1,105 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="CreateWorkspaceServiceAccountResponse200")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class CreateWorkspaceServiceAccountResponse200:
|
13
|
+
"""
|
14
|
+
Attributes:
|
15
|
+
client_id (Union[Unset, str]): Service account client ID
|
16
|
+
client_secret (Union[Unset, str]): Service account client secret (only returned on creation)
|
17
|
+
created_at (Union[Unset, str]): Creation timestamp
|
18
|
+
description (Union[Unset, str]): Service account description
|
19
|
+
name (Union[Unset, str]): Service account name
|
20
|
+
updated_at (Union[Unset, str]): Last update timestamp
|
21
|
+
"""
|
22
|
+
|
23
|
+
client_id: Union[Unset, str] = UNSET
|
24
|
+
client_secret: Union[Unset, str] = UNSET
|
25
|
+
created_at: Union[Unset, str] = UNSET
|
26
|
+
description: Union[Unset, str] = UNSET
|
27
|
+
name: Union[Unset, str] = UNSET
|
28
|
+
updated_at: Union[Unset, str] = UNSET
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
30
|
+
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
32
|
+
client_id = self.client_id
|
33
|
+
|
34
|
+
client_secret = self.client_secret
|
35
|
+
|
36
|
+
created_at = self.created_at
|
37
|
+
|
38
|
+
description = self.description
|
39
|
+
|
40
|
+
name = self.name
|
41
|
+
|
42
|
+
updated_at = self.updated_at
|
43
|
+
|
44
|
+
field_dict: dict[str, Any] = {}
|
45
|
+
field_dict.update(self.additional_properties)
|
46
|
+
field_dict.update({})
|
47
|
+
if client_id is not UNSET:
|
48
|
+
field_dict["client_id"] = client_id
|
49
|
+
if client_secret is not UNSET:
|
50
|
+
field_dict["client_secret"] = client_secret
|
51
|
+
if created_at is not UNSET:
|
52
|
+
field_dict["created_at"] = created_at
|
53
|
+
if description is not UNSET:
|
54
|
+
field_dict["description"] = description
|
55
|
+
if name is not UNSET:
|
56
|
+
field_dict["name"] = name
|
57
|
+
if updated_at is not UNSET:
|
58
|
+
field_dict["updated_at"] = updated_at
|
59
|
+
|
60
|
+
return field_dict
|
61
|
+
|
62
|
+
@classmethod
|
63
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
64
|
+
if not src_dict:
|
65
|
+
return None
|
66
|
+
d = src_dict.copy()
|
67
|
+
client_id = d.pop("client_id", UNSET)
|
68
|
+
|
69
|
+
client_secret = d.pop("client_secret", UNSET)
|
70
|
+
|
71
|
+
created_at = d.pop("created_at", UNSET)
|
72
|
+
|
73
|
+
description = d.pop("description", UNSET)
|
74
|
+
|
75
|
+
name = d.pop("name", UNSET)
|
76
|
+
|
77
|
+
updated_at = d.pop("updated_at", UNSET)
|
78
|
+
|
79
|
+
create_workspace_service_account_response_200 = cls(
|
80
|
+
client_id=client_id,
|
81
|
+
client_secret=client_secret,
|
82
|
+
created_at=created_at,
|
83
|
+
description=description,
|
84
|
+
name=name,
|
85
|
+
updated_at=updated_at,
|
86
|
+
)
|
87
|
+
|
88
|
+
create_workspace_service_account_response_200.additional_properties = d
|
89
|
+
return create_workspace_service_account_response_200
|
90
|
+
|
91
|
+
@property
|
92
|
+
def additional_keys(self) -> list[str]:
|
93
|
+
return list(self.additional_properties.keys())
|
94
|
+
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
96
|
+
return self.additional_properties[key]
|
97
|
+
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
99
|
+
self.additional_properties[key] = value
|
100
|
+
|
101
|
+
def __delitem__(self, key: str) -> None:
|
102
|
+
del self.additional_properties[key]
|
103
|
+
|
104
|
+
def __contains__(self, key: str) -> bool:
|
105
|
+
return key in self.additional_properties
|
@@ -0,0 +1,96 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="DeleteWorkspaceServiceAccountResponse200")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class DeleteWorkspaceServiceAccountResponse200:
|
13
|
+
"""
|
14
|
+
Attributes:
|
15
|
+
client_id (Union[Unset, str]): Service account client ID
|
16
|
+
created_at (Union[Unset, str]): Creation timestamp
|
17
|
+
description (Union[Unset, str]): Service account description
|
18
|
+
name (Union[Unset, str]): Service account name
|
19
|
+
updated_at (Union[Unset, str]): Last update timestamp
|
20
|
+
"""
|
21
|
+
|
22
|
+
client_id: Union[Unset, str] = UNSET
|
23
|
+
created_at: Union[Unset, str] = UNSET
|
24
|
+
description: Union[Unset, str] = UNSET
|
25
|
+
name: Union[Unset, str] = UNSET
|
26
|
+
updated_at: Union[Unset, str] = UNSET
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
28
|
+
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
30
|
+
client_id = self.client_id
|
31
|
+
|
32
|
+
created_at = self.created_at
|
33
|
+
|
34
|
+
description = self.description
|
35
|
+
|
36
|
+
name = self.name
|
37
|
+
|
38
|
+
updated_at = self.updated_at
|
39
|
+
|
40
|
+
field_dict: dict[str, Any] = {}
|
41
|
+
field_dict.update(self.additional_properties)
|
42
|
+
field_dict.update({})
|
43
|
+
if client_id is not UNSET:
|
44
|
+
field_dict["client_id"] = client_id
|
45
|
+
if created_at is not UNSET:
|
46
|
+
field_dict["created_at"] = created_at
|
47
|
+
if description is not UNSET:
|
48
|
+
field_dict["description"] = description
|
49
|
+
if name is not UNSET:
|
50
|
+
field_dict["name"] = name
|
51
|
+
if updated_at is not UNSET:
|
52
|
+
field_dict["updated_at"] = updated_at
|
53
|
+
|
54
|
+
return field_dict
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
58
|
+
if not src_dict:
|
59
|
+
return None
|
60
|
+
d = src_dict.copy()
|
61
|
+
client_id = d.pop("client_id", UNSET)
|
62
|
+
|
63
|
+
created_at = d.pop("created_at", UNSET)
|
64
|
+
|
65
|
+
description = d.pop("description", UNSET)
|
66
|
+
|
67
|
+
name = d.pop("name", UNSET)
|
68
|
+
|
69
|
+
updated_at = d.pop("updated_at", UNSET)
|
70
|
+
|
71
|
+
delete_workspace_service_account_response_200 = cls(
|
72
|
+
client_id=client_id,
|
73
|
+
created_at=created_at,
|
74
|
+
description=description,
|
75
|
+
name=name,
|
76
|
+
updated_at=updated_at,
|
77
|
+
)
|
78
|
+
|
79
|
+
delete_workspace_service_account_response_200.additional_properties = d
|
80
|
+
return delete_workspace_service_account_response_200
|
81
|
+
|
82
|
+
@property
|
83
|
+
def additional_keys(self) -> list[str]:
|
84
|
+
return list(self.additional_properties.keys())
|
85
|
+
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
87
|
+
return self.additional_properties[key]
|
88
|
+
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
90
|
+
self.additional_properties[key] = value
|
91
|
+
|
92
|
+
def __delitem__(self, key: str) -> None:
|
93
|
+
del self.additional_properties[key]
|
94
|
+
|
95
|
+
def __contains__(self, key: str) -> bool:
|
96
|
+
return key in self.additional_properties
|
@@ -0,0 +1,96 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.entrypoint_env import EntrypointEnv
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="Entrypoint")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class Entrypoint:
|
17
|
+
"""Entrypoint of the artifact
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
args (Union[Unset, list[Any]]): Args of the entrypoint
|
21
|
+
command (Union[Unset, str]): Command of the entrypoint
|
22
|
+
env (Union[Unset, EntrypointEnv]): Env of the entrypoint
|
23
|
+
"""
|
24
|
+
|
25
|
+
args: Union[Unset, list[Any]] = UNSET
|
26
|
+
command: Union[Unset, str] = UNSET
|
27
|
+
env: Union[Unset, "EntrypointEnv"] = UNSET
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
29
|
+
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
31
|
+
args: Union[Unset, list[Any]] = UNSET
|
32
|
+
if not isinstance(self.args, Unset):
|
33
|
+
args = self.args
|
34
|
+
|
35
|
+
command = self.command
|
36
|
+
|
37
|
+
env: Union[Unset, dict[str, Any]] = UNSET
|
38
|
+
if self.env and not isinstance(self.env, Unset) and not isinstance(self.env, dict):
|
39
|
+
env = self.env.to_dict()
|
40
|
+
elif self.env and isinstance(self.env, dict):
|
41
|
+
env = self.env
|
42
|
+
|
43
|
+
field_dict: dict[str, Any] = {}
|
44
|
+
field_dict.update(self.additional_properties)
|
45
|
+
field_dict.update({})
|
46
|
+
if args is not UNSET:
|
47
|
+
field_dict["args"] = args
|
48
|
+
if command is not UNSET:
|
49
|
+
field_dict["command"] = command
|
50
|
+
if env is not UNSET:
|
51
|
+
field_dict["env"] = env
|
52
|
+
|
53
|
+
return field_dict
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
57
|
+
from ..models.entrypoint_env import EntrypointEnv
|
58
|
+
|
59
|
+
if not src_dict:
|
60
|
+
return None
|
61
|
+
d = src_dict.copy()
|
62
|
+
args = cast(list[Any], d.pop("args", UNSET))
|
63
|
+
|
64
|
+
command = d.pop("command", UNSET)
|
65
|
+
|
66
|
+
_env = d.pop("env", UNSET)
|
67
|
+
env: Union[Unset, EntrypointEnv]
|
68
|
+
if isinstance(_env, Unset):
|
69
|
+
env = UNSET
|
70
|
+
else:
|
71
|
+
env = EntrypointEnv.from_dict(_env)
|
72
|
+
|
73
|
+
entrypoint = cls(
|
74
|
+
args=args,
|
75
|
+
command=command,
|
76
|
+
env=env,
|
77
|
+
)
|
78
|
+
|
79
|
+
entrypoint.additional_properties = d
|
80
|
+
return entrypoint
|
81
|
+
|
82
|
+
@property
|
83
|
+
def additional_keys(self) -> list[str]:
|
84
|
+
return list(self.additional_properties.keys())
|
85
|
+
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
87
|
+
return self.additional_properties[key]
|
88
|
+
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
90
|
+
self.additional_properties[key] = value
|
91
|
+
|
92
|
+
def __delitem__(self, key: str) -> None:
|
93
|
+
del self.additional_properties[key]
|
94
|
+
|
95
|
+
def __contains__(self, key: str) -> bool:
|
96
|
+
return key in self.additional_properties
|
@@ -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="EntrypointEnv")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class EntrypointEnv:
|
11
|
+
"""Env of the entrypoint"""
|
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:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
entrypoint_env = cls()
|
27
|
+
|
28
|
+
entrypoint_env.additional_properties = d
|
29
|
+
return entrypoint_env
|
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
|
blaxel/models/flavor.py
ADDED
@@ -0,0 +1,70 @@
|
|
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 ..types import UNSET, Unset
|
7
|
+
|
8
|
+
T = TypeVar("T", bound="Flavor")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class Flavor:
|
13
|
+
"""A type of hardware available for deployments
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
name (Union[Unset, str]): Flavor name (e.g. t4)
|
17
|
+
type_ (Union[Unset, str]): Flavor type (e.g. cpu, gpu)
|
18
|
+
"""
|
19
|
+
|
20
|
+
name: Union[Unset, str] = UNSET
|
21
|
+
type_: Union[Unset, str] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
name = self.name
|
26
|
+
|
27
|
+
type_ = self.type_
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if name is not UNSET:
|
33
|
+
field_dict["name"] = name
|
34
|
+
if type_ is not UNSET:
|
35
|
+
field_dict["type"] = type_
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
|
+
if not src_dict:
|
42
|
+
return None
|
43
|
+
d = src_dict.copy()
|
44
|
+
name = d.pop("name", UNSET)
|
45
|
+
|
46
|
+
type_ = d.pop("type", UNSET)
|
47
|
+
|
48
|
+
flavor = cls(
|
49
|
+
name=name,
|
50
|
+
type_=type_,
|
51
|
+
)
|
52
|
+
|
53
|
+
flavor.additional_properties = d
|
54
|
+
return flavor
|
55
|
+
|
56
|
+
@property
|
57
|
+
def additional_keys(self) -> list[str]:
|
58
|
+
return list(self.additional_properties.keys())
|
59
|
+
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
61
|
+
return self.additional_properties[key]
|
62
|
+
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
64
|
+
self.additional_properties[key] = value
|
65
|
+
|
66
|
+
def __delitem__(self, key: str) -> None:
|
67
|
+
del self.additional_properties[key]
|
68
|
+
|
69
|
+
def __contains__(self, key: str) -> bool:
|
70
|
+
return key in self.additional_properties
|