beamlit 0.0.20rc3__py3-none-any.whl → 0.0.20rc5__py3-none-any.whl

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