beamlit 0.1.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/__init__.py +8 -0
- beamlit/api/__init__.py +1 -0
- beamlit/api/agents/__init__.py +0 -0
- beamlit/api/agents/create_agent.py +155 -0
- beamlit/api/agents/create_agent_release.py +146 -0
- beamlit/api/agents/delete_agent.py +146 -0
- beamlit/api/agents/delete_agent_deployment.py +163 -0
- beamlit/api/agents/delete_agent_deployment_history.py +172 -0
- beamlit/api/agents/get_agent.py +146 -0
- beamlit/api/agents/get_agent_deployment.py +163 -0
- beamlit/api/agents/get_agent_deployment_history.py +172 -0
- beamlit/api/agents/get_agent_deployment_logs.py +164 -0
- beamlit/api/agents/get_agent_deployment_metrics.py +159 -0
- beamlit/api/agents/get_agent_metrics.py +150 -0
- beamlit/api/agents/list_agent_deployment_history.py +164 -0
- beamlit/api/agents/list_agent_deployments.py +155 -0
- beamlit/api/agents/list_agents.py +127 -0
- beamlit/api/agents/put_agent_deployment.py +185 -0
- beamlit/api/agents/put_agent_deployment_history.py +198 -0
- beamlit/api/agents/update_agent.py +168 -0
- beamlit/api/authentication_providers/__init__.py +0 -0
- beamlit/api/authentication_providers/get_model_with_repo_for_authentication_provider.py +184 -0
- beamlit/api/authentication_providers/list_models_for_authentication_provider.py +163 -0
- beamlit/api/authentication_providers/list_organizations_for_authentication_provider.py +163 -0
- beamlit/api/configurations/__init__.py +0 -0
- beamlit/api/configurations/get_configuration.py +122 -0
- beamlit/api/environments/__init__.py +0 -0
- beamlit/api/environments/create_environment.py +167 -0
- beamlit/api/environments/delete_environment.py +154 -0
- beamlit/api/environments/get_environment.py +154 -0
- beamlit/api/environments/get_environment_metrics.py +158 -0
- beamlit/api/environments/list_environments.py +139 -0
- beamlit/api/environments/update_environment.py +180 -0
- beamlit/api/functions/__init__.py +0 -0
- beamlit/api/functions/create_function.py +155 -0
- beamlit/api/functions/create_function_release.py +150 -0
- beamlit/api/functions/delete_function.py +146 -0
- beamlit/api/functions/delete_function_deployment.py +163 -0
- beamlit/api/functions/get_function.py +146 -0
- beamlit/api/functions/get_function_deployment.py +163 -0
- beamlit/api/functions/get_function_deployment_logs.py +164 -0
- beamlit/api/functions/get_function_deployment_metrics.py +159 -0
- beamlit/api/functions/get_function_metrics.py +150 -0
- beamlit/api/functions/list_function_deployments.py +155 -0
- beamlit/api/functions/list_functions.py +131 -0
- beamlit/api/functions/put_function_deployment.py +185 -0
- beamlit/api/functions/update_function.py +168 -0
- beamlit/api/history/__init__.py +0 -0
- beamlit/api/history/get_agents_history.py +155 -0
- beamlit/api/history/list_agents_history.py +131 -0
- beamlit/api/invitations/__init__.py +0 -0
- beamlit/api/invitations/list_all_pending_invitations.py +142 -0
- beamlit/api/locations/__init__.py +0 -0
- beamlit/api/locations/list_locations.py +139 -0
- beamlit/api/metrics/__init__.py +0 -0
- beamlit/api/metrics/get_metrics.py +130 -0
- beamlit/api/model_providers/__init__.py +0 -0
- beamlit/api/model_providers/create_model_provider.py +163 -0
- beamlit/api/model_providers/delete_model_provider.py +154 -0
- beamlit/api/model_providers/get_model_provider.py +154 -0
- beamlit/api/model_providers/list_model_providers.py +139 -0
- beamlit/api/model_providers/update_model_provider.py +176 -0
- beamlit/api/models/__init__.py +0 -0
- beamlit/api/models/create_model.py +168 -0
- beamlit/api/models/delete_model.py +154 -0
- beamlit/api/models/delete_model_deployment.py +171 -0
- beamlit/api/models/get_model.py +154 -0
- beamlit/api/models/get_model_deployment.py +171 -0
- beamlit/api/models/get_model_deployment_logs.py +168 -0
- beamlit/api/models/get_model_deployment_metrics.py +163 -0
- beamlit/api/models/get_model_metrics.py +154 -0
- beamlit/api/models/list_model_deployments.py +163 -0
- beamlit/api/models/list_models.py +135 -0
- beamlit/api/models/put_model_deployment.py +193 -0
- beamlit/api/models/release_model.py +154 -0
- beamlit/api/models/update_model.py +181 -0
- beamlit/api/policies/__init__.py +0 -0
- beamlit/api/policies/create_policy.py +167 -0
- beamlit/api/policies/delete_policy.py +154 -0
- beamlit/api/policies/get_policy.py +154 -0
- beamlit/api/policies/list_policies.py +139 -0
- beamlit/api/policies/update_policy.py +180 -0
- beamlit/api/service_accounts/__init__.py +0 -0
- beamlit/api/service_accounts/create_api_key_for_service_account.py +177 -0
- beamlit/api/service_accounts/create_workspace_service_account.py +168 -0
- beamlit/api/service_accounts/delete_api_key_for_service_account.py +104 -0
- beamlit/api/service_accounts/delete_workspace_service_account.py +158 -0
- beamlit/api/service_accounts/get_workspace_service_accounts.py +139 -0
- beamlit/api/service_accounts/list_api_keys_for_service_account.py +163 -0
- beamlit/api/service_accounts/update_workspace_service_account.py +181 -0
- beamlit/api/store/__init__.py +0 -0
- beamlit/api/store/get_store_agent.py +146 -0
- beamlit/api/store/get_store_function.py +146 -0
- beamlit/api/store/list_store_agents.py +131 -0
- beamlit/api/store/list_store_functions.py +131 -0
- beamlit/api/workspaces/__init__.py +0 -0
- beamlit/api/workspaces/accept_workspace_invitation.py +161 -0
- beamlit/api/workspaces/create_worspace.py +163 -0
- beamlit/api/workspaces/decline_workspace_invitation.py +158 -0
- beamlit/api/workspaces/delete_workspace.py +154 -0
- beamlit/api/workspaces/get_workspace.py +154 -0
- beamlit/api/workspaces/invite_workspace_user.py +174 -0
- beamlit/api/workspaces/leave_workspace.py +161 -0
- beamlit/api/workspaces/list_workspace_users.py +139 -0
- beamlit/api/workspaces/list_workspaces.py +139 -0
- beamlit/api/workspaces/remove_workspace_user.py +101 -0
- beamlit/api/workspaces/update_workspace.py +176 -0
- beamlit/api/workspaces/update_workspace_user_role.py +187 -0
- beamlit/authentication/__init__.py +24 -0
- beamlit/authentication/apikey.py +14 -0
- beamlit/authentication/authentication.py +35 -0
- beamlit/authentication/credentials.py +165 -0
- beamlit/authentication/device_mode.py +115 -0
- beamlit/client.py +270 -0
- beamlit/errors.py +16 -0
- beamlit/models/__init__.py +189 -0
- beamlit/models/acl.py +149 -0
- beamlit/models/agent.py +151 -0
- beamlit/models/agent_chain.py +77 -0
- beamlit/models/agent_configuration.py +68 -0
- beamlit/models/agent_deployment.py +327 -0
- beamlit/models/agent_deployment_configuration.py +43 -0
- beamlit/models/agent_deployment_history.py +183 -0
- beamlit/models/agent_deployment_history_event.py +131 -0
- beamlit/models/agent_deployment_pod_template.py +43 -0
- beamlit/models/agent_release.py +68 -0
- beamlit/models/api_key.py +140 -0
- beamlit/models/authentication_provider_model.py +142 -0
- beamlit/models/authentication_provider_organization.py +86 -0
- beamlit/models/configuration.py +72 -0
- beamlit/models/continent.py +68 -0
- beamlit/models/country.py +68 -0
- beamlit/models/create_api_key_for_service_account_body.py +67 -0
- beamlit/models/create_workspace_service_account_body.py +69 -0
- beamlit/models/create_workspace_service_account_response_200.py +103 -0
- beamlit/models/delete_workspace_service_account_response_200.py +94 -0
- beamlit/models/deployment_configuration.py +68 -0
- beamlit/models/deployment_configurations.py +43 -0
- beamlit/models/deployment_serverless_config.py +129 -0
- beamlit/models/environment.py +162 -0
- beamlit/models/environment_metrics.py +75 -0
- beamlit/models/flavor.py +68 -0
- beamlit/models/function.py +151 -0
- beamlit/models/function_configuration.py +68 -0
- beamlit/models/function_deployment.py +327 -0
- beamlit/models/function_deployment_configuration.py +43 -0
- beamlit/models/function_deployment_pod_template.py +43 -0
- beamlit/models/function_kit.py +95 -0
- beamlit/models/function_provider_ref.py +68 -0
- beamlit/models/function_release.py +68 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +94 -0
- beamlit/models/invite_workspace_user_body.py +58 -0
- beamlit/models/labels.py +43 -0
- beamlit/models/labels_type_0.py +43 -0
- beamlit/models/location.py +120 -0
- beamlit/models/location_response.py +111 -0
- beamlit/models/metric.py +68 -0
- beamlit/models/metrics.py +111 -0
- beamlit/models/model.py +151 -0
- beamlit/models/model_deployment.py +283 -0
- beamlit/models/model_deployment_log.py +68 -0
- beamlit/models/model_deployment_metrics.py +170 -0
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +75 -0
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/model_deployment_pod_template.py +43 -0
- beamlit/models/model_metrics.py +94 -0
- beamlit/models/model_provider.py +187 -0
- beamlit/models/model_provider_ref.py +68 -0
- beamlit/models/model_release.py +68 -0
- beamlit/models/model_with_deployments.py +174 -0
- beamlit/models/pending_invitation.py +122 -0
- beamlit/models/pending_invitation_accept.py +81 -0
- beamlit/models/pending_invitation_render.py +135 -0
- beamlit/models/pending_invitation_render_invited_by.py +86 -0
- beamlit/models/pending_invitation_render_workspace.py +68 -0
- beamlit/models/pending_invitation_workspace_details.py +70 -0
- beamlit/models/policy.py +216 -0
- beamlit/models/policy_location.py +68 -0
- beamlit/models/provider_config.py +101 -0
- beamlit/models/qps.py +59 -0
- beamlit/models/resource_deployment_log.py +68 -0
- beamlit/models/resource_deployment_metrics.py +172 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_metrics.py +94 -0
- beamlit/models/runtime.py +152 -0
- beamlit/models/runtime_readiness_probe.py +43 -0
- beamlit/models/runtime_resources.py +43 -0
- beamlit/models/serverless_config.py +122 -0
- beamlit/models/standard_fields_dynamo_db.py +86 -0
- beamlit/models/store_agent.py +165 -0
- beamlit/models/store_agent_configuration.py +95 -0
- beamlit/models/store_agent_labels.py +43 -0
- beamlit/models/store_configuration.py +149 -0
- beamlit/models/store_configuration_option.py +77 -0
- beamlit/models/store_function.py +207 -0
- beamlit/models/store_function_configuration.py +95 -0
- beamlit/models/store_function_kit.py +95 -0
- beamlit/models/store_function_labels.py +43 -0
- beamlit/models/store_function_parameter.py +86 -0
- beamlit/models/update_workspace_service_account_body.py +67 -0
- beamlit/models/update_workspace_service_account_response_200.py +94 -0
- beamlit/models/update_workspace_user_role_body.py +58 -0
- beamlit/models/workspace.py +126 -0
- beamlit/models/workspace_labels.py +43 -0
- beamlit/models/workspace_user.py +113 -0
- beamlit/py.typed +1 -0
- beamlit/types.py +46 -0
- beamlit-0.1.0.dist-info/METADATA +59 -0
- beamlit-0.1.0.dist-info/RECORD +211 -0
- beamlit-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,70 @@
|
|
1
|
+
from typing import Any, List, Type, 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
|
+
T = TypeVar("T", bound="PendingInvitationWorkspaceDetails")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class PendingInvitationWorkspaceDetails:
|
13
|
+
"""Workspace details
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
emails (Union[Unset, List[Any]]): List of user emails in the workspace
|
17
|
+
user_number (Union[Unset, float]): Number of users in the workspace
|
18
|
+
"""
|
19
|
+
|
20
|
+
emails: Union[Unset, List[Any]] = UNSET
|
21
|
+
user_number: Union[Unset, float] = UNSET
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
23
|
+
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
25
|
+
emails: Union[Unset, List[Any]] = UNSET
|
26
|
+
if not isinstance(self.emails, Unset):
|
27
|
+
emails = self.emails
|
28
|
+
|
29
|
+
user_number = self.user_number
|
30
|
+
|
31
|
+
field_dict: dict[str, Any] = {}
|
32
|
+
field_dict.update(self.additional_properties)
|
33
|
+
field_dict.update({})
|
34
|
+
if emails is not UNSET:
|
35
|
+
field_dict["emails"] = emails
|
36
|
+
if user_number is not UNSET:
|
37
|
+
field_dict["user_number"] = user_number
|
38
|
+
|
39
|
+
return field_dict
|
40
|
+
|
41
|
+
@classmethod
|
42
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
43
|
+
d = src_dict.copy()
|
44
|
+
emails = cast(List[Any], d.pop("emails", UNSET))
|
45
|
+
|
46
|
+
user_number = d.pop("user_number", UNSET)
|
47
|
+
|
48
|
+
pending_invitation_workspace_details = cls(
|
49
|
+
emails=emails,
|
50
|
+
user_number=user_number,
|
51
|
+
)
|
52
|
+
|
53
|
+
pending_invitation_workspace_details.additional_properties = d
|
54
|
+
return pending_invitation_workspace_details
|
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
|
beamlit/models/policy.py
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, 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.flavor import Flavor
|
10
|
+
from ..models.labels_type_0 import LabelsType0
|
11
|
+
from ..models.policy_location import PolicyLocation
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="Policy")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class Policy:
|
19
|
+
"""Rule that controls how a deployment is made and served (e.g. location restrictions)
|
20
|
+
|
21
|
+
Attributes:
|
22
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
23
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
24
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
25
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
26
|
+
display_name (Union[Unset, str]): Policy display name
|
27
|
+
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
28
|
+
labels (Union['LabelsType0', None, Unset]): Labels
|
29
|
+
locations (Union[Unset, List['PolicyLocation']]): PolicyLocations is a local type that wraps a slice of Location
|
30
|
+
name (Union[Unset, str]): Policy name
|
31
|
+
resource_types (Union[Unset, List[str]]): PolicyResourceTypes is a local type that wraps a slice of
|
32
|
+
PolicyResourceType
|
33
|
+
type (Union[Unset, str]): Policy type, can be location or flavor
|
34
|
+
workspace (Union[Unset, str]): The workspace the policy belongs to
|
35
|
+
"""
|
36
|
+
|
37
|
+
created_at: Union[Unset, str] = UNSET
|
38
|
+
created_by: Union[Unset, str] = UNSET
|
39
|
+
updated_at: Union[Unset, str] = UNSET
|
40
|
+
updated_by: Union[Unset, str] = UNSET
|
41
|
+
display_name: Union[Unset, str] = UNSET
|
42
|
+
flavors: Union[Unset, List["Flavor"]] = UNSET
|
43
|
+
labels: Union["LabelsType0", None, Unset] = UNSET
|
44
|
+
locations: Union[Unset, List["PolicyLocation"]] = UNSET
|
45
|
+
name: Union[Unset, str] = UNSET
|
46
|
+
resource_types: Union[Unset, List[str]] = UNSET
|
47
|
+
type: Union[Unset, str] = UNSET
|
48
|
+
workspace: Union[Unset, str] = UNSET
|
49
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
50
|
+
|
51
|
+
def to_dict(self) -> dict[str, Any]:
|
52
|
+
from ..models.labels_type_0 import LabelsType0
|
53
|
+
|
54
|
+
created_at = self.created_at
|
55
|
+
|
56
|
+
created_by = self.created_by
|
57
|
+
|
58
|
+
updated_at = self.updated_at
|
59
|
+
|
60
|
+
updated_by = self.updated_by
|
61
|
+
|
62
|
+
display_name = self.display_name
|
63
|
+
|
64
|
+
flavors: Union[Unset, List[Dict[str, Any]]] = UNSET
|
65
|
+
if not isinstance(self.flavors, Unset):
|
66
|
+
flavors = []
|
67
|
+
for componentsschemas_flavors_item_data in self.flavors:
|
68
|
+
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
69
|
+
flavors.append(componentsschemas_flavors_item)
|
70
|
+
|
71
|
+
labels: Union[Dict[str, Any], None, Unset]
|
72
|
+
if isinstance(self.labels, Unset):
|
73
|
+
labels = UNSET
|
74
|
+
elif isinstance(self.labels, LabelsType0):
|
75
|
+
labels = self.labels.to_dict()
|
76
|
+
else:
|
77
|
+
labels = self.labels
|
78
|
+
|
79
|
+
locations: Union[Unset, List[Dict[str, Any]]] = UNSET
|
80
|
+
if not isinstance(self.locations, Unset):
|
81
|
+
locations = []
|
82
|
+
for componentsschemas_policy_locations_item_data in self.locations:
|
83
|
+
componentsschemas_policy_locations_item = componentsschemas_policy_locations_item_data.to_dict()
|
84
|
+
locations.append(componentsschemas_policy_locations_item)
|
85
|
+
|
86
|
+
name = self.name
|
87
|
+
|
88
|
+
resource_types: Union[Unset, List[str]] = UNSET
|
89
|
+
if not isinstance(self.resource_types, Unset):
|
90
|
+
resource_types = self.resource_types
|
91
|
+
|
92
|
+
type = self.type
|
93
|
+
|
94
|
+
workspace = self.workspace
|
95
|
+
|
96
|
+
field_dict: dict[str, Any] = {}
|
97
|
+
field_dict.update(self.additional_properties)
|
98
|
+
field_dict.update({})
|
99
|
+
if created_at is not UNSET:
|
100
|
+
field_dict["created_at"] = created_at
|
101
|
+
if created_by is not UNSET:
|
102
|
+
field_dict["created_by"] = created_by
|
103
|
+
if updated_at is not UNSET:
|
104
|
+
field_dict["updated_at"] = updated_at
|
105
|
+
if updated_by is not UNSET:
|
106
|
+
field_dict["updated_by"] = updated_by
|
107
|
+
if display_name is not UNSET:
|
108
|
+
field_dict["display_name"] = display_name
|
109
|
+
if flavors is not UNSET:
|
110
|
+
field_dict["flavors"] = flavors
|
111
|
+
if labels is not UNSET:
|
112
|
+
field_dict["labels"] = labels
|
113
|
+
if locations is not UNSET:
|
114
|
+
field_dict["locations"] = locations
|
115
|
+
if name is not UNSET:
|
116
|
+
field_dict["name"] = name
|
117
|
+
if resource_types is not UNSET:
|
118
|
+
field_dict["resource_types"] = resource_types
|
119
|
+
if type is not UNSET:
|
120
|
+
field_dict["type"] = type
|
121
|
+
if workspace is not UNSET:
|
122
|
+
field_dict["workspace"] = workspace
|
123
|
+
|
124
|
+
return field_dict
|
125
|
+
|
126
|
+
@classmethod
|
127
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
128
|
+
from ..models.flavor import Flavor
|
129
|
+
from ..models.labels_type_0 import LabelsType0
|
130
|
+
from ..models.policy_location import PolicyLocation
|
131
|
+
|
132
|
+
d = src_dict.copy()
|
133
|
+
created_at = d.pop("created_at", UNSET)
|
134
|
+
|
135
|
+
created_by = d.pop("created_by", UNSET)
|
136
|
+
|
137
|
+
updated_at = d.pop("updated_at", UNSET)
|
138
|
+
|
139
|
+
updated_by = d.pop("updated_by", UNSET)
|
140
|
+
|
141
|
+
display_name = d.pop("display_name", UNSET)
|
142
|
+
|
143
|
+
flavors = []
|
144
|
+
_flavors = d.pop("flavors", UNSET)
|
145
|
+
for componentsschemas_flavors_item_data in _flavors or []:
|
146
|
+
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
147
|
+
|
148
|
+
flavors.append(componentsschemas_flavors_item)
|
149
|
+
|
150
|
+
def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
|
151
|
+
if data is None:
|
152
|
+
return data
|
153
|
+
if isinstance(data, Unset):
|
154
|
+
return data
|
155
|
+
try:
|
156
|
+
if not isinstance(data, dict):
|
157
|
+
raise TypeError()
|
158
|
+
componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
|
159
|
+
|
160
|
+
return componentsschemas_labels_type_0
|
161
|
+
except: # noqa: E722
|
162
|
+
pass
|
163
|
+
return cast(Union["LabelsType0", None, Unset], data)
|
164
|
+
|
165
|
+
labels = _parse_labels(d.pop("labels", UNSET))
|
166
|
+
|
167
|
+
locations = []
|
168
|
+
_locations = d.pop("locations", UNSET)
|
169
|
+
for componentsschemas_policy_locations_item_data in _locations or []:
|
170
|
+
componentsschemas_policy_locations_item = PolicyLocation.from_dict(
|
171
|
+
componentsschemas_policy_locations_item_data
|
172
|
+
)
|
173
|
+
|
174
|
+
locations.append(componentsschemas_policy_locations_item)
|
175
|
+
|
176
|
+
name = d.pop("name", UNSET)
|
177
|
+
|
178
|
+
resource_types = cast(List[str], d.pop("resource_types", UNSET))
|
179
|
+
|
180
|
+
type = d.pop("type", UNSET)
|
181
|
+
|
182
|
+
workspace = d.pop("workspace", UNSET)
|
183
|
+
|
184
|
+
policy = cls(
|
185
|
+
created_at=created_at,
|
186
|
+
created_by=created_by,
|
187
|
+
updated_at=updated_at,
|
188
|
+
updated_by=updated_by,
|
189
|
+
display_name=display_name,
|
190
|
+
flavors=flavors,
|
191
|
+
labels=labels,
|
192
|
+
locations=locations,
|
193
|
+
name=name,
|
194
|
+
resource_types=resource_types,
|
195
|
+
type=type,
|
196
|
+
workspace=workspace,
|
197
|
+
)
|
198
|
+
|
199
|
+
policy.additional_properties = d
|
200
|
+
return policy
|
201
|
+
|
202
|
+
@property
|
203
|
+
def additional_keys(self) -> list[str]:
|
204
|
+
return list(self.additional_properties.keys())
|
205
|
+
|
206
|
+
def __getitem__(self, key: str) -> Any:
|
207
|
+
return self.additional_properties[key]
|
208
|
+
|
209
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
210
|
+
self.additional_properties[key] = value
|
211
|
+
|
212
|
+
def __delitem__(self, key: str) -> None:
|
213
|
+
del self.additional_properties[key]
|
214
|
+
|
215
|
+
def __contains__(self, key: str) -> bool:
|
216
|
+
return key in self.additional_properties
|
@@ -0,0 +1,68 @@
|
|
1
|
+
from typing import Any, Type, 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="PolicyLocation")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class PolicyLocation:
|
13
|
+
"""Policy location
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
name (Union[Unset, str]): Policy location name
|
17
|
+
type (Union[Unset, str]): Policy location type
|
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
|
+
d = src_dict.copy()
|
42
|
+
name = d.pop("name", UNSET)
|
43
|
+
|
44
|
+
type = d.pop("type", UNSET)
|
45
|
+
|
46
|
+
policy_location = cls(
|
47
|
+
name=name,
|
48
|
+
type=type,
|
49
|
+
)
|
50
|
+
|
51
|
+
policy_location.additional_properties = d
|
52
|
+
return policy_location
|
53
|
+
|
54
|
+
@property
|
55
|
+
def additional_keys(self) -> list[str]:
|
56
|
+
return list(self.additional_properties.keys())
|
57
|
+
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
59
|
+
return self.additional_properties[key]
|
60
|
+
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
62
|
+
self.additional_properties[key] = value
|
63
|
+
|
64
|
+
def __delitem__(self, key: str) -> None:
|
65
|
+
del self.additional_properties[key]
|
66
|
+
|
67
|
+
def __contains__(self, key: str) -> bool:
|
68
|
+
return key in self.additional_properties
|
@@ -0,0 +1,101 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, 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.runtime import Runtime
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="ProviderConfig")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class ProviderConfig:
|
17
|
+
"""Model provider config
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
access_token (Union[Unset, str]): The access token to use for the provider
|
21
|
+
filename (Union[Unset, str]): The file name to use for the model
|
22
|
+
presigned_url (Union[Unset, List[Any]]): The presigned URLs to upload the model to
|
23
|
+
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
24
|
+
"""
|
25
|
+
|
26
|
+
access_token: Union[Unset, str] = UNSET
|
27
|
+
filename: Union[Unset, str] = UNSET
|
28
|
+
presigned_url: Union[Unset, List[Any]] = UNSET
|
29
|
+
runtime: Union[Unset, "Runtime"] = UNSET
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
|
+
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
33
|
+
access_token = self.access_token
|
34
|
+
|
35
|
+
filename = self.filename
|
36
|
+
|
37
|
+
presigned_url: Union[Unset, List[Any]] = UNSET
|
38
|
+
if not isinstance(self.presigned_url, Unset):
|
39
|
+
presigned_url = self.presigned_url
|
40
|
+
|
41
|
+
runtime: Union[Unset, Dict[str, Any]] = UNSET
|
42
|
+
if not isinstance(self.runtime, Unset):
|
43
|
+
runtime = self.runtime.to_dict()
|
44
|
+
|
45
|
+
field_dict: dict[str, Any] = {}
|
46
|
+
field_dict.update(self.additional_properties)
|
47
|
+
field_dict.update({})
|
48
|
+
if access_token is not UNSET:
|
49
|
+
field_dict["access_token"] = access_token
|
50
|
+
if filename is not UNSET:
|
51
|
+
field_dict["filename"] = filename
|
52
|
+
if presigned_url is not UNSET:
|
53
|
+
field_dict["presigned_url"] = presigned_url
|
54
|
+
if runtime is not UNSET:
|
55
|
+
field_dict["runtime"] = runtime
|
56
|
+
|
57
|
+
return field_dict
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
61
|
+
from ..models.runtime import Runtime
|
62
|
+
|
63
|
+
d = src_dict.copy()
|
64
|
+
access_token = d.pop("access_token", UNSET)
|
65
|
+
|
66
|
+
filename = d.pop("filename", UNSET)
|
67
|
+
|
68
|
+
presigned_url = cast(List[Any], d.pop("presigned_url", UNSET))
|
69
|
+
|
70
|
+
_runtime = d.pop("runtime", UNSET)
|
71
|
+
runtime: Union[Unset, Runtime]
|
72
|
+
if isinstance(_runtime, Unset):
|
73
|
+
runtime = UNSET
|
74
|
+
else:
|
75
|
+
runtime = Runtime.from_dict(_runtime)
|
76
|
+
|
77
|
+
provider_config = cls(
|
78
|
+
access_token=access_token,
|
79
|
+
filename=filename,
|
80
|
+
presigned_url=presigned_url,
|
81
|
+
runtime=runtime,
|
82
|
+
)
|
83
|
+
|
84
|
+
provider_config.additional_properties = d
|
85
|
+
return provider_config
|
86
|
+
|
87
|
+
@property
|
88
|
+
def additional_keys(self) -> list[str]:
|
89
|
+
return list(self.additional_properties.keys())
|
90
|
+
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
92
|
+
return self.additional_properties[key]
|
93
|
+
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
95
|
+
self.additional_properties[key] = value
|
96
|
+
|
97
|
+
def __delitem__(self, key: str) -> None:
|
98
|
+
del self.additional_properties[key]
|
99
|
+
|
100
|
+
def __contains__(self, key: str) -> bool:
|
101
|
+
return key in self.additional_properties
|
beamlit/models/qps.py
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
from typing import Any, Type, 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="QPS")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class QPS:
|
13
|
+
"""Query per second per element, can be per response status code (e.g. 200, 400) or per location
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
region_code (Union[Unset, float]): QPS for location
|
17
|
+
"""
|
18
|
+
|
19
|
+
region_code: Union[Unset, float] = UNSET
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
+
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
23
|
+
region_code = self.region_code
|
24
|
+
|
25
|
+
field_dict: dict[str, Any] = {}
|
26
|
+
field_dict.update(self.additional_properties)
|
27
|
+
field_dict.update({})
|
28
|
+
if region_code is not UNSET:
|
29
|
+
field_dict["region_code"] = region_code
|
30
|
+
|
31
|
+
return field_dict
|
32
|
+
|
33
|
+
@classmethod
|
34
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
35
|
+
d = src_dict.copy()
|
36
|
+
region_code = d.pop("region_code", UNSET)
|
37
|
+
|
38
|
+
qps = cls(
|
39
|
+
region_code=region_code,
|
40
|
+
)
|
41
|
+
|
42
|
+
qps.additional_properties = d
|
43
|
+
return qps
|
44
|
+
|
45
|
+
@property
|
46
|
+
def additional_keys(self) -> list[str]:
|
47
|
+
return list(self.additional_properties.keys())
|
48
|
+
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
50
|
+
return self.additional_properties[key]
|
51
|
+
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
53
|
+
self.additional_properties[key] = value
|
54
|
+
|
55
|
+
def __delitem__(self, key: str) -> None:
|
56
|
+
del self.additional_properties[key]
|
57
|
+
|
58
|
+
def __contains__(self, key: str) -> bool:
|
59
|
+
return key in self.additional_properties
|
@@ -0,0 +1,68 @@
|
|
1
|
+
from typing import Any, Type, 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="ResourceDeploymentLog")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class ResourceDeploymentLog:
|
13
|
+
"""Log for a resource deployment (eg. model deployment, function deployment)
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
message (Union[Unset, str]): Content of the log
|
17
|
+
timestamp (Union[Unset, str]): The timestamp of the log
|
18
|
+
"""
|
19
|
+
|
20
|
+
message: Union[Unset, str] = UNSET
|
21
|
+
timestamp: 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
|
+
message = self.message
|
26
|
+
|
27
|
+
timestamp = self.timestamp
|
28
|
+
|
29
|
+
field_dict: dict[str, Any] = {}
|
30
|
+
field_dict.update(self.additional_properties)
|
31
|
+
field_dict.update({})
|
32
|
+
if message is not UNSET:
|
33
|
+
field_dict["message"] = message
|
34
|
+
if timestamp is not UNSET:
|
35
|
+
field_dict["timestamp"] = timestamp
|
36
|
+
|
37
|
+
return field_dict
|
38
|
+
|
39
|
+
@classmethod
|
40
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
41
|
+
d = src_dict.copy()
|
42
|
+
message = d.pop("message", UNSET)
|
43
|
+
|
44
|
+
timestamp = d.pop("timestamp", UNSET)
|
45
|
+
|
46
|
+
resource_deployment_log = cls(
|
47
|
+
message=message,
|
48
|
+
timestamp=timestamp,
|
49
|
+
)
|
50
|
+
|
51
|
+
resource_deployment_log.additional_properties = d
|
52
|
+
return resource_deployment_log
|
53
|
+
|
54
|
+
@property
|
55
|
+
def additional_keys(self) -> list[str]:
|
56
|
+
return list(self.additional_properties.keys())
|
57
|
+
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
59
|
+
return self.additional_properties[key]
|
60
|
+
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
62
|
+
self.additional_properties[key] = value
|
63
|
+
|
64
|
+
def __delitem__(self, key: str) -> None:
|
65
|
+
del self.additional_properties[key]
|
66
|
+
|
67
|
+
def __contains__(self, key: str) -> bool:
|
68
|
+
return key in self.additional_properties
|