beamlit 0.0.20rc2__py3-none-any.whl → 0.0.20rc4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/api/agents/delete_agent_history.py +155 -0
- beamlit/api/agents/get_agent_deployment.py +1 -22
- beamlit/api/agents/get_agent_environment_logs.py +151 -0
- beamlit/api/agents/get_agent_history.py +155 -0
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/put_agent_history.py +181 -0
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/models/get_model_environment_logs.py +155 -0
- beamlit/common/generate.py +8 -3
- beamlit/common/settings.py +1 -6
- beamlit/models/__init__.py +28 -30
- beamlit/models/acl.py +2 -0
- beamlit/models/agent.py +2 -0
- beamlit/models/agent_chain.py +2 -0
- beamlit/models/agent_configuration.py +2 -0
- beamlit/models/agent_deployment.py +44 -99
- beamlit/models/agent_deployment_configuration.py +45 -0
- beamlit/models/agent_deployment_history.py +15 -46
- beamlit/models/agent_deployment_history_event.py +24 -78
- beamlit/models/agent_deployment_pod_template.py +45 -0
- beamlit/models/agent_history.py +165 -0
- beamlit/models/agent_history_event.py +131 -0
- beamlit/models/agent_metadata.py +144 -0
- beamlit/models/agent_release.py +2 -0
- beamlit/models/agent_spec.py +238 -0
- beamlit/models/agent_with_deployments.py +2 -0
- beamlit/models/api_key.py +2 -0
- beamlit/models/authentication_provider_model.py +2 -0
- beamlit/models/authentication_provider_organization.py +2 -0
- beamlit/models/configuration.py +2 -0
- beamlit/models/continent.py +2 -0
- beamlit/models/core_spec.py +179 -0
- beamlit/models/country.py +2 -0
- beamlit/models/create_api_key_for_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_response_200.py +2 -0
- beamlit/models/delete_workspace_service_account_response_200.py +2 -0
- beamlit/models/deployment_configuration.py +2 -0
- beamlit/models/deployment_configurations.py +2 -0
- beamlit/models/deployment_serverless_config.py +131 -0
- beamlit/models/environment.py +2 -0
- beamlit/models/environment_metrics.py +2 -0
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +2 -0
- beamlit/models/function.py +2 -0
- beamlit/models/function_configuration.py +2 -0
- beamlit/models/function_deployment.py +44 -99
- beamlit/models/function_deployment_configuration.py +45 -0
- beamlit/models/function_deployment_pod_template.py +45 -0
- beamlit/models/function_kit.py +2 -0
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +2 -0
- beamlit/models/function_release.py +2 -0
- beamlit/models/function_spec.py +240 -0
- beamlit/models/function_with_deployments.py +2 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +2 -0
- beamlit/models/increase_and_rate_metric.py +2 -0
- beamlit/models/integration.py +2 -0
- beamlit/models/integration_config.py +2 -0
- beamlit/models/integration_connection.py +2 -0
- beamlit/models/integration_connection_config.py +2 -0
- beamlit/models/integration_connection_secret.py +2 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +2 -0
- beamlit/models/integration_secret.py +2 -0
- beamlit/models/invite_workspace_user_body.py +2 -0
- beamlit/models/labels_type_0.py +2 -0
- beamlit/models/location.py +2 -0
- beamlit/models/location_response.py +2 -0
- beamlit/models/metadata.py +135 -0
- beamlit/models/metadata_labels.py +43 -0
- beamlit/models/metric.py +2 -0
- beamlit/models/metrics.py +2 -0
- beamlit/models/model.py +2 -0
- beamlit/models/model_deployment.py +66 -85
- beamlit/models/model_deployment_log.py +2 -0
- beamlit/models/model_deployment_metrics.py +2 -0
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +2 -0
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +2 -0
- beamlit/models/model_deployment_pod_template.py +45 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +2 -0
- beamlit/models/model_provider.py +2 -0
- beamlit/models/model_provider_ref.py +2 -0
- beamlit/models/model_release.py +2 -0
- beamlit/models/model_spec.py +188 -0
- beamlit/models/model_with_deployments.py +2 -0
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +2 -0
- beamlit/models/pending_invitation_accept.py +2 -0
- beamlit/models/pending_invitation_render.py +2 -0
- beamlit/models/pending_invitation_render_invited_by.py +2 -0
- beamlit/models/pending_invitation_render_workspace.py +2 -0
- beamlit/models/pending_invitation_workspace_details.py +2 -0
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +36 -8
- beamlit/models/policy_location.py +2 -0
- beamlit/models/policy_spec.py +119 -0
- beamlit/models/provider_config.py +2 -0
- beamlit/models/qps.py +2 -0
- beamlit/models/resource_deployment_log.py +2 -0
- beamlit/models/resource_deployment_metrics.py +70 -155
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +75 -0
- beamlit/models/resource_environment_metrics.py +172 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +75 -0
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_log.py +68 -0
- beamlit/models/resource_metrics.py +2 -0
- beamlit/models/runtime.py +14 -29
- beamlit/models/runtime_readiness_probe.py +45 -0
- beamlit/models/runtime_resources.py +2 -0
- beamlit/models/runtime_type_0.py +111 -0
- beamlit/models/runtime_type_0_readiness_probe.py +43 -0
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_type_0_resources.py +59 -0
- beamlit/models/serverless_config.py +2 -0
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +2 -0
- beamlit/models/store_agent.py +15 -29
- beamlit/models/store_agent_configuration.py +2 -0
- beamlit/models/store_agent_labels.py +45 -0
- beamlit/models/store_configuration.py +6 -15
- beamlit/models/store_configuration_option.py +7 -18
- beamlit/models/store_function.py +15 -29
- beamlit/models/store_function_configuration.py +2 -0
- beamlit/models/store_function_kit.py +2 -0
- beamlit/models/store_function_labels.py +45 -0
- beamlit/models/store_function_parameter.py +2 -0
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +2 -0
- beamlit/models/update_workspace_service_account_response_200.py +2 -0
- beamlit/models/update_workspace_user_role_body.py +2 -0
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +2 -0
- beamlit/models/workspace_labels.py +2 -0
- beamlit/models/workspace_user.py +2 -0
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/METADATA +1 -1
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/RECORD +142 -95
- {beamlit-0.0.20rc2.dist-info → beamlit-0.0.20rc4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,240 @@
|
|
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.function_kit import FunctionKit
|
11
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
12
|
+
from ..models.runtime import Runtime
|
13
|
+
from ..models.serverless_config import ServerlessConfig
|
14
|
+
from ..models.spec_configuration import SpecConfiguration
|
15
|
+
from ..models.store_function_parameter import StoreFunctionParameter
|
16
|
+
|
17
|
+
|
18
|
+
T = TypeVar("T", bound="FunctionSpec")
|
19
|
+
|
20
|
+
|
21
|
+
@_attrs_define
|
22
|
+
class FunctionSpec:
|
23
|
+
"""Function specification
|
24
|
+
|
25
|
+
Attributes:
|
26
|
+
configurations (Union[Unset, SpecConfiguration]): Agent configuration, this is a key value storage. In your
|
27
|
+
agent you can retrieve the value with config[key]
|
28
|
+
enabled (Union[Unset, bool]): Enable or disable the agent
|
29
|
+
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
30
|
+
integration_connections (Union[Unset, List[str]]):
|
31
|
+
pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
|
32
|
+
policies (Union[Unset, List[str]]):
|
33
|
+
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
34
|
+
serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
|
35
|
+
description (Union[Unset, str]): Function description, very important for the agent function to work with an LLM
|
36
|
+
kit (Union[Unset, List['FunctionKit']]): The kit of the function deployment
|
37
|
+
parameters (Union[Unset, List['StoreFunctionParameter']]): Function parameters, for your function to be callable
|
38
|
+
with Agent
|
39
|
+
store_id (Union[Unset, str]): Store id
|
40
|
+
"""
|
41
|
+
|
42
|
+
configurations: Union[Unset, "SpecConfiguration"] = UNSET
|
43
|
+
enabled: Union[Unset, bool] = UNSET
|
44
|
+
flavors: Union[Unset, List["Flavor"]] = UNSET
|
45
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
46
|
+
pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
|
47
|
+
policies: Union[Unset, List[str]] = UNSET
|
48
|
+
runtime: Union[Unset, "Runtime"] = UNSET
|
49
|
+
serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
|
50
|
+
description: Union[Unset, str] = UNSET
|
51
|
+
kit: Union[Unset, List["FunctionKit"]] = UNSET
|
52
|
+
parameters: Union[Unset, List["StoreFunctionParameter"]] = UNSET
|
53
|
+
store_id: Union[Unset, str] = UNSET
|
54
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
55
|
+
|
56
|
+
def to_dict(self) -> dict[str, Any]:
|
57
|
+
configurations: Union[Unset, Dict[str, Any]] = UNSET
|
58
|
+
if not isinstance(self.configurations, Unset):
|
59
|
+
configurations = self.configurations.to_dict()
|
60
|
+
|
61
|
+
enabled = self.enabled
|
62
|
+
|
63
|
+
flavors: Union[Unset, List[Dict[str, Any]]] = UNSET
|
64
|
+
if not isinstance(self.flavors, Unset):
|
65
|
+
flavors = []
|
66
|
+
for componentsschemas_flavors_item_data in self.flavors:
|
67
|
+
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
68
|
+
flavors.append(componentsschemas_flavors_item)
|
69
|
+
|
70
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
71
|
+
if not isinstance(self.integration_connections, Unset):
|
72
|
+
integration_connections = self.integration_connections
|
73
|
+
|
74
|
+
pod_template: Union[Unset, Dict[str, Any]] = UNSET
|
75
|
+
if not isinstance(self.pod_template, Unset):
|
76
|
+
pod_template = self.pod_template.to_dict()
|
77
|
+
|
78
|
+
policies: Union[Unset, List[str]] = UNSET
|
79
|
+
if not isinstance(self.policies, Unset):
|
80
|
+
policies = self.policies
|
81
|
+
|
82
|
+
runtime: Union[Unset, Dict[str, Any]] = UNSET
|
83
|
+
if not isinstance(self.runtime, Unset):
|
84
|
+
runtime = self.runtime.to_dict()
|
85
|
+
|
86
|
+
serverless_config: Union[Unset, Dict[str, Any]] = UNSET
|
87
|
+
if not isinstance(self.serverless_config, Unset):
|
88
|
+
serverless_config = self.serverless_config.to_dict()
|
89
|
+
|
90
|
+
description = self.description
|
91
|
+
|
92
|
+
kit: Union[Unset, List[Dict[str, Any]]] = UNSET
|
93
|
+
if not isinstance(self.kit, Unset):
|
94
|
+
kit = []
|
95
|
+
for kit_item_data in self.kit:
|
96
|
+
kit_item = kit_item_data.to_dict()
|
97
|
+
kit.append(kit_item)
|
98
|
+
|
99
|
+
parameters: Union[Unset, List[Dict[str, Any]]] = UNSET
|
100
|
+
if not isinstance(self.parameters, Unset):
|
101
|
+
parameters = []
|
102
|
+
for parameters_item_data in self.parameters:
|
103
|
+
parameters_item = parameters_item_data.to_dict()
|
104
|
+
parameters.append(parameters_item)
|
105
|
+
|
106
|
+
store_id = self.store_id
|
107
|
+
|
108
|
+
field_dict: dict[str, Any] = {}
|
109
|
+
field_dict.update(self.additional_properties)
|
110
|
+
field_dict.update({})
|
111
|
+
if configurations is not UNSET:
|
112
|
+
field_dict["configurations"] = configurations
|
113
|
+
if enabled is not UNSET:
|
114
|
+
field_dict["enabled"] = enabled
|
115
|
+
if flavors is not UNSET:
|
116
|
+
field_dict["flavors"] = flavors
|
117
|
+
if integration_connections is not UNSET:
|
118
|
+
field_dict["integrationConnections"] = integration_connections
|
119
|
+
if pod_template is not UNSET:
|
120
|
+
field_dict["podTemplate"] = pod_template
|
121
|
+
if policies is not UNSET:
|
122
|
+
field_dict["policies"] = policies
|
123
|
+
if runtime is not UNSET:
|
124
|
+
field_dict["runtime"] = runtime
|
125
|
+
if serverless_config is not UNSET:
|
126
|
+
field_dict["serverlessConfig"] = serverless_config
|
127
|
+
if description is not UNSET:
|
128
|
+
field_dict["description"] = description
|
129
|
+
if kit is not UNSET:
|
130
|
+
field_dict["kit"] = kit
|
131
|
+
if parameters is not UNSET:
|
132
|
+
field_dict["parameters"] = parameters
|
133
|
+
if store_id is not UNSET:
|
134
|
+
field_dict["store_id"] = store_id
|
135
|
+
|
136
|
+
return field_dict
|
137
|
+
|
138
|
+
@classmethod
|
139
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
140
|
+
from ..models.flavor import Flavor
|
141
|
+
from ..models.function_kit import FunctionKit
|
142
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
143
|
+
from ..models.runtime import Runtime
|
144
|
+
from ..models.serverless_config import ServerlessConfig
|
145
|
+
from ..models.spec_configuration import SpecConfiguration
|
146
|
+
from ..models.store_function_parameter import StoreFunctionParameter
|
147
|
+
|
148
|
+
d = src_dict.copy()
|
149
|
+
_configurations = d.pop("configurations", UNSET)
|
150
|
+
configurations: Union[Unset, SpecConfiguration]
|
151
|
+
if isinstance(_configurations, Unset):
|
152
|
+
configurations = UNSET
|
153
|
+
else:
|
154
|
+
configurations = SpecConfiguration.from_dict(_configurations)
|
155
|
+
|
156
|
+
enabled = d.pop("enabled", UNSET)
|
157
|
+
|
158
|
+
flavors = []
|
159
|
+
_flavors = d.pop("flavors", UNSET)
|
160
|
+
for componentsschemas_flavors_item_data in _flavors or []:
|
161
|
+
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
162
|
+
|
163
|
+
flavors.append(componentsschemas_flavors_item)
|
164
|
+
|
165
|
+
integration_connections = cast(List[str], d.pop("integrationConnections", UNSET))
|
166
|
+
|
167
|
+
_pod_template = d.pop("podTemplate", UNSET)
|
168
|
+
pod_template: Union[Unset, PodTemplateSpec]
|
169
|
+
if isinstance(_pod_template, Unset):
|
170
|
+
pod_template = UNSET
|
171
|
+
else:
|
172
|
+
pod_template = PodTemplateSpec.from_dict(_pod_template)
|
173
|
+
|
174
|
+
policies = cast(List[str], d.pop("policies", UNSET))
|
175
|
+
|
176
|
+
_runtime = d.pop("runtime", UNSET)
|
177
|
+
runtime: Union[Unset, Runtime]
|
178
|
+
if isinstance(_runtime, Unset):
|
179
|
+
runtime = UNSET
|
180
|
+
else:
|
181
|
+
runtime = Runtime.from_dict(_runtime)
|
182
|
+
|
183
|
+
_serverless_config = d.pop("serverlessConfig", UNSET)
|
184
|
+
serverless_config: Union[Unset, ServerlessConfig]
|
185
|
+
if isinstance(_serverless_config, Unset):
|
186
|
+
serverless_config = UNSET
|
187
|
+
else:
|
188
|
+
serverless_config = ServerlessConfig.from_dict(_serverless_config)
|
189
|
+
|
190
|
+
description = d.pop("description", UNSET)
|
191
|
+
|
192
|
+
kit = []
|
193
|
+
_kit = d.pop("kit", UNSET)
|
194
|
+
for kit_item_data in _kit or []:
|
195
|
+
kit_item = FunctionKit.from_dict(kit_item_data)
|
196
|
+
|
197
|
+
kit.append(kit_item)
|
198
|
+
|
199
|
+
parameters = []
|
200
|
+
_parameters = d.pop("parameters", UNSET)
|
201
|
+
for parameters_item_data in _parameters or []:
|
202
|
+
parameters_item = StoreFunctionParameter.from_dict(parameters_item_data)
|
203
|
+
|
204
|
+
parameters.append(parameters_item)
|
205
|
+
|
206
|
+
store_id = d.pop("store_id", UNSET)
|
207
|
+
|
208
|
+
function_spec = cls(
|
209
|
+
configurations=configurations,
|
210
|
+
enabled=enabled,
|
211
|
+
flavors=flavors,
|
212
|
+
integration_connections=integration_connections,
|
213
|
+
pod_template=pod_template,
|
214
|
+
policies=policies,
|
215
|
+
runtime=runtime,
|
216
|
+
serverless_config=serverless_config,
|
217
|
+
description=description,
|
218
|
+
kit=kit,
|
219
|
+
parameters=parameters,
|
220
|
+
store_id=store_id,
|
221
|
+
)
|
222
|
+
|
223
|
+
function_spec.additional_properties = d
|
224
|
+
return function_spec
|
225
|
+
|
226
|
+
@property
|
227
|
+
def additional_keys(self) -> list[str]:
|
228
|
+
return list(self.additional_properties.keys())
|
229
|
+
|
230
|
+
def __getitem__(self, key: str) -> Any:
|
231
|
+
return self.additional_properties[key]
|
232
|
+
|
233
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
234
|
+
self.additional_properties[key] = value
|
235
|
+
|
236
|
+
def __delitem__(self, key: str) -> None:
|
237
|
+
del self.additional_properties[key]
|
238
|
+
|
239
|
+
def __contains__(self, key: str) -> bool:
|
240
|
+
return key in self.additional_properties
|
@@ -101,6 +101,8 @@ class FunctionWithDeployments:
|
|
101
101
|
from ..models.function_deployment import FunctionDeployment
|
102
102
|
from ..models.labels_type_0 import LabelsType0
|
103
103
|
|
104
|
+
if not src_dict:
|
105
|
+
return None
|
104
106
|
d = src_dict.copy()
|
105
107
|
created_at = d.pop("created_at", UNSET)
|
106
108
|
|
beamlit/models/integration.py
CHANGED
@@ -114,6 +114,8 @@ class IntegrationConnection:
|
|
114
114
|
from ..models.integration_connection_secret import IntegrationConnectionSecret
|
115
115
|
from ..models.labels_type_0 import LabelsType0
|
116
116
|
|
117
|
+
if not src_dict:
|
118
|
+
return None
|
117
119
|
d = src_dict.copy()
|
118
120
|
created_at = d.pop("created_at", UNSET)
|
119
121
|
|
@@ -0,0 +1,99 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, 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
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.integration_connection_config import IntegrationConnectionConfig
|
10
|
+
from ..models.integration_connection_secret import IntegrationConnectionSecret
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="IntegrationConnectionSpec")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class IntegrationConnectionSpec:
|
18
|
+
"""Integration connection specification
|
19
|
+
|
20
|
+
Attributes:
|
21
|
+
config (Union[Unset, IntegrationConnectionConfig]): Integration config
|
22
|
+
integration (Union[Unset, str]): Integration type
|
23
|
+
secret (Union[Unset, IntegrationConnectionSecret]): Integration secret
|
24
|
+
"""
|
25
|
+
|
26
|
+
config: Union[Unset, "IntegrationConnectionConfig"] = UNSET
|
27
|
+
integration: Union[Unset, str] = UNSET
|
28
|
+
secret: Union[Unset, "IntegrationConnectionSecret"] = UNSET
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
30
|
+
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
32
|
+
config: Union[Unset, Dict[str, Any]] = UNSET
|
33
|
+
if not isinstance(self.config, Unset):
|
34
|
+
config = self.config.to_dict()
|
35
|
+
|
36
|
+
integration = self.integration
|
37
|
+
|
38
|
+
secret: Union[Unset, Dict[str, Any]] = UNSET
|
39
|
+
if not isinstance(self.secret, Unset):
|
40
|
+
secret = self.secret.to_dict()
|
41
|
+
|
42
|
+
field_dict: dict[str, Any] = {}
|
43
|
+
field_dict.update(self.additional_properties)
|
44
|
+
field_dict.update({})
|
45
|
+
if config is not UNSET:
|
46
|
+
field_dict["config"] = config
|
47
|
+
if integration is not UNSET:
|
48
|
+
field_dict["integration"] = integration
|
49
|
+
if secret is not UNSET:
|
50
|
+
field_dict["secret"] = secret
|
51
|
+
|
52
|
+
return field_dict
|
53
|
+
|
54
|
+
@classmethod
|
55
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
56
|
+
from ..models.integration_connection_config import IntegrationConnectionConfig
|
57
|
+
from ..models.integration_connection_secret import IntegrationConnectionSecret
|
58
|
+
|
59
|
+
d = src_dict.copy()
|
60
|
+
_config = d.pop("config", UNSET)
|
61
|
+
config: Union[Unset, IntegrationConnectionConfig]
|
62
|
+
if isinstance(_config, Unset):
|
63
|
+
config = UNSET
|
64
|
+
else:
|
65
|
+
config = IntegrationConnectionConfig.from_dict(_config)
|
66
|
+
|
67
|
+
integration = d.pop("integration", UNSET)
|
68
|
+
|
69
|
+
_secret = d.pop("secret", UNSET)
|
70
|
+
secret: Union[Unset, IntegrationConnectionSecret]
|
71
|
+
if isinstance(_secret, Unset):
|
72
|
+
secret = UNSET
|
73
|
+
else:
|
74
|
+
secret = IntegrationConnectionSecret.from_dict(_secret)
|
75
|
+
|
76
|
+
integration_connection_spec = cls(
|
77
|
+
config=config,
|
78
|
+
integration=integration,
|
79
|
+
secret=secret,
|
80
|
+
)
|
81
|
+
|
82
|
+
integration_connection_spec.additional_properties = d
|
83
|
+
return integration_connection_spec
|
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
|
beamlit/models/labels_type_0.py
CHANGED
beamlit/models/location.py
CHANGED
@@ -0,0 +1,135 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, 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
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.metadata_labels import MetadataLabels
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="Metadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class Metadata:
|
17
|
+
"""Metadata
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
|
+
display_name (Union[Unset, str]): Model display name
|
25
|
+
labels (Union[Unset, MetadataLabels]): Labels
|
26
|
+
name (Union[Unset, str]): Model name
|
27
|
+
workspace (Union[Unset, str]): Workspace name
|
28
|
+
"""
|
29
|
+
|
30
|
+
created_at: Union[Unset, str] = UNSET
|
31
|
+
updated_at: Union[Unset, str] = UNSET
|
32
|
+
created_by: Union[Unset, str] = UNSET
|
33
|
+
updated_by: Union[Unset, str] = UNSET
|
34
|
+
display_name: Union[Unset, str] = UNSET
|
35
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
36
|
+
name: Union[Unset, str] = UNSET
|
37
|
+
workspace: Union[Unset, str] = UNSET
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
|
+
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
41
|
+
created_at = self.created_at
|
42
|
+
|
43
|
+
updated_at = self.updated_at
|
44
|
+
|
45
|
+
created_by = self.created_by
|
46
|
+
|
47
|
+
updated_by = self.updated_by
|
48
|
+
|
49
|
+
display_name = self.display_name
|
50
|
+
|
51
|
+
labels: Union[Unset, Dict[str, Any]] = UNSET
|
52
|
+
if not isinstance(self.labels, Unset):
|
53
|
+
labels = self.labels.to_dict()
|
54
|
+
|
55
|
+
name = self.name
|
56
|
+
|
57
|
+
workspace = self.workspace
|
58
|
+
|
59
|
+
field_dict: dict[str, Any] = {}
|
60
|
+
field_dict.update(self.additional_properties)
|
61
|
+
field_dict.update({})
|
62
|
+
if created_at is not UNSET:
|
63
|
+
field_dict["createdAt"] = created_at
|
64
|
+
if updated_at is not UNSET:
|
65
|
+
field_dict["updatedAt"] = updated_at
|
66
|
+
if created_by is not UNSET:
|
67
|
+
field_dict["createdBy"] = created_by
|
68
|
+
if updated_by is not UNSET:
|
69
|
+
field_dict["updatedBy"] = updated_by
|
70
|
+
if display_name is not UNSET:
|
71
|
+
field_dict["displayName"] = display_name
|
72
|
+
if labels is not UNSET:
|
73
|
+
field_dict["labels"] = labels
|
74
|
+
if name is not UNSET:
|
75
|
+
field_dict["name"] = name
|
76
|
+
if workspace is not UNSET:
|
77
|
+
field_dict["workspace"] = workspace
|
78
|
+
|
79
|
+
return field_dict
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
83
|
+
from ..models.metadata_labels import MetadataLabels
|
84
|
+
|
85
|
+
d = src_dict.copy()
|
86
|
+
created_at = d.pop("createdAt", UNSET)
|
87
|
+
|
88
|
+
updated_at = d.pop("updatedAt", UNSET)
|
89
|
+
|
90
|
+
created_by = d.pop("createdBy", UNSET)
|
91
|
+
|
92
|
+
updated_by = d.pop("updatedBy", UNSET)
|
93
|
+
|
94
|
+
display_name = d.pop("displayName", UNSET)
|
95
|
+
|
96
|
+
_labels = d.pop("labels", UNSET)
|
97
|
+
labels: Union[Unset, MetadataLabels]
|
98
|
+
if isinstance(_labels, Unset):
|
99
|
+
labels = UNSET
|
100
|
+
else:
|
101
|
+
labels = MetadataLabels.from_dict(_labels)
|
102
|
+
|
103
|
+
name = d.pop("name", UNSET)
|
104
|
+
|
105
|
+
workspace = d.pop("workspace", UNSET)
|
106
|
+
|
107
|
+
metadata = cls(
|
108
|
+
created_at=created_at,
|
109
|
+
updated_at=updated_at,
|
110
|
+
created_by=created_by,
|
111
|
+
updated_by=updated_by,
|
112
|
+
display_name=display_name,
|
113
|
+
labels=labels,
|
114
|
+
name=name,
|
115
|
+
workspace=workspace,
|
116
|
+
)
|
117
|
+
|
118
|
+
metadata.additional_properties = d
|
119
|
+
return metadata
|
120
|
+
|
121
|
+
@property
|
122
|
+
def additional_keys(self) -> list[str]:
|
123
|
+
return list(self.additional_properties.keys())
|
124
|
+
|
125
|
+
def __getitem__(self, key: str) -> Any:
|
126
|
+
return self.additional_properties[key]
|
127
|
+
|
128
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
129
|
+
self.additional_properties[key] = value
|
130
|
+
|
131
|
+
def __delitem__(self, key: str) -> None:
|
132
|
+
del self.additional_properties[key]
|
133
|
+
|
134
|
+
def __contains__(self, key: str) -> bool:
|
135
|
+
return key in self.additional_properties
|
@@ -0,0 +1,43 @@
|
|
1
|
+
from typing import Any, Type, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="MetadataLabels")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class MetadataLabels:
|
11
|
+
"""Labels"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, str] = _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
|
+
d = src_dict.copy()
|
24
|
+
metadata_labels = cls()
|
25
|
+
|
26
|
+
metadata_labels.additional_properties = d
|
27
|
+
return metadata_labels
|
28
|
+
|
29
|
+
@property
|
30
|
+
def additional_keys(self) -> list[str]:
|
31
|
+
return list(self.additional_properties.keys())
|
32
|
+
|
33
|
+
def __getitem__(self, key: str) -> str:
|
34
|
+
return self.additional_properties[key]
|
35
|
+
|
36
|
+
def __setitem__(self, key: str, value: str) -> None:
|
37
|
+
self.additional_properties[key] = value
|
38
|
+
|
39
|
+
def __delitem__(self, key: str) -> None:
|
40
|
+
del self.additional_properties[key]
|
41
|
+
|
42
|
+
def __contains__(self, key: str) -> bool:
|
43
|
+
return key in self.additional_properties
|
beamlit/models/metric.py
CHANGED
beamlit/models/metrics.py
CHANGED