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
beamlit/models/environment.py
CHANGED
@@ -54,6 +54,8 @@ class EnvironmentMetrics:
|
|
54
54
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
55
55
|
from ..models.metric import Metric
|
56
56
|
|
57
|
+
if not src_dict:
|
58
|
+
return None
|
57
59
|
d = src_dict.copy()
|
58
60
|
inference_global = []
|
59
61
|
_inference_global = d.pop("inference_global", UNSET)
|
@@ -0,0 +1,61 @@
|
|
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="EnvironmentSpec")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class EnvironmentSpec:
|
13
|
+
"""Environment specification
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
policies (Union[Unset, List[str]]):
|
17
|
+
"""
|
18
|
+
|
19
|
+
policies: Union[Unset, List[str]] = UNSET
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
21
|
+
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
23
|
+
policies: Union[Unset, List[str]] = UNSET
|
24
|
+
if not isinstance(self.policies, Unset):
|
25
|
+
policies = self.policies
|
26
|
+
|
27
|
+
field_dict: dict[str, Any] = {}
|
28
|
+
field_dict.update(self.additional_properties)
|
29
|
+
field_dict.update({})
|
30
|
+
if policies is not UNSET:
|
31
|
+
field_dict["policies"] = policies
|
32
|
+
|
33
|
+
return field_dict
|
34
|
+
|
35
|
+
@classmethod
|
36
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
37
|
+
d = src_dict.copy()
|
38
|
+
policies = cast(List[str], d.pop("policies", UNSET))
|
39
|
+
|
40
|
+
environment_spec = cls(
|
41
|
+
policies=policies,
|
42
|
+
)
|
43
|
+
|
44
|
+
environment_spec.additional_properties = d
|
45
|
+
return environment_spec
|
46
|
+
|
47
|
+
@property
|
48
|
+
def additional_keys(self) -> list[str]:
|
49
|
+
return list(self.additional_properties.keys())
|
50
|
+
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
52
|
+
return self.additional_properties[key]
|
53
|
+
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
55
|
+
self.additional_properties[key] = value
|
56
|
+
|
57
|
+
def __delitem__(self, key: str) -> None:
|
58
|
+
del self.additional_properties[key]
|
59
|
+
|
60
|
+
def __contains__(self, key: str) -> bool:
|
61
|
+
return key in self.additional_properties
|
beamlit/models/flavor.py
CHANGED
beamlit/models/function.py
CHANGED
@@ -6,10 +6,10 @@ from attrs import field as _attrs_field
|
|
6
6
|
from ..types import UNSET, Unset
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
|
-
from ..models.
|
9
|
+
from ..models.deployment_serverless_config import DeploymentServerlessConfig
|
10
10
|
from ..models.flavor import Flavor
|
11
|
-
from ..models.
|
12
|
-
from ..models.
|
11
|
+
from ..models.function_deployment_configuration import FunctionDeploymentConfiguration
|
12
|
+
from ..models.function_deployment_pod_template import FunctionDeploymentPodTemplate
|
13
13
|
from ..models.function_kit import FunctionKit
|
14
14
|
from ..models.labels_type_0 import LabelsType0
|
15
15
|
from ..models.runtime import Runtime
|
@@ -28,10 +28,10 @@ class FunctionDeployment:
|
|
28
28
|
created_by (Union[Unset, str]): The user or service account who created the resource
|
29
29
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
30
30
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
31
|
-
configuration (Union[
|
32
|
-
|
31
|
+
configuration (Union[Unset, FunctionDeploymentConfiguration]): Function configuration, this is a key value
|
32
|
+
storage. In your function you can retrieve the value with config[key]
|
33
33
|
description (Union[Unset, str]): Function description, very important for the agent function to work with an LLM
|
34
|
-
enabled (Union[
|
34
|
+
enabled (Union[Unset, bool]): Whether the function deployment is enabled
|
35
35
|
environment (Union[Unset, str]): The name of the environment
|
36
36
|
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
37
37
|
function (Union[Unset, str]): The name of the function
|
@@ -40,12 +40,11 @@ class FunctionDeployment:
|
|
40
40
|
labels (Union['LabelsType0', None, Unset]): Labels
|
41
41
|
parameters (Union[Unset, List['StoreFunctionParameter']]): Function parameters, for your function to be callable
|
42
42
|
with Agent
|
43
|
-
pod_template (Union[
|
44
|
-
|
43
|
+
pod_template (Union[Unset, FunctionDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
|
44
|
+
template
|
45
45
|
policies (Union[Unset, List[str]]):
|
46
46
|
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
47
|
-
serverless_config (Union[
|
48
|
-
deployment
|
47
|
+
serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
|
49
48
|
store_id (Union[Unset, str]): Create from a store registered function
|
50
49
|
workspace (Union[Unset, str]): The workspace the function deployment belongs to
|
51
50
|
"""
|
@@ -54,9 +53,9 @@ class FunctionDeployment:
|
|
54
53
|
created_by: Union[Unset, str] = UNSET
|
55
54
|
updated_at: Union[Unset, str] = UNSET
|
56
55
|
updated_by: Union[Unset, str] = UNSET
|
57
|
-
configuration: Union["
|
56
|
+
configuration: Union[Unset, "FunctionDeploymentConfiguration"] = UNSET
|
58
57
|
description: Union[Unset, str] = UNSET
|
59
|
-
enabled: Union[
|
58
|
+
enabled: Union[Unset, bool] = UNSET
|
60
59
|
environment: Union[Unset, str] = UNSET
|
61
60
|
flavors: Union[Unset, List["Flavor"]] = UNSET
|
62
61
|
function: Union[Unset, str] = UNSET
|
@@ -64,18 +63,15 @@ class FunctionDeployment:
|
|
64
63
|
kit: Union[Unset, List["FunctionKit"]] = UNSET
|
65
64
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
66
65
|
parameters: Union[Unset, List["StoreFunctionParameter"]] = UNSET
|
67
|
-
pod_template: Union["
|
66
|
+
pod_template: Union[Unset, "FunctionDeploymentPodTemplate"] = UNSET
|
68
67
|
policies: Union[Unset, List[str]] = UNSET
|
69
68
|
runtime: Union[Unset, "Runtime"] = UNSET
|
70
|
-
serverless_config: Union["
|
69
|
+
serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
|
71
70
|
store_id: Union[Unset, str] = UNSET
|
72
71
|
workspace: Union[Unset, str] = UNSET
|
73
72
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
74
73
|
|
75
74
|
def to_dict(self) -> dict[str, Any]:
|
76
|
-
from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
|
77
|
-
from ..models.function_deployment_configuration_type_0 import FunctionDeploymentConfigurationType0
|
78
|
-
from ..models.function_deployment_pod_template_type_0 import FunctionDeploymentPodTemplateType0
|
79
75
|
from ..models.labels_type_0 import LabelsType0
|
80
76
|
|
81
77
|
created_at = self.created_at
|
@@ -86,21 +82,13 @@ class FunctionDeployment:
|
|
86
82
|
|
87
83
|
updated_by = self.updated_by
|
88
84
|
|
89
|
-
configuration: Union[Dict[str, Any]
|
90
|
-
if isinstance(self.configuration, Unset):
|
91
|
-
configuration = UNSET
|
92
|
-
elif isinstance(self.configuration, FunctionDeploymentConfigurationType0):
|
85
|
+
configuration: Union[Unset, Dict[str, Any]] = UNSET
|
86
|
+
if not isinstance(self.configuration, Unset):
|
93
87
|
configuration = self.configuration.to_dict()
|
94
|
-
else:
|
95
|
-
configuration = self.configuration
|
96
88
|
|
97
89
|
description = self.description
|
98
90
|
|
99
|
-
enabled
|
100
|
-
if isinstance(self.enabled, Unset):
|
101
|
-
enabled = UNSET
|
102
|
-
else:
|
103
|
-
enabled = self.enabled
|
91
|
+
enabled = self.enabled
|
104
92
|
|
105
93
|
environment = self.environment
|
106
94
|
|
@@ -139,13 +127,9 @@ class FunctionDeployment:
|
|
139
127
|
parameters_item = parameters_item_data.to_dict()
|
140
128
|
parameters.append(parameters_item)
|
141
129
|
|
142
|
-
pod_template: Union[Dict[str, Any]
|
143
|
-
if isinstance(self.pod_template, Unset):
|
144
|
-
pod_template = UNSET
|
145
|
-
elif isinstance(self.pod_template, FunctionDeploymentPodTemplateType0):
|
130
|
+
pod_template: Union[Unset, Dict[str, Any]] = UNSET
|
131
|
+
if not isinstance(self.pod_template, Unset):
|
146
132
|
pod_template = self.pod_template.to_dict()
|
147
|
-
else:
|
148
|
-
pod_template = self.pod_template
|
149
133
|
|
150
134
|
policies: Union[Unset, List[str]] = UNSET
|
151
135
|
if not isinstance(self.policies, Unset):
|
@@ -155,13 +139,9 @@ class FunctionDeployment:
|
|
155
139
|
if not isinstance(self.runtime, Unset):
|
156
140
|
runtime = self.runtime.to_dict()
|
157
141
|
|
158
|
-
serverless_config: Union[Dict[str, Any]
|
159
|
-
if isinstance(self.serverless_config, Unset):
|
160
|
-
serverless_config = UNSET
|
161
|
-
elif isinstance(self.serverless_config, DeploymentServerlessConfigType0):
|
142
|
+
serverless_config: Union[Unset, Dict[str, Any]] = UNSET
|
143
|
+
if not isinstance(self.serverless_config, Unset):
|
162
144
|
serverless_config = self.serverless_config.to_dict()
|
163
|
-
else:
|
164
|
-
serverless_config = self.serverless_config
|
165
145
|
|
166
146
|
store_id = self.store_id
|
167
147
|
|
@@ -215,15 +195,17 @@ class FunctionDeployment:
|
|
215
195
|
|
216
196
|
@classmethod
|
217
197
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
218
|
-
from ..models.
|
198
|
+
from ..models.deployment_serverless_config import DeploymentServerlessConfig
|
219
199
|
from ..models.flavor import Flavor
|
220
|
-
from ..models.
|
221
|
-
from ..models.
|
200
|
+
from ..models.function_deployment_configuration import FunctionDeploymentConfiguration
|
201
|
+
from ..models.function_deployment_pod_template import FunctionDeploymentPodTemplate
|
222
202
|
from ..models.function_kit import FunctionKit
|
223
203
|
from ..models.labels_type_0 import LabelsType0
|
224
204
|
from ..models.runtime import Runtime
|
225
205
|
from ..models.store_function_parameter import StoreFunctionParameter
|
226
206
|
|
207
|
+
if not src_dict:
|
208
|
+
return None
|
227
209
|
d = src_dict.copy()
|
228
210
|
created_at = d.pop("created_at", UNSET)
|
229
211
|
|
@@ -233,33 +215,16 @@ class FunctionDeployment:
|
|
233
215
|
|
234
216
|
updated_by = d.pop("updated_by", UNSET)
|
235
217
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
if not isinstance(data, dict):
|
243
|
-
raise TypeError()
|
244
|
-
configuration_type_0 = FunctionDeploymentConfigurationType0.from_dict(data)
|
245
|
-
|
246
|
-
return configuration_type_0
|
247
|
-
except: # noqa: E722
|
248
|
-
pass
|
249
|
-
return cast(Union["FunctionDeploymentConfigurationType0", None, Unset], data)
|
250
|
-
|
251
|
-
configuration = _parse_configuration(d.pop("configuration", UNSET))
|
218
|
+
_configuration = d.pop("configuration", UNSET)
|
219
|
+
configuration: Union[Unset, FunctionDeploymentConfiguration]
|
220
|
+
if isinstance(_configuration, Unset):
|
221
|
+
configuration = UNSET
|
222
|
+
else:
|
223
|
+
configuration = FunctionDeploymentConfiguration.from_dict(_configuration)
|
252
224
|
|
253
225
|
description = d.pop("description", UNSET)
|
254
226
|
|
255
|
-
|
256
|
-
if data is None:
|
257
|
-
return data
|
258
|
-
if isinstance(data, Unset):
|
259
|
-
return data
|
260
|
-
return cast(Union[None, Unset, bool], data)
|
261
|
-
|
262
|
-
enabled = _parse_enabled(d.pop("enabled", UNSET))
|
227
|
+
enabled = d.pop("enabled", UNSET)
|
263
228
|
|
264
229
|
environment = d.pop("environment", UNSET)
|
265
230
|
|
@@ -305,22 +270,12 @@ class FunctionDeployment:
|
|
305
270
|
|
306
271
|
parameters.append(parameters_item)
|
307
272
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
if not isinstance(data, dict):
|
315
|
-
raise TypeError()
|
316
|
-
pod_template_type_0 = FunctionDeploymentPodTemplateType0.from_dict(data)
|
317
|
-
|
318
|
-
return pod_template_type_0
|
319
|
-
except: # noqa: E722
|
320
|
-
pass
|
321
|
-
return cast(Union["FunctionDeploymentPodTemplateType0", None, Unset], data)
|
322
|
-
|
323
|
-
pod_template = _parse_pod_template(d.pop("pod_template", UNSET))
|
273
|
+
_pod_template = d.pop("pod_template", UNSET)
|
274
|
+
pod_template: Union[Unset, FunctionDeploymentPodTemplate]
|
275
|
+
if isinstance(_pod_template, Unset):
|
276
|
+
pod_template = UNSET
|
277
|
+
else:
|
278
|
+
pod_template = FunctionDeploymentPodTemplate.from_dict(_pod_template)
|
324
279
|
|
325
280
|
policies = cast(List[str], d.pop("policies", UNSET))
|
326
281
|
|
@@ -331,22 +286,12 @@ class FunctionDeployment:
|
|
331
286
|
else:
|
332
287
|
runtime = Runtime.from_dict(_runtime)
|
333
288
|
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
if not isinstance(data, dict):
|
341
|
-
raise TypeError()
|
342
|
-
componentsschemas_deployment_serverless_config_type_0 = DeploymentServerlessConfigType0.from_dict(data)
|
343
|
-
|
344
|
-
return componentsschemas_deployment_serverless_config_type_0
|
345
|
-
except: # noqa: E722
|
346
|
-
pass
|
347
|
-
return cast(Union["DeploymentServerlessConfigType0", None, Unset], data)
|
348
|
-
|
349
|
-
serverless_config = _parse_serverless_config(d.pop("serverless_config", UNSET))
|
289
|
+
_serverless_config = d.pop("serverless_config", UNSET)
|
290
|
+
serverless_config: Union[Unset, DeploymentServerlessConfig]
|
291
|
+
if isinstance(_serverless_config, Unset):
|
292
|
+
serverless_config = UNSET
|
293
|
+
else:
|
294
|
+
serverless_config = DeploymentServerlessConfig.from_dict(_serverless_config)
|
350
295
|
|
351
296
|
store_id = d.pop("store_id", UNSET)
|
352
297
|
|
@@ -0,0 +1,45 @@
|
|
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="FunctionDeploymentConfiguration")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FunctionDeploymentConfiguration:
|
11
|
+
"""Function configuration, this is a key value storage. In your function you can retrieve the value with config[key]"""
|
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
|
+
function_deployment_configuration = cls()
|
27
|
+
|
28
|
+
function_deployment_configuration.additional_properties = d
|
29
|
+
return function_deployment_configuration
|
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
|
@@ -0,0 +1,45 @@
|
|
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="FunctionDeploymentPodTemplate")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FunctionDeploymentPodTemplate:
|
11
|
+
"""The pod template, should be a valid Kubernetes pod template"""
|
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
|
+
function_deployment_pod_template = cls()
|
27
|
+
|
28
|
+
function_deployment_pod_template.additional_properties = d
|
29
|
+
return function_deployment_pod_template
|
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
|
beamlit/models/function_kit.py
CHANGED
@@ -57,6 +57,8 @@ class FunctionKit:
|
|
57
57
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
58
58
|
from ..models.store_function_parameter import StoreFunctionParameter
|
59
59
|
|
60
|
+
if not src_dict:
|
61
|
+
return None
|
60
62
|
d = src_dict.copy()
|
61
63
|
description = d.pop("description", UNSET)
|
62
64
|
|
@@ -0,0 +1,144 @@
|
|
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="FunctionMetadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class FunctionMetadata:
|
17
|
+
"""Function 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
|
+
environment (Union[Unset, str]): Environment name
|
29
|
+
"""
|
30
|
+
|
31
|
+
created_at: Union[Unset, str] = UNSET
|
32
|
+
updated_at: Union[Unset, str] = UNSET
|
33
|
+
created_by: Union[Unset, str] = UNSET
|
34
|
+
updated_by: Union[Unset, str] = UNSET
|
35
|
+
display_name: Union[Unset, str] = UNSET
|
36
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
37
|
+
name: Union[Unset, str] = UNSET
|
38
|
+
workspace: Union[Unset, str] = UNSET
|
39
|
+
environment: Union[Unset, str] = UNSET
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
41
|
+
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
43
|
+
created_at = self.created_at
|
44
|
+
|
45
|
+
updated_at = self.updated_at
|
46
|
+
|
47
|
+
created_by = self.created_by
|
48
|
+
|
49
|
+
updated_by = self.updated_by
|
50
|
+
|
51
|
+
display_name = self.display_name
|
52
|
+
|
53
|
+
labels: Union[Unset, Dict[str, Any]] = UNSET
|
54
|
+
if not isinstance(self.labels, Unset):
|
55
|
+
labels = self.labels.to_dict()
|
56
|
+
|
57
|
+
name = self.name
|
58
|
+
|
59
|
+
workspace = self.workspace
|
60
|
+
|
61
|
+
environment = self.environment
|
62
|
+
|
63
|
+
field_dict: dict[str, Any] = {}
|
64
|
+
field_dict.update(self.additional_properties)
|
65
|
+
field_dict.update({})
|
66
|
+
if created_at is not UNSET:
|
67
|
+
field_dict["createdAt"] = created_at
|
68
|
+
if updated_at is not UNSET:
|
69
|
+
field_dict["updatedAt"] = updated_at
|
70
|
+
if created_by is not UNSET:
|
71
|
+
field_dict["createdBy"] = created_by
|
72
|
+
if updated_by is not UNSET:
|
73
|
+
field_dict["updatedBy"] = updated_by
|
74
|
+
if display_name is not UNSET:
|
75
|
+
field_dict["displayName"] = display_name
|
76
|
+
if labels is not UNSET:
|
77
|
+
field_dict["labels"] = labels
|
78
|
+
if name is not UNSET:
|
79
|
+
field_dict["name"] = name
|
80
|
+
if workspace is not UNSET:
|
81
|
+
field_dict["workspace"] = workspace
|
82
|
+
if environment is not UNSET:
|
83
|
+
field_dict["environment"] = environment
|
84
|
+
|
85
|
+
return field_dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
89
|
+
from ..models.metadata_labels import MetadataLabels
|
90
|
+
|
91
|
+
d = src_dict.copy()
|
92
|
+
created_at = d.pop("createdAt", UNSET)
|
93
|
+
|
94
|
+
updated_at = d.pop("updatedAt", UNSET)
|
95
|
+
|
96
|
+
created_by = d.pop("createdBy", UNSET)
|
97
|
+
|
98
|
+
updated_by = d.pop("updatedBy", UNSET)
|
99
|
+
|
100
|
+
display_name = d.pop("displayName", UNSET)
|
101
|
+
|
102
|
+
_labels = d.pop("labels", UNSET)
|
103
|
+
labels: Union[Unset, MetadataLabels]
|
104
|
+
if isinstance(_labels, Unset):
|
105
|
+
labels = UNSET
|
106
|
+
else:
|
107
|
+
labels = MetadataLabels.from_dict(_labels)
|
108
|
+
|
109
|
+
name = d.pop("name", UNSET)
|
110
|
+
|
111
|
+
workspace = d.pop("workspace", UNSET)
|
112
|
+
|
113
|
+
environment = d.pop("environment", UNSET)
|
114
|
+
|
115
|
+
function_metadata = cls(
|
116
|
+
created_at=created_at,
|
117
|
+
updated_at=updated_at,
|
118
|
+
created_by=created_by,
|
119
|
+
updated_by=updated_by,
|
120
|
+
display_name=display_name,
|
121
|
+
labels=labels,
|
122
|
+
name=name,
|
123
|
+
workspace=workspace,
|
124
|
+
environment=environment,
|
125
|
+
)
|
126
|
+
|
127
|
+
function_metadata.additional_properties = d
|
128
|
+
return function_metadata
|
129
|
+
|
130
|
+
@property
|
131
|
+
def additional_keys(self) -> list[str]:
|
132
|
+
return list(self.additional_properties.keys())
|
133
|
+
|
134
|
+
def __getitem__(self, key: str) -> Any:
|
135
|
+
return self.additional_properties[key]
|
136
|
+
|
137
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
138
|
+
self.additional_properties[key] = value
|
139
|
+
|
140
|
+
def __delitem__(self, key: str) -> None:
|
141
|
+
del self.additional_properties[key]
|
142
|
+
|
143
|
+
def __contains__(self, key: str) -> bool:
|
144
|
+
return key in self.additional_properties
|