beamlit 0.0.18__py3-none-any.whl → 0.0.20__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/__init__.py +4 -0
- beamlit/agents/chat.py +87 -0
- beamlit/agents/decorator.py +147 -0
- beamlit/api/agents/create_agent.py +14 -9
- beamlit/api/agents/delete_agent_history.py +159 -0
- beamlit/api/agents/get_agent_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_organizations_for_authentication_provider.py → agents/get_agent_environment_logs.py} +30 -42
- beamlit/api/{authentication_providers/get_model_with_repo_for_authentication_provider.py → agents/get_agent_history.py} +43 -68
- beamlit/api/agents/list_agent_deployment_history.py +11 -11
- beamlit/api/agents/list_agent_deployments.py +11 -11
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/list_agents.py +11 -11
- beamlit/api/agents/put_agent_history.py +185 -0
- beamlit/api/agents/update_agent.py +14 -9
- beamlit/api/environments/list_environments.py +11 -11
- beamlit/api/functions/create_function.py +14 -9
- beamlit/api/functions/get_function_deployment_logs.py +11 -11
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/functions/list_function_deployments.py +11 -11
- beamlit/api/functions/list_functions.py +11 -11
- beamlit/api/functions/update_function.py +14 -9
- beamlit/api/history/get_agents_history.py +11 -11
- beamlit/api/history/list_agents_history.py +11 -11
- beamlit/api/integrations/create_integration_connection.py +167 -0
- beamlit/api/integrations/delete_integration_connection.py +158 -0
- beamlit/api/integrations/get_integration.py +97 -0
- beamlit/api/integrations/get_integration_connection.py +154 -0
- beamlit/api/integrations/get_integration_connection_model.py +97 -0
- beamlit/api/integrations/get_integration_model.py +97 -0
- beamlit/api/integrations/list_integration_connection_models.py +97 -0
- beamlit/api/integrations/list_integration_connections.py +139 -0
- beamlit/api/integrations/list_integration_models.py +97 -0
- beamlit/api/integrations/update_integration_connection.py +180 -0
- beamlit/api/invitations/list_all_pending_invitations.py +11 -11
- beamlit/api/locations/list_locations.py +11 -11
- beamlit/api/model_providers/list_model_providers.py +11 -11
- beamlit/api/models/get_model_deployment_logs.py +11 -11
- beamlit/api/{authentication_providers/list_models_for_authentication_provider.py → models/get_model_environment_logs.py} +30 -38
- beamlit/api/models/list_model_deployments.py +11 -11
- beamlit/api/models/list_models.py +11 -11
- beamlit/api/policies/list_policies.py +11 -11
- beamlit/api/service_accounts/get_workspace_service_accounts.py +11 -11
- beamlit/api/service_accounts/list_api_keys_for_service_account.py +11 -11
- beamlit/api/store/list_store_agents.py +11 -11
- beamlit/api/store/list_store_functions.py +11 -11
- beamlit/api/workspaces/list_workspace_users.py +11 -11
- beamlit/api/workspaces/list_workspaces.py +11 -11
- beamlit/authentication/__init__.py +29 -8
- beamlit/authentication/apikey.py +8 -2
- beamlit/authentication/authentication.py +66 -3
- beamlit/authentication/clientcredentials.py +108 -0
- beamlit/authentication/credentials.py +22 -8
- beamlit/authentication/device_mode.py +23 -13
- beamlit/common/__init__.py +13 -0
- beamlit/common/generate.py +183 -0
- beamlit/common/logger.py +29 -0
- beamlit/common/secrets.py +11 -0
- beamlit/common/settings.py +156 -0
- beamlit/common/utils.py +15 -0
- beamlit/functions/__init__.py +5 -0
- beamlit/functions/decorator.py +90 -0
- beamlit/functions/github/__init__.py +3 -0
- beamlit/functions/github/github.py +21 -0
- beamlit/functions/github/kit/__init__.py +7 -0
- beamlit/functions/github/kit/pull_request.py +51 -0
- beamlit/functions/math/__init__.py +3 -0
- beamlit/functions/math/math.py +40 -0
- beamlit/functions/search/__init__.py +3 -0
- beamlit/functions/search/search.py +15 -0
- beamlit/models/__init__.py +24 -0
- beamlit/models/acl.py +4 -2
- beamlit/models/agent.py +5 -3
- beamlit/models/agent_chain.py +4 -2
- beamlit/models/agent_configuration.py +4 -2
- beamlit/models/agent_deployment.py +41 -28
- beamlit/models/agent_deployment_configuration.py +4 -2
- beamlit/models/agent_deployment_configuration_type_0.py +43 -0
- beamlit/models/agent_deployment_history.py +7 -5
- beamlit/models/agent_deployment_history_event.py +11 -9
- beamlit/models/agent_deployment_pod_template.py +4 -2
- beamlit/models/agent_deployment_pod_template_type_0.py +43 -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 +4 -2
- beamlit/models/agent_spec.py +248 -0
- beamlit/models/agent_with_deployments.py +176 -0
- beamlit/models/api_key.py +4 -2
- beamlit/models/authentication_provider_model.py +8 -6
- beamlit/models/authentication_provider_organization.py +4 -2
- beamlit/models/configuration.py +12 -10
- beamlit/models/continent.py +4 -2
- beamlit/models/core_spec.py +185 -0
- beamlit/models/country.py +4 -2
- beamlit/models/create_api_key_for_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_body.py +4 -2
- beamlit/models/create_workspace_service_account_response_200.py +4 -2
- beamlit/models/delete_workspace_service_account_response_200.py +4 -2
- beamlit/models/deployment_configuration.py +4 -2
- beamlit/models/deployment_configurations.py +22 -7
- beamlit/models/deployment_serverless_config.py +4 -2
- beamlit/models/deployment_serverless_config_type_0.py +220 -0
- beamlit/models/environment.py +9 -7
- beamlit/models/environment_metrics.py +26 -5
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +11 -9
- beamlit/models/function.py +5 -3
- beamlit/models/function_configuration.py +4 -2
- beamlit/models/function_deployment.py +33 -20
- beamlit/models/function_deployment_configuration.py +4 -2
- beamlit/models/function_deployment_configuration_type_0.py +43 -0
- beamlit/models/function_deployment_pod_template.py +4 -2
- beamlit/models/function_deployment_pod_template_type_0.py +43 -0
- beamlit/models/function_kit.py +7 -5
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +4 -2
- beamlit/models/function_release.py +4 -2
- beamlit/models/function_spec.py +246 -0
- beamlit/models/function_with_deployments.py +176 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +4 -2
- beamlit/models/increase_and_rate_metric.py +104 -0
- beamlit/models/integration.py +198 -0
- beamlit/models/integration_config.py +45 -0
- beamlit/models/integration_connection.py +198 -0
- beamlit/models/integration_connection_config.py +45 -0
- beamlit/models/integration_connection_secret.py +61 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +144 -0
- beamlit/models/integration_secret.py +61 -0
- beamlit/models/invite_workspace_user_body.py +4 -2
- beamlit/models/labels_type_0.py +4 -2
- beamlit/models/location.py +7 -5
- beamlit/models/location_response.py +7 -5
- beamlit/models/metadata.py +135 -0
- beamlit/models/{labels.py → metadata_labels.py} +5 -5
- beamlit/models/metric.py +4 -2
- beamlit/models/metrics.py +68 -25
- beamlit/models/model.py +5 -3
- beamlit/models/model_deployment.py +27 -14
- beamlit/models/model_deployment_log.py +4 -2
- beamlit/models/model_deployment_metrics.py +11 -9
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/model_deployment_pod_template.py +4 -2
- beamlit/models/model_deployment_pod_template_type_0.py +43 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +8 -6
- beamlit/models/model_provider.py +13 -11
- beamlit/models/model_provider_ref.py +4 -2
- beamlit/models/model_release.py +4 -2
- beamlit/models/model_spec.py +194 -0
- beamlit/models/model_with_deployments.py +8 -6
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +4 -2
- beamlit/models/pending_invitation_accept.py +5 -3
- beamlit/models/pending_invitation_render.py +7 -5
- beamlit/models/pending_invitation_render_invited_by.py +4 -2
- beamlit/models/pending_invitation_render_workspace.py +4 -2
- beamlit/models/pending_invitation_workspace_details.py +8 -6
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +22 -20
- beamlit/models/policy_location.py +11 -9
- beamlit/models/policy_spec.py +125 -0
- beamlit/models/provider_config.py +9 -16
- beamlit/models/qps.py +4 -2
- beamlit/models/resource_deployment_log.py +4 -2
- beamlit/models/resource_deployment_metrics.py +119 -9
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +7 -5
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +79 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +73 -0
- beamlit/models/resource_environment_metrics.py +210 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +79 -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 +44 -6
- beamlit/models/runtime.py +25 -23
- beamlit/models/runtime_readiness_probe.py +4 -2
- beamlit/models/runtime_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_resources.py +4 -2
- 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 +4 -2
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +4 -2
- beamlit/models/store_agent.py +8 -6
- beamlit/models/store_agent_configuration.py +4 -2
- beamlit/models/store_agent_labels.py +4 -2
- beamlit/models/store_agent_labels_type_0.py +43 -0
- beamlit/models/store_configuration.py +18 -16
- beamlit/models/store_configuration_option.py +4 -2
- beamlit/models/store_function.py +14 -12
- beamlit/models/store_function_configuration.py +4 -2
- beamlit/models/store_function_kit.py +7 -5
- beamlit/models/store_function_labels.py +4 -2
- beamlit/models/store_function_labels_type_0.py +43 -0
- beamlit/models/store_function_parameter.py +11 -9
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +4 -2
- beamlit/models/update_workspace_service_account_response_200.py +4 -2
- beamlit/models/update_workspace_user_role_body.py +4 -2
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +5 -3
- beamlit/models/workspace_labels.py +4 -2
- beamlit/models/workspace_user.py +4 -2
- beamlit/run.py +49 -0
- beamlit/serve/app.py +78 -0
- beamlit/serve/middlewares/__init__.py +4 -0
- beamlit/serve/middlewares/accesslog.py +14 -0
- beamlit/serve/middlewares/processtime.py +12 -0
- {beamlit-0.0.18.dist-info → beamlit-0.0.20.dist-info}/METADATA +11 -2
- beamlit-0.0.20.dist-info/RECORD +301 -0
- beamlit-0.0.18.dist-info/RECORD +0 -211
- /beamlit/api/{authentication_providers → integrations}/__init__.py +0 -0
- {beamlit-0.0.18.dist-info → beamlit-0.0.20.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -28,21 +28,22 @@ class AgentDeployment:
|
|
28
28
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
29
29
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
30
30
|
agent (Union[Unset, str]): The name of the agent
|
31
|
-
agent_chain (Union[Unset,
|
31
|
+
agent_chain (Union[Unset, list['AgentChain']]): Agent chaining configuration
|
32
32
|
configuration (Union[Unset, AgentDeploymentConfiguration]): Agent configuration, this is a key value storage. In
|
33
33
|
your agent you can retrieve the value with config[key]
|
34
34
|
description (Union[Unset, str]): Agent description, very important to have a clear description for your agent if
|
35
35
|
you want to make it work with agent chaining
|
36
36
|
enabled (Union[Unset, bool]): Whether the agent deployment is enabled
|
37
37
|
environment (Union[Unset, str]): The name of the environment
|
38
|
-
flavors (Union[Unset,
|
39
|
-
functions (Union[Unset,
|
38
|
+
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
39
|
+
functions (Union[Unset, list[str]]): Functions used by the agent, those functions needs to be created before
|
40
40
|
setting it here
|
41
|
+
integration_connections (Union[Unset, list[str]]):
|
41
42
|
labels (Union['LabelsType0', None, Unset]): Labels
|
42
|
-
|
43
|
+
model (Union[Unset, str]): Model beamlit to use for agent, it should be compatible with function calling
|
43
44
|
pod_template (Union[Unset, AgentDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
|
44
45
|
template
|
45
|
-
policies (Union[Unset,
|
46
|
+
policies (Union[Unset, list[str]]):
|
46
47
|
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
47
48
|
serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
|
48
49
|
store_id (Union[Unset, str]): Create from a store registered function
|
@@ -54,17 +55,18 @@ class AgentDeployment:
|
|
54
55
|
updated_at: Union[Unset, str] = UNSET
|
55
56
|
updated_by: Union[Unset, str] = UNSET
|
56
57
|
agent: Union[Unset, str] = UNSET
|
57
|
-
agent_chain: Union[Unset,
|
58
|
+
agent_chain: Union[Unset, list["AgentChain"]] = UNSET
|
58
59
|
configuration: Union[Unset, "AgentDeploymentConfiguration"] = UNSET
|
59
60
|
description: Union[Unset, str] = UNSET
|
60
61
|
enabled: Union[Unset, bool] = UNSET
|
61
62
|
environment: Union[Unset, str] = UNSET
|
62
|
-
flavors: Union[Unset,
|
63
|
-
functions: Union[Unset,
|
63
|
+
flavors: Union[Unset, list["Flavor"]] = UNSET
|
64
|
+
functions: Union[Unset, list[str]] = UNSET
|
65
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
64
66
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
65
|
-
|
67
|
+
model: Union[Unset, str] = UNSET
|
66
68
|
pod_template: Union[Unset, "AgentDeploymentPodTemplate"] = UNSET
|
67
|
-
policies: Union[Unset,
|
69
|
+
policies: Union[Unset, list[str]] = UNSET
|
68
70
|
runtime: Union[Unset, "Runtime"] = UNSET
|
69
71
|
serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
|
70
72
|
store_id: Union[Unset, str] = UNSET
|
@@ -84,14 +86,14 @@ class AgentDeployment:
|
|
84
86
|
|
85
87
|
agent = self.agent
|
86
88
|
|
87
|
-
agent_chain: Union[Unset,
|
89
|
+
agent_chain: Union[Unset, list[dict[str, Any]]] = UNSET
|
88
90
|
if not isinstance(self.agent_chain, Unset):
|
89
91
|
agent_chain = []
|
90
92
|
for agent_chain_item_data in self.agent_chain:
|
91
93
|
agent_chain_item = agent_chain_item_data.to_dict()
|
92
94
|
agent_chain.append(agent_chain_item)
|
93
95
|
|
94
|
-
configuration: Union[Unset,
|
96
|
+
configuration: Union[Unset, dict[str, Any]] = UNSET
|
95
97
|
if not isinstance(self.configuration, Unset):
|
96
98
|
configuration = self.configuration.to_dict()
|
97
99
|
|
@@ -101,18 +103,22 @@ class AgentDeployment:
|
|
101
103
|
|
102
104
|
environment = self.environment
|
103
105
|
|
104
|
-
flavors: Union[Unset,
|
106
|
+
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
105
107
|
if not isinstance(self.flavors, Unset):
|
106
108
|
flavors = []
|
107
109
|
for componentsschemas_flavors_item_data in self.flavors:
|
108
110
|
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
109
111
|
flavors.append(componentsschemas_flavors_item)
|
110
112
|
|
111
|
-
functions: Union[Unset,
|
113
|
+
functions: Union[Unset, list[str]] = UNSET
|
112
114
|
if not isinstance(self.functions, Unset):
|
113
115
|
functions = self.functions
|
114
116
|
|
115
|
-
|
117
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
118
|
+
if not isinstance(self.integration_connections, Unset):
|
119
|
+
integration_connections = self.integration_connections
|
120
|
+
|
121
|
+
labels: Union[None, Unset, dict[str, Any]]
|
116
122
|
if isinstance(self.labels, Unset):
|
117
123
|
labels = UNSET
|
118
124
|
elif isinstance(self.labels, LabelsType0):
|
@@ -120,21 +126,21 @@ class AgentDeployment:
|
|
120
126
|
else:
|
121
127
|
labels = self.labels
|
122
128
|
|
123
|
-
|
129
|
+
model = self.model
|
124
130
|
|
125
|
-
pod_template: Union[Unset,
|
131
|
+
pod_template: Union[Unset, dict[str, Any]] = UNSET
|
126
132
|
if not isinstance(self.pod_template, Unset):
|
127
133
|
pod_template = self.pod_template.to_dict()
|
128
134
|
|
129
|
-
policies: Union[Unset,
|
135
|
+
policies: Union[Unset, list[str]] = UNSET
|
130
136
|
if not isinstance(self.policies, Unset):
|
131
137
|
policies = self.policies
|
132
138
|
|
133
|
-
runtime: Union[Unset,
|
139
|
+
runtime: Union[Unset, dict[str, Any]] = UNSET
|
134
140
|
if not isinstance(self.runtime, Unset):
|
135
141
|
runtime = self.runtime.to_dict()
|
136
142
|
|
137
|
-
serverless_config: Union[Unset,
|
143
|
+
serverless_config: Union[Unset, dict[str, Any]] = UNSET
|
138
144
|
if not isinstance(self.serverless_config, Unset):
|
139
145
|
serverless_config = self.serverless_config.to_dict()
|
140
146
|
|
@@ -169,10 +175,12 @@ class AgentDeployment:
|
|
169
175
|
field_dict["flavors"] = flavors
|
170
176
|
if functions is not UNSET:
|
171
177
|
field_dict["functions"] = functions
|
178
|
+
if integration_connections is not UNSET:
|
179
|
+
field_dict["integration_connections"] = integration_connections
|
172
180
|
if labels is not UNSET:
|
173
181
|
field_dict["labels"] = labels
|
174
|
-
if
|
175
|
-
field_dict["
|
182
|
+
if model is not UNSET:
|
183
|
+
field_dict["model"] = model
|
176
184
|
if pod_template is not UNSET:
|
177
185
|
field_dict["pod_template"] = pod_template
|
178
186
|
if policies is not UNSET:
|
@@ -189,7 +197,7 @@ class AgentDeployment:
|
|
189
197
|
return field_dict
|
190
198
|
|
191
199
|
@classmethod
|
192
|
-
def from_dict(cls:
|
200
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
193
201
|
from ..models.agent_chain import AgentChain
|
194
202
|
from ..models.agent_deployment_configuration import AgentDeploymentConfiguration
|
195
203
|
from ..models.agent_deployment_pod_template import AgentDeploymentPodTemplate
|
@@ -198,6 +206,8 @@ class AgentDeployment:
|
|
198
206
|
from ..models.labels_type_0 import LabelsType0
|
199
207
|
from ..models.runtime import Runtime
|
200
208
|
|
209
|
+
if not src_dict:
|
210
|
+
return None
|
201
211
|
d = src_dict.copy()
|
202
212
|
created_at = d.pop("created_at", UNSET)
|
203
213
|
|
@@ -236,7 +246,9 @@ class AgentDeployment:
|
|
236
246
|
|
237
247
|
flavors.append(componentsschemas_flavors_item)
|
238
248
|
|
239
|
-
functions = cast(
|
249
|
+
functions = cast(list[str], d.pop("functions", UNSET))
|
250
|
+
|
251
|
+
integration_connections = cast(list[str], d.pop("integration_connections", UNSET))
|
240
252
|
|
241
253
|
def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
|
242
254
|
if data is None:
|
@@ -255,7 +267,7 @@ class AgentDeployment:
|
|
255
267
|
|
256
268
|
labels = _parse_labels(d.pop("labels", UNSET))
|
257
269
|
|
258
|
-
|
270
|
+
model = d.pop("model", UNSET)
|
259
271
|
|
260
272
|
_pod_template = d.pop("pod_template", UNSET)
|
261
273
|
pod_template: Union[Unset, AgentDeploymentPodTemplate]
|
@@ -264,7 +276,7 @@ class AgentDeployment:
|
|
264
276
|
else:
|
265
277
|
pod_template = AgentDeploymentPodTemplate.from_dict(_pod_template)
|
266
278
|
|
267
|
-
policies = cast(
|
279
|
+
policies = cast(list[str], d.pop("policies", UNSET))
|
268
280
|
|
269
281
|
_runtime = d.pop("runtime", UNSET)
|
270
282
|
runtime: Union[Unset, Runtime]
|
@@ -297,8 +309,9 @@ class AgentDeployment:
|
|
297
309
|
environment=environment,
|
298
310
|
flavors=flavors,
|
299
311
|
functions=functions,
|
312
|
+
integration_connections=integration_connections,
|
300
313
|
labels=labels,
|
301
|
-
|
314
|
+
model=model,
|
302
315
|
pod_template=pod_template,
|
303
316
|
policies=policies,
|
304
317
|
runtime=runtime,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,9 @@ class AgentDeploymentConfiguration:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
23
25
|
d = src_dict.copy()
|
24
26
|
agent_deployment_configuration = cls()
|
25
27
|
|
@@ -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="AgentDeploymentConfigurationType0")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class AgentDeploymentConfigurationType0:
|
11
|
+
"""Agent configuration, this is a key value storage. In your agent 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
|
+
agent_deployment_configuration_type_0 = cls()
|
25
|
+
|
26
|
+
agent_deployment_configuration_type_0.additional_properties = d
|
27
|
+
return agent_deployment_configuration_type_0
|
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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -24,7 +24,7 @@ class AgentDeploymentHistory:
|
|
24
24
|
agent (Union[Unset, str]): Agent name
|
25
25
|
end (Union[Unset, str]): End time
|
26
26
|
environment (Union[Unset, str]): Environment name
|
27
|
-
events (Union[Unset,
|
27
|
+
events (Union[Unset, list['AgentDeploymentHistoryEvent']]): Events
|
28
28
|
request_id (Union[Unset, str]): Request ID
|
29
29
|
start (Union[Unset, str]): Start time
|
30
30
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
@@ -39,7 +39,7 @@ class AgentDeploymentHistory:
|
|
39
39
|
agent: Union[Unset, str] = UNSET
|
40
40
|
end: Union[Unset, str] = UNSET
|
41
41
|
environment: Union[Unset, str] = UNSET
|
42
|
-
events: Union[Unset,
|
42
|
+
events: Union[Unset, list["AgentDeploymentHistoryEvent"]] = UNSET
|
43
43
|
request_id: Union[Unset, str] = UNSET
|
44
44
|
start: Union[Unset, str] = UNSET
|
45
45
|
status: Union[Unset, str] = UNSET
|
@@ -62,7 +62,7 @@ class AgentDeploymentHistory:
|
|
62
62
|
|
63
63
|
environment = self.environment
|
64
64
|
|
65
|
-
events: Union[Unset,
|
65
|
+
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
66
66
|
if not isinstance(self.events, Unset):
|
67
67
|
events = []
|
68
68
|
for events_item_data in self.events:
|
@@ -112,9 +112,11 @@ class AgentDeploymentHistory:
|
|
112
112
|
return field_dict
|
113
113
|
|
114
114
|
@classmethod
|
115
|
-
def from_dict(cls:
|
115
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
116
116
|
from ..models.agent_deployment_history_event import AgentDeploymentHistoryEvent
|
117
117
|
|
118
|
+
if not src_dict:
|
119
|
+
return None
|
118
120
|
d = src_dict.copy()
|
119
121
|
created_at = d.pop("created_at", UNSET)
|
120
122
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -21,7 +21,7 @@ class AgentDeploymentHistoryEvent:
|
|
21
21
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
22
22
|
sub_function (Union[Unset, str]): Function used in kit if a kit was used
|
23
23
|
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
24
|
-
|
24
|
+
type_ (Union[Unset, str]): Type, one of function or agent
|
25
25
|
"""
|
26
26
|
|
27
27
|
end: Union[Unset, str] = UNSET
|
@@ -32,7 +32,7 @@ class AgentDeploymentHistoryEvent:
|
|
32
32
|
status: Union[Unset, str] = UNSET
|
33
33
|
sub_function: Union[Unset, str] = UNSET
|
34
34
|
took: Union[Unset, int] = UNSET
|
35
|
-
|
35
|
+
type_: Union[Unset, str] = UNSET
|
36
36
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
37
|
|
38
38
|
def to_dict(self) -> dict[str, Any]:
|
@@ -52,7 +52,7 @@ class AgentDeploymentHistoryEvent:
|
|
52
52
|
|
53
53
|
took = self.took
|
54
54
|
|
55
|
-
|
55
|
+
type_ = self.type_
|
56
56
|
|
57
57
|
field_dict: dict[str, Any] = {}
|
58
58
|
field_dict.update(self.additional_properties)
|
@@ -73,13 +73,15 @@ class AgentDeploymentHistoryEvent:
|
|
73
73
|
field_dict["sub_function"] = sub_function
|
74
74
|
if took is not UNSET:
|
75
75
|
field_dict["took"] = took
|
76
|
-
if
|
77
|
-
field_dict["type"] =
|
76
|
+
if type_ is not UNSET:
|
77
|
+
field_dict["type"] = type_
|
78
78
|
|
79
79
|
return field_dict
|
80
80
|
|
81
81
|
@classmethod
|
82
|
-
def from_dict(cls:
|
82
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
83
|
+
if not src_dict:
|
84
|
+
return None
|
83
85
|
d = src_dict.copy()
|
84
86
|
end = d.pop("end", UNSET)
|
85
87
|
|
@@ -97,7 +99,7 @@ class AgentDeploymentHistoryEvent:
|
|
97
99
|
|
98
100
|
took = d.pop("took", UNSET)
|
99
101
|
|
100
|
-
|
102
|
+
type_ = d.pop("type", UNSET)
|
101
103
|
|
102
104
|
agent_deployment_history_event = cls(
|
103
105
|
end=end,
|
@@ -108,7 +110,7 @@ class AgentDeploymentHistoryEvent:
|
|
108
110
|
status=status,
|
109
111
|
sub_function=sub_function,
|
110
112
|
took=took,
|
111
|
-
|
113
|
+
type_=type_,
|
112
114
|
)
|
113
115
|
|
114
116
|
agent_deployment_history_event.additional_properties = d
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,9 @@ class AgentDeploymentPodTemplate:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
23
25
|
d = src_dict.copy()
|
24
26
|
agent_deployment_pod_template = cls()
|
25
27
|
|
@@ -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="AgentDeploymentPodTemplateType0")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class AgentDeploymentPodTemplateType0:
|
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
|
+
agent_deployment_pod_template_type_0 = cls()
|
25
|
+
|
26
|
+
agent_deployment_pod_template_type_0.additional_properties = d
|
27
|
+
return agent_deployment_pod_template_type_0
|
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,165 @@
|
|
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.agent_history_event import AgentHistoryEvent
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="AgentHistory")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class AgentHistory:
|
17
|
+
"""Agent deployment history
|
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
|
+
agent (Union[Unset, str]): Agent name
|
23
|
+
end (Union[Unset, str]): End time
|
24
|
+
environment (Union[Unset, str]): Environment name
|
25
|
+
events (Union[Unset, List['AgentHistoryEvent']]): Events
|
26
|
+
request_id (Union[Unset, str]): Request ID
|
27
|
+
start (Union[Unset, str]): Start time
|
28
|
+
status (Union[Unset, str]): Status, eg: running, success, failed
|
29
|
+
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
30
|
+
workspace (Union[Unset, str]): The workspace the agent deployment belongs to
|
31
|
+
"""
|
32
|
+
|
33
|
+
created_at: Union[Unset, str] = UNSET
|
34
|
+
updated_at: Union[Unset, str] = UNSET
|
35
|
+
agent: Union[Unset, str] = UNSET
|
36
|
+
end: Union[Unset, str] = UNSET
|
37
|
+
environment: Union[Unset, str] = UNSET
|
38
|
+
events: Union[Unset, List["AgentHistoryEvent"]] = UNSET
|
39
|
+
request_id: Union[Unset, str] = UNSET
|
40
|
+
start: Union[Unset, str] = UNSET
|
41
|
+
status: Union[Unset, str] = UNSET
|
42
|
+
took: Union[Unset, int] = UNSET
|
43
|
+
workspace: Union[Unset, str] = UNSET
|
44
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
45
|
+
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
47
|
+
created_at = self.created_at
|
48
|
+
|
49
|
+
updated_at = self.updated_at
|
50
|
+
|
51
|
+
agent = self.agent
|
52
|
+
|
53
|
+
end = self.end
|
54
|
+
|
55
|
+
environment = self.environment
|
56
|
+
|
57
|
+
events: Union[Unset, List[Dict[str, Any]]] = UNSET
|
58
|
+
if not isinstance(self.events, Unset):
|
59
|
+
events = []
|
60
|
+
for events_item_data in self.events:
|
61
|
+
events_item = events_item_data.to_dict()
|
62
|
+
events.append(events_item)
|
63
|
+
|
64
|
+
request_id = self.request_id
|
65
|
+
|
66
|
+
start = self.start
|
67
|
+
|
68
|
+
status = self.status
|
69
|
+
|
70
|
+
took = self.took
|
71
|
+
|
72
|
+
workspace = self.workspace
|
73
|
+
|
74
|
+
field_dict: dict[str, Any] = {}
|
75
|
+
field_dict.update(self.additional_properties)
|
76
|
+
field_dict.update({})
|
77
|
+
if created_at is not UNSET:
|
78
|
+
field_dict["createdAt"] = created_at
|
79
|
+
if updated_at is not UNSET:
|
80
|
+
field_dict["updatedAt"] = updated_at
|
81
|
+
if agent is not UNSET:
|
82
|
+
field_dict["agent"] = agent
|
83
|
+
if end is not UNSET:
|
84
|
+
field_dict["end"] = end
|
85
|
+
if environment is not UNSET:
|
86
|
+
field_dict["environment"] = environment
|
87
|
+
if events is not UNSET:
|
88
|
+
field_dict["events"] = events
|
89
|
+
if request_id is not UNSET:
|
90
|
+
field_dict["request_id"] = request_id
|
91
|
+
if start is not UNSET:
|
92
|
+
field_dict["start"] = start
|
93
|
+
if status is not UNSET:
|
94
|
+
field_dict["status"] = status
|
95
|
+
if took is not UNSET:
|
96
|
+
field_dict["took"] = took
|
97
|
+
if workspace is not UNSET:
|
98
|
+
field_dict["workspace"] = workspace
|
99
|
+
|
100
|
+
return field_dict
|
101
|
+
|
102
|
+
@classmethod
|
103
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
104
|
+
from ..models.agent_history_event import AgentHistoryEvent
|
105
|
+
|
106
|
+
d = src_dict.copy()
|
107
|
+
created_at = d.pop("createdAt", UNSET)
|
108
|
+
|
109
|
+
updated_at = d.pop("updatedAt", UNSET)
|
110
|
+
|
111
|
+
agent = d.pop("agent", UNSET)
|
112
|
+
|
113
|
+
end = d.pop("end", UNSET)
|
114
|
+
|
115
|
+
environment = d.pop("environment", UNSET)
|
116
|
+
|
117
|
+
events = []
|
118
|
+
_events = d.pop("events", UNSET)
|
119
|
+
for events_item_data in _events or []:
|
120
|
+
events_item = AgentHistoryEvent.from_dict(events_item_data)
|
121
|
+
|
122
|
+
events.append(events_item)
|
123
|
+
|
124
|
+
request_id = d.pop("request_id", UNSET)
|
125
|
+
|
126
|
+
start = d.pop("start", UNSET)
|
127
|
+
|
128
|
+
status = d.pop("status", UNSET)
|
129
|
+
|
130
|
+
took = d.pop("took", UNSET)
|
131
|
+
|
132
|
+
workspace = d.pop("workspace", UNSET)
|
133
|
+
|
134
|
+
agent_history = cls(
|
135
|
+
created_at=created_at,
|
136
|
+
updated_at=updated_at,
|
137
|
+
agent=agent,
|
138
|
+
end=end,
|
139
|
+
environment=environment,
|
140
|
+
events=events,
|
141
|
+
request_id=request_id,
|
142
|
+
start=start,
|
143
|
+
status=status,
|
144
|
+
took=took,
|
145
|
+
workspace=workspace,
|
146
|
+
)
|
147
|
+
|
148
|
+
agent_history.additional_properties = d
|
149
|
+
return agent_history
|
150
|
+
|
151
|
+
@property
|
152
|
+
def additional_keys(self) -> list[str]:
|
153
|
+
return list(self.additional_properties.keys())
|
154
|
+
|
155
|
+
def __getitem__(self, key: str) -> Any:
|
156
|
+
return self.additional_properties[key]
|
157
|
+
|
158
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
159
|
+
self.additional_properties[key] = value
|
160
|
+
|
161
|
+
def __delitem__(self, key: str) -> None:
|
162
|
+
del self.additional_properties[key]
|
163
|
+
|
164
|
+
def __contains__(self, key: str) -> bool:
|
165
|
+
return key in self.additional_properties
|