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.
Files changed (211) hide show
  1. beamlit/__init__.py +8 -0
  2. beamlit/api/__init__.py +1 -0
  3. beamlit/api/agents/__init__.py +0 -0
  4. beamlit/api/agents/create_agent.py +155 -0
  5. beamlit/api/agents/create_agent_release.py +146 -0
  6. beamlit/api/agents/delete_agent.py +146 -0
  7. beamlit/api/agents/delete_agent_deployment.py +163 -0
  8. beamlit/api/agents/delete_agent_deployment_history.py +172 -0
  9. beamlit/api/agents/get_agent.py +146 -0
  10. beamlit/api/agents/get_agent_deployment.py +163 -0
  11. beamlit/api/agents/get_agent_deployment_history.py +172 -0
  12. beamlit/api/agents/get_agent_deployment_logs.py +164 -0
  13. beamlit/api/agents/get_agent_deployment_metrics.py +159 -0
  14. beamlit/api/agents/get_agent_metrics.py +150 -0
  15. beamlit/api/agents/list_agent_deployment_history.py +164 -0
  16. beamlit/api/agents/list_agent_deployments.py +155 -0
  17. beamlit/api/agents/list_agents.py +127 -0
  18. beamlit/api/agents/put_agent_deployment.py +185 -0
  19. beamlit/api/agents/put_agent_deployment_history.py +198 -0
  20. beamlit/api/agents/update_agent.py +168 -0
  21. beamlit/api/authentication_providers/__init__.py +0 -0
  22. beamlit/api/authentication_providers/get_model_with_repo_for_authentication_provider.py +184 -0
  23. beamlit/api/authentication_providers/list_models_for_authentication_provider.py +163 -0
  24. beamlit/api/authentication_providers/list_organizations_for_authentication_provider.py +163 -0
  25. beamlit/api/configurations/__init__.py +0 -0
  26. beamlit/api/configurations/get_configuration.py +122 -0
  27. beamlit/api/environments/__init__.py +0 -0
  28. beamlit/api/environments/create_environment.py +167 -0
  29. beamlit/api/environments/delete_environment.py +154 -0
  30. beamlit/api/environments/get_environment.py +154 -0
  31. beamlit/api/environments/get_environment_metrics.py +158 -0
  32. beamlit/api/environments/list_environments.py +139 -0
  33. beamlit/api/environments/update_environment.py +180 -0
  34. beamlit/api/functions/__init__.py +0 -0
  35. beamlit/api/functions/create_function.py +155 -0
  36. beamlit/api/functions/create_function_release.py +150 -0
  37. beamlit/api/functions/delete_function.py +146 -0
  38. beamlit/api/functions/delete_function_deployment.py +163 -0
  39. beamlit/api/functions/get_function.py +146 -0
  40. beamlit/api/functions/get_function_deployment.py +163 -0
  41. beamlit/api/functions/get_function_deployment_logs.py +164 -0
  42. beamlit/api/functions/get_function_deployment_metrics.py +159 -0
  43. beamlit/api/functions/get_function_metrics.py +150 -0
  44. beamlit/api/functions/list_function_deployments.py +155 -0
  45. beamlit/api/functions/list_functions.py +131 -0
  46. beamlit/api/functions/put_function_deployment.py +185 -0
  47. beamlit/api/functions/update_function.py +168 -0
  48. beamlit/api/history/__init__.py +0 -0
  49. beamlit/api/history/get_agents_history.py +155 -0
  50. beamlit/api/history/list_agents_history.py +131 -0
  51. beamlit/api/invitations/__init__.py +0 -0
  52. beamlit/api/invitations/list_all_pending_invitations.py +142 -0
  53. beamlit/api/locations/__init__.py +0 -0
  54. beamlit/api/locations/list_locations.py +139 -0
  55. beamlit/api/metrics/__init__.py +0 -0
  56. beamlit/api/metrics/get_metrics.py +130 -0
  57. beamlit/api/model_providers/__init__.py +0 -0
  58. beamlit/api/model_providers/create_model_provider.py +163 -0
  59. beamlit/api/model_providers/delete_model_provider.py +154 -0
  60. beamlit/api/model_providers/get_model_provider.py +154 -0
  61. beamlit/api/model_providers/list_model_providers.py +139 -0
  62. beamlit/api/model_providers/update_model_provider.py +176 -0
  63. beamlit/api/models/__init__.py +0 -0
  64. beamlit/api/models/create_model.py +168 -0
  65. beamlit/api/models/delete_model.py +154 -0
  66. beamlit/api/models/delete_model_deployment.py +171 -0
  67. beamlit/api/models/get_model.py +154 -0
  68. beamlit/api/models/get_model_deployment.py +171 -0
  69. beamlit/api/models/get_model_deployment_logs.py +168 -0
  70. beamlit/api/models/get_model_deployment_metrics.py +163 -0
  71. beamlit/api/models/get_model_metrics.py +154 -0
  72. beamlit/api/models/list_model_deployments.py +163 -0
  73. beamlit/api/models/list_models.py +135 -0
  74. beamlit/api/models/put_model_deployment.py +193 -0
  75. beamlit/api/models/release_model.py +154 -0
  76. beamlit/api/models/update_model.py +181 -0
  77. beamlit/api/policies/__init__.py +0 -0
  78. beamlit/api/policies/create_policy.py +167 -0
  79. beamlit/api/policies/delete_policy.py +154 -0
  80. beamlit/api/policies/get_policy.py +154 -0
  81. beamlit/api/policies/list_policies.py +139 -0
  82. beamlit/api/policies/update_policy.py +180 -0
  83. beamlit/api/service_accounts/__init__.py +0 -0
  84. beamlit/api/service_accounts/create_api_key_for_service_account.py +177 -0
  85. beamlit/api/service_accounts/create_workspace_service_account.py +168 -0
  86. beamlit/api/service_accounts/delete_api_key_for_service_account.py +104 -0
  87. beamlit/api/service_accounts/delete_workspace_service_account.py +158 -0
  88. beamlit/api/service_accounts/get_workspace_service_accounts.py +139 -0
  89. beamlit/api/service_accounts/list_api_keys_for_service_account.py +163 -0
  90. beamlit/api/service_accounts/update_workspace_service_account.py +181 -0
  91. beamlit/api/store/__init__.py +0 -0
  92. beamlit/api/store/get_store_agent.py +146 -0
  93. beamlit/api/store/get_store_function.py +146 -0
  94. beamlit/api/store/list_store_agents.py +131 -0
  95. beamlit/api/store/list_store_functions.py +131 -0
  96. beamlit/api/workspaces/__init__.py +0 -0
  97. beamlit/api/workspaces/accept_workspace_invitation.py +161 -0
  98. beamlit/api/workspaces/create_worspace.py +163 -0
  99. beamlit/api/workspaces/decline_workspace_invitation.py +158 -0
  100. beamlit/api/workspaces/delete_workspace.py +154 -0
  101. beamlit/api/workspaces/get_workspace.py +154 -0
  102. beamlit/api/workspaces/invite_workspace_user.py +174 -0
  103. beamlit/api/workspaces/leave_workspace.py +161 -0
  104. beamlit/api/workspaces/list_workspace_users.py +139 -0
  105. beamlit/api/workspaces/list_workspaces.py +139 -0
  106. beamlit/api/workspaces/remove_workspace_user.py +101 -0
  107. beamlit/api/workspaces/update_workspace.py +176 -0
  108. beamlit/api/workspaces/update_workspace_user_role.py +187 -0
  109. beamlit/authentication/__init__.py +24 -0
  110. beamlit/authentication/apikey.py +14 -0
  111. beamlit/authentication/authentication.py +35 -0
  112. beamlit/authentication/credentials.py +165 -0
  113. beamlit/authentication/device_mode.py +115 -0
  114. beamlit/client.py +270 -0
  115. beamlit/errors.py +16 -0
  116. beamlit/models/__init__.py +189 -0
  117. beamlit/models/acl.py +149 -0
  118. beamlit/models/agent.py +151 -0
  119. beamlit/models/agent_chain.py +77 -0
  120. beamlit/models/agent_configuration.py +68 -0
  121. beamlit/models/agent_deployment.py +327 -0
  122. beamlit/models/agent_deployment_configuration.py +43 -0
  123. beamlit/models/agent_deployment_history.py +183 -0
  124. beamlit/models/agent_deployment_history_event.py +131 -0
  125. beamlit/models/agent_deployment_pod_template.py +43 -0
  126. beamlit/models/agent_release.py +68 -0
  127. beamlit/models/api_key.py +140 -0
  128. beamlit/models/authentication_provider_model.py +142 -0
  129. beamlit/models/authentication_provider_organization.py +86 -0
  130. beamlit/models/configuration.py +72 -0
  131. beamlit/models/continent.py +68 -0
  132. beamlit/models/country.py +68 -0
  133. beamlit/models/create_api_key_for_service_account_body.py +67 -0
  134. beamlit/models/create_workspace_service_account_body.py +69 -0
  135. beamlit/models/create_workspace_service_account_response_200.py +103 -0
  136. beamlit/models/delete_workspace_service_account_response_200.py +94 -0
  137. beamlit/models/deployment_configuration.py +68 -0
  138. beamlit/models/deployment_configurations.py +43 -0
  139. beamlit/models/deployment_serverless_config.py +129 -0
  140. beamlit/models/environment.py +162 -0
  141. beamlit/models/environment_metrics.py +75 -0
  142. beamlit/models/flavor.py +68 -0
  143. beamlit/models/function.py +151 -0
  144. beamlit/models/function_configuration.py +68 -0
  145. beamlit/models/function_deployment.py +327 -0
  146. beamlit/models/function_deployment_configuration.py +43 -0
  147. beamlit/models/function_deployment_pod_template.py +43 -0
  148. beamlit/models/function_kit.py +95 -0
  149. beamlit/models/function_provider_ref.py +68 -0
  150. beamlit/models/function_release.py +68 -0
  151. beamlit/models/get_workspace_service_accounts_response_200_item.py +94 -0
  152. beamlit/models/invite_workspace_user_body.py +58 -0
  153. beamlit/models/labels.py +43 -0
  154. beamlit/models/labels_type_0.py +43 -0
  155. beamlit/models/location.py +120 -0
  156. beamlit/models/location_response.py +111 -0
  157. beamlit/models/metric.py +68 -0
  158. beamlit/models/metrics.py +111 -0
  159. beamlit/models/model.py +151 -0
  160. beamlit/models/model_deployment.py +283 -0
  161. beamlit/models/model_deployment_log.py +68 -0
  162. beamlit/models/model_deployment_metrics.py +170 -0
  163. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +75 -0
  164. beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
  165. beamlit/models/model_deployment_pod_template.py +43 -0
  166. beamlit/models/model_metrics.py +94 -0
  167. beamlit/models/model_provider.py +187 -0
  168. beamlit/models/model_provider_ref.py +68 -0
  169. beamlit/models/model_release.py +68 -0
  170. beamlit/models/model_with_deployments.py +174 -0
  171. beamlit/models/pending_invitation.py +122 -0
  172. beamlit/models/pending_invitation_accept.py +81 -0
  173. beamlit/models/pending_invitation_render.py +135 -0
  174. beamlit/models/pending_invitation_render_invited_by.py +86 -0
  175. beamlit/models/pending_invitation_render_workspace.py +68 -0
  176. beamlit/models/pending_invitation_workspace_details.py +70 -0
  177. beamlit/models/policy.py +216 -0
  178. beamlit/models/policy_location.py +68 -0
  179. beamlit/models/provider_config.py +101 -0
  180. beamlit/models/qps.py +59 -0
  181. beamlit/models/resource_deployment_log.py +68 -0
  182. beamlit/models/resource_deployment_metrics.py +172 -0
  183. beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +75 -0
  184. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
  185. beamlit/models/resource_metrics.py +94 -0
  186. beamlit/models/runtime.py +152 -0
  187. beamlit/models/runtime_readiness_probe.py +43 -0
  188. beamlit/models/runtime_resources.py +43 -0
  189. beamlit/models/serverless_config.py +122 -0
  190. beamlit/models/standard_fields_dynamo_db.py +86 -0
  191. beamlit/models/store_agent.py +165 -0
  192. beamlit/models/store_agent_configuration.py +95 -0
  193. beamlit/models/store_agent_labels.py +43 -0
  194. beamlit/models/store_configuration.py +149 -0
  195. beamlit/models/store_configuration_option.py +77 -0
  196. beamlit/models/store_function.py +207 -0
  197. beamlit/models/store_function_configuration.py +95 -0
  198. beamlit/models/store_function_kit.py +95 -0
  199. beamlit/models/store_function_labels.py +43 -0
  200. beamlit/models/store_function_parameter.py +86 -0
  201. beamlit/models/update_workspace_service_account_body.py +67 -0
  202. beamlit/models/update_workspace_service_account_response_200.py +94 -0
  203. beamlit/models/update_workspace_user_role_body.py +58 -0
  204. beamlit/models/workspace.py +126 -0
  205. beamlit/models/workspace_labels.py +43 -0
  206. beamlit/models/workspace_user.py +113 -0
  207. beamlit/py.typed +1 -0
  208. beamlit/types.py +46 -0
  209. beamlit-0.1.0.dist-info/METADATA +59 -0
  210. beamlit-0.1.0.dist-info/RECORD +211 -0
  211. beamlit-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,327 @@
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.deployment_serverless_config import DeploymentServerlessConfig
10
+ from ..models.flavor import Flavor
11
+ from ..models.function_deployment_configuration import FunctionDeploymentConfiguration
12
+ from ..models.function_deployment_pod_template import FunctionDeploymentPodTemplate
13
+ from ..models.function_kit import FunctionKit
14
+ from ..models.labels_type_0 import LabelsType0
15
+ from ..models.runtime import Runtime
16
+ from ..models.store_function_parameter import StoreFunctionParameter
17
+
18
+
19
+ T = TypeVar("T", bound="FunctionDeployment")
20
+
21
+
22
+ @_attrs_define
23
+ class FunctionDeployment:
24
+ """Function deployment configuration
25
+
26
+ Attributes:
27
+ created_at (Union[Unset, str]): The date and time when the resource was created
28
+ created_by (Union[Unset, str]): The user or service account who created the resource
29
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
30
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
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
+ description (Union[Unset, str]): Function description, very important for the agent function to work with an LLM
34
+ enabled (Union[Unset, bool]): Whether the function deployment is enabled
35
+ environment (Union[Unset, str]): The name of the environment
36
+ flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
37
+ function (Union[Unset, str]): The name of the function
38
+ kit (Union[Unset, List['FunctionKit']]): The kit of the function deployment
39
+ labels (Union['LabelsType0', None, Unset]): Labels
40
+ parameters (Union[Unset, List['StoreFunctionParameter']]): Function parameters, for your function to be callable
41
+ with Agent
42
+ pod_template (Union[Unset, FunctionDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
43
+ template
44
+ policies (Union[Unset, List[str]]):
45
+ runtime (Union[Unset, Runtime]): Set of configurations for a deployment
46
+ serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
47
+ store_id (Union[Unset, str]): Create from a store registered function
48
+ workspace (Union[Unset, str]): The workspace the function deployment belongs to
49
+ """
50
+
51
+ created_at: Union[Unset, str] = UNSET
52
+ created_by: Union[Unset, str] = UNSET
53
+ updated_at: Union[Unset, str] = UNSET
54
+ updated_by: Union[Unset, str] = UNSET
55
+ configuration: Union[Unset, "FunctionDeploymentConfiguration"] = UNSET
56
+ description: Union[Unset, str] = UNSET
57
+ enabled: Union[Unset, bool] = UNSET
58
+ environment: Union[Unset, str] = UNSET
59
+ flavors: Union[Unset, List["Flavor"]] = UNSET
60
+ function: Union[Unset, str] = UNSET
61
+ kit: Union[Unset, List["FunctionKit"]] = UNSET
62
+ labels: Union["LabelsType0", None, Unset] = UNSET
63
+ parameters: Union[Unset, List["StoreFunctionParameter"]] = UNSET
64
+ pod_template: Union[Unset, "FunctionDeploymentPodTemplate"] = UNSET
65
+ policies: Union[Unset, List[str]] = UNSET
66
+ runtime: Union[Unset, "Runtime"] = UNSET
67
+ serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
68
+ store_id: Union[Unset, str] = UNSET
69
+ workspace: Union[Unset, str] = UNSET
70
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
71
+
72
+ def to_dict(self) -> dict[str, Any]:
73
+ from ..models.labels_type_0 import LabelsType0
74
+
75
+ created_at = self.created_at
76
+
77
+ created_by = self.created_by
78
+
79
+ updated_at = self.updated_at
80
+
81
+ updated_by = self.updated_by
82
+
83
+ configuration: Union[Unset, Dict[str, Any]] = UNSET
84
+ if not isinstance(self.configuration, Unset):
85
+ configuration = self.configuration.to_dict()
86
+
87
+ description = self.description
88
+
89
+ enabled = self.enabled
90
+
91
+ environment = self.environment
92
+
93
+ flavors: Union[Unset, List[Dict[str, Any]]] = UNSET
94
+ if not isinstance(self.flavors, Unset):
95
+ flavors = []
96
+ for componentsschemas_flavors_item_data in self.flavors:
97
+ componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
98
+ flavors.append(componentsschemas_flavors_item)
99
+
100
+ function = self.function
101
+
102
+ kit: Union[Unset, List[Dict[str, Any]]] = UNSET
103
+ if not isinstance(self.kit, Unset):
104
+ kit = []
105
+ for kit_item_data in self.kit:
106
+ kit_item = kit_item_data.to_dict()
107
+ kit.append(kit_item)
108
+
109
+ labels: Union[Dict[str, Any], None, Unset]
110
+ if isinstance(self.labels, Unset):
111
+ labels = UNSET
112
+ elif isinstance(self.labels, LabelsType0):
113
+ labels = self.labels.to_dict()
114
+ else:
115
+ labels = self.labels
116
+
117
+ parameters: Union[Unset, List[Dict[str, Any]]] = UNSET
118
+ if not isinstance(self.parameters, Unset):
119
+ parameters = []
120
+ for parameters_item_data in self.parameters:
121
+ parameters_item = parameters_item_data.to_dict()
122
+ parameters.append(parameters_item)
123
+
124
+ pod_template: Union[Unset, Dict[str, Any]] = UNSET
125
+ if not isinstance(self.pod_template, Unset):
126
+ pod_template = self.pod_template.to_dict()
127
+
128
+ policies: Union[Unset, List[str]] = UNSET
129
+ if not isinstance(self.policies, Unset):
130
+ policies = self.policies
131
+
132
+ runtime: Union[Unset, Dict[str, Any]] = UNSET
133
+ if not isinstance(self.runtime, Unset):
134
+ runtime = self.runtime.to_dict()
135
+
136
+ serverless_config: Union[Unset, Dict[str, Any]] = UNSET
137
+ if not isinstance(self.serverless_config, Unset):
138
+ serverless_config = self.serverless_config.to_dict()
139
+
140
+ store_id = self.store_id
141
+
142
+ workspace = self.workspace
143
+
144
+ field_dict: dict[str, Any] = {}
145
+ field_dict.update(self.additional_properties)
146
+ field_dict.update({})
147
+ if created_at is not UNSET:
148
+ field_dict["created_at"] = created_at
149
+ if created_by is not UNSET:
150
+ field_dict["created_by"] = created_by
151
+ if updated_at is not UNSET:
152
+ field_dict["updated_at"] = updated_at
153
+ if updated_by is not UNSET:
154
+ field_dict["updated_by"] = updated_by
155
+ if configuration is not UNSET:
156
+ field_dict["configuration"] = configuration
157
+ if description is not UNSET:
158
+ field_dict["description"] = description
159
+ if enabled is not UNSET:
160
+ field_dict["enabled"] = enabled
161
+ if environment is not UNSET:
162
+ field_dict["environment"] = environment
163
+ if flavors is not UNSET:
164
+ field_dict["flavors"] = flavors
165
+ if function is not UNSET:
166
+ field_dict["function"] = function
167
+ if kit is not UNSET:
168
+ field_dict["kit"] = kit
169
+ if labels is not UNSET:
170
+ field_dict["labels"] = labels
171
+ if parameters is not UNSET:
172
+ field_dict["parameters"] = parameters
173
+ if pod_template is not UNSET:
174
+ field_dict["pod_template"] = pod_template
175
+ if policies is not UNSET:
176
+ field_dict["policies"] = policies
177
+ if runtime is not UNSET:
178
+ field_dict["runtime"] = runtime
179
+ if serverless_config is not UNSET:
180
+ field_dict["serverless_config"] = serverless_config
181
+ if store_id is not UNSET:
182
+ field_dict["store_id"] = store_id
183
+ if workspace is not UNSET:
184
+ field_dict["workspace"] = workspace
185
+
186
+ return field_dict
187
+
188
+ @classmethod
189
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
190
+ from ..models.deployment_serverless_config import DeploymentServerlessConfig
191
+ from ..models.flavor import Flavor
192
+ from ..models.function_deployment_configuration import FunctionDeploymentConfiguration
193
+ from ..models.function_deployment_pod_template import FunctionDeploymentPodTemplate
194
+ from ..models.function_kit import FunctionKit
195
+ from ..models.labels_type_0 import LabelsType0
196
+ from ..models.runtime import Runtime
197
+ from ..models.store_function_parameter import StoreFunctionParameter
198
+
199
+ d = src_dict.copy()
200
+ created_at = d.pop("created_at", UNSET)
201
+
202
+ created_by = d.pop("created_by", UNSET)
203
+
204
+ updated_at = d.pop("updated_at", UNSET)
205
+
206
+ updated_by = d.pop("updated_by", UNSET)
207
+
208
+ _configuration = d.pop("configuration", UNSET)
209
+ configuration: Union[Unset, FunctionDeploymentConfiguration]
210
+ if isinstance(_configuration, Unset):
211
+ configuration = UNSET
212
+ else:
213
+ configuration = FunctionDeploymentConfiguration.from_dict(_configuration)
214
+
215
+ description = d.pop("description", UNSET)
216
+
217
+ enabled = d.pop("enabled", UNSET)
218
+
219
+ environment = d.pop("environment", UNSET)
220
+
221
+ flavors = []
222
+ _flavors = d.pop("flavors", UNSET)
223
+ for componentsschemas_flavors_item_data in _flavors or []:
224
+ componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
225
+
226
+ flavors.append(componentsschemas_flavors_item)
227
+
228
+ function = d.pop("function", UNSET)
229
+
230
+ kit = []
231
+ _kit = d.pop("kit", UNSET)
232
+ for kit_item_data in _kit or []:
233
+ kit_item = FunctionKit.from_dict(kit_item_data)
234
+
235
+ kit.append(kit_item)
236
+
237
+ def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
238
+ if data is None:
239
+ return data
240
+ if isinstance(data, Unset):
241
+ return data
242
+ try:
243
+ if not isinstance(data, dict):
244
+ raise TypeError()
245
+ componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
246
+
247
+ return componentsschemas_labels_type_0
248
+ except: # noqa: E722
249
+ pass
250
+ return cast(Union["LabelsType0", None, Unset], data)
251
+
252
+ labels = _parse_labels(d.pop("labels", UNSET))
253
+
254
+ parameters = []
255
+ _parameters = d.pop("parameters", UNSET)
256
+ for parameters_item_data in _parameters or []:
257
+ parameters_item = StoreFunctionParameter.from_dict(parameters_item_data)
258
+
259
+ parameters.append(parameters_item)
260
+
261
+ _pod_template = d.pop("pod_template", UNSET)
262
+ pod_template: Union[Unset, FunctionDeploymentPodTemplate]
263
+ if isinstance(_pod_template, Unset):
264
+ pod_template = UNSET
265
+ else:
266
+ pod_template = FunctionDeploymentPodTemplate.from_dict(_pod_template)
267
+
268
+ policies = cast(List[str], d.pop("policies", UNSET))
269
+
270
+ _runtime = d.pop("runtime", UNSET)
271
+ runtime: Union[Unset, Runtime]
272
+ if isinstance(_runtime, Unset):
273
+ runtime = UNSET
274
+ else:
275
+ runtime = Runtime.from_dict(_runtime)
276
+
277
+ _serverless_config = d.pop("serverless_config", UNSET)
278
+ serverless_config: Union[Unset, DeploymentServerlessConfig]
279
+ if isinstance(_serverless_config, Unset):
280
+ serverless_config = UNSET
281
+ else:
282
+ serverless_config = DeploymentServerlessConfig.from_dict(_serverless_config)
283
+
284
+ store_id = d.pop("store_id", UNSET)
285
+
286
+ workspace = d.pop("workspace", UNSET)
287
+
288
+ function_deployment = cls(
289
+ created_at=created_at,
290
+ created_by=created_by,
291
+ updated_at=updated_at,
292
+ updated_by=updated_by,
293
+ configuration=configuration,
294
+ description=description,
295
+ enabled=enabled,
296
+ environment=environment,
297
+ flavors=flavors,
298
+ function=function,
299
+ kit=kit,
300
+ labels=labels,
301
+ parameters=parameters,
302
+ pod_template=pod_template,
303
+ policies=policies,
304
+ runtime=runtime,
305
+ serverless_config=serverless_config,
306
+ store_id=store_id,
307
+ workspace=workspace,
308
+ )
309
+
310
+ function_deployment.additional_properties = d
311
+ return function_deployment
312
+
313
+ @property
314
+ def additional_keys(self) -> list[str]:
315
+ return list(self.additional_properties.keys())
316
+
317
+ def __getitem__(self, key: str) -> Any:
318
+ return self.additional_properties[key]
319
+
320
+ def __setitem__(self, key: str, value: Any) -> None:
321
+ self.additional_properties[key] = value
322
+
323
+ def __delitem__(self, key: str) -> None:
324
+ del self.additional_properties[key]
325
+
326
+ def __contains__(self, key: str) -> bool:
327
+ 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="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
+ d = src_dict.copy()
24
+ function_deployment_configuration = cls()
25
+
26
+ function_deployment_configuration.additional_properties = d
27
+ return function_deployment_configuration
28
+
29
+ @property
30
+ def additional_keys(self) -> list[str]:
31
+ return list(self.additional_properties.keys())
32
+
33
+ def __getitem__(self, key: str) -> Any:
34
+ return self.additional_properties[key]
35
+
36
+ def __setitem__(self, key: str, value: Any) -> 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
@@ -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="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
+ d = src_dict.copy()
24
+ function_deployment_pod_template = cls()
25
+
26
+ function_deployment_pod_template.additional_properties = d
27
+ return function_deployment_pod_template
28
+
29
+ @property
30
+ def additional_keys(self) -> list[str]:
31
+ return list(self.additional_properties.keys())
32
+
33
+ def __getitem__(self, key: str) -> Any:
34
+ return self.additional_properties[key]
35
+
36
+ def __setitem__(self, key: str, value: Any) -> 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
@@ -0,0 +1,95 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, 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.store_function_parameter import StoreFunctionParameter
10
+
11
+
12
+ T = TypeVar("T", bound="FunctionKit")
13
+
14
+
15
+ @_attrs_define
16
+ class FunctionKit:
17
+ """Function kit
18
+
19
+ Attributes:
20
+ description (Union[Unset, str]): Description of the function kit, very important for the agent to work with your
21
+ kit
22
+ name (Union[Unset, str]): The kit name, very important for the agent to work with your kit
23
+ parameters (Union[Unset, List['StoreFunctionParameter']]): Kit parameters, for your kit to be callable with an
24
+ Agent
25
+ """
26
+
27
+ description: Union[Unset, str] = UNSET
28
+ name: Union[Unset, str] = UNSET
29
+ parameters: Union[Unset, List["StoreFunctionParameter"]] = UNSET
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ description = self.description
34
+
35
+ name = self.name
36
+
37
+ parameters: Union[Unset, List[Dict[str, Any]]] = UNSET
38
+ if not isinstance(self.parameters, Unset):
39
+ parameters = []
40
+ for parameters_item_data in self.parameters:
41
+ parameters_item = parameters_item_data.to_dict()
42
+ parameters.append(parameters_item)
43
+
44
+ field_dict: dict[str, Any] = {}
45
+ field_dict.update(self.additional_properties)
46
+ field_dict.update({})
47
+ if description is not UNSET:
48
+ field_dict["description"] = description
49
+ if name is not UNSET:
50
+ field_dict["name"] = name
51
+ if parameters is not UNSET:
52
+ field_dict["parameters"] = parameters
53
+
54
+ return field_dict
55
+
56
+ @classmethod
57
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
58
+ from ..models.store_function_parameter import StoreFunctionParameter
59
+
60
+ d = src_dict.copy()
61
+ description = d.pop("description", UNSET)
62
+
63
+ name = d.pop("name", UNSET)
64
+
65
+ parameters = []
66
+ _parameters = d.pop("parameters", UNSET)
67
+ for parameters_item_data in _parameters or []:
68
+ parameters_item = StoreFunctionParameter.from_dict(parameters_item_data)
69
+
70
+ parameters.append(parameters_item)
71
+
72
+ function_kit = cls(
73
+ description=description,
74
+ name=name,
75
+ parameters=parameters,
76
+ )
77
+
78
+ function_kit.additional_properties = d
79
+ return function_kit
80
+
81
+ @property
82
+ def additional_keys(self) -> list[str]:
83
+ return list(self.additional_properties.keys())
84
+
85
+ def __getitem__(self, key: str) -> Any:
86
+ return self.additional_properties[key]
87
+
88
+ def __setitem__(self, key: str, value: Any) -> None:
89
+ self.additional_properties[key] = value
90
+
91
+ def __delitem__(self, key: str) -> None:
92
+ del self.additional_properties[key]
93
+
94
+ def __contains__(self, key: str) -> bool:
95
+ 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="FunctionProviderRef")
9
+
10
+
11
+ @_attrs_define
12
+ class FunctionProviderRef:
13
+ """Reference to a model provider
14
+
15
+ Attributes:
16
+ kind (Union[Unset, str]): The kind of the model provider, can be Provider
17
+ name (Union[Unset, str]): The name of the model provider
18
+ """
19
+
20
+ kind: Union[Unset, str] = UNSET
21
+ name: Union[Unset, str] = UNSET
22
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
+
24
+ def to_dict(self) -> dict[str, Any]:
25
+ kind = self.kind
26
+
27
+ name = self.name
28
+
29
+ field_dict: dict[str, Any] = {}
30
+ field_dict.update(self.additional_properties)
31
+ field_dict.update({})
32
+ if kind is not UNSET:
33
+ field_dict["kind"] = kind
34
+ if name is not UNSET:
35
+ field_dict["name"] = name
36
+
37
+ return field_dict
38
+
39
+ @classmethod
40
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
41
+ d = src_dict.copy()
42
+ kind = d.pop("kind", UNSET)
43
+
44
+ name = d.pop("name", UNSET)
45
+
46
+ function_provider_ref = cls(
47
+ kind=kind,
48
+ name=name,
49
+ )
50
+
51
+ function_provider_ref.additional_properties = d
52
+ return function_provider_ref
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,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="FunctionRelease")
9
+
10
+
11
+ @_attrs_define
12
+ class FunctionRelease:
13
+ """Function release, used to deploy a function from one environment to another
14
+
15
+ Attributes:
16
+ from_ (Union[Unset, str]): Origin environment from which the function is released
17
+ to (Union[Unset, str]): Destination environment to which the function is released
18
+ """
19
+
20
+ from_: Union[Unset, str] = UNSET
21
+ to: 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
+ from_ = self.from_
26
+
27
+ to = self.to
28
+
29
+ field_dict: dict[str, Any] = {}
30
+ field_dict.update(self.additional_properties)
31
+ field_dict.update({})
32
+ if from_ is not UNSET:
33
+ field_dict["from"] = from_
34
+ if to is not UNSET:
35
+ field_dict["to"] = to
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
+ from_ = d.pop("from", UNSET)
43
+
44
+ to = d.pop("to", UNSET)
45
+
46
+ function_release = cls(
47
+ from_=from_,
48
+ to=to,
49
+ )
50
+
51
+ function_release.additional_properties = d
52
+ return function_release
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