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,122 @@
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="ServerlessConfig")
9
+
10
+
11
+ @_attrs_define
12
+ class ServerlessConfig:
13
+ """Configuration for the serverless model deployment
14
+
15
+ Attributes:
16
+ last_pod_retention_period (Union[Unset, str]): The last pod retention period
17
+ max_num_replicas (Union[Unset, int]): The maximum number of replicas
18
+ metric (Union[Unset, str]): Metric to scale on, can be "cpu" or "memory" or "rps" or "concurrency"
19
+ min_num_replicas (Union[Unset, int]): The minimum number of replicas
20
+ scale_down_delay (Union[Unset, str]): The scale down delay
21
+ scale_up_minimum (Union[Unset, int]): The scale up minimum
22
+ stable_window (Union[Unset, str]): The stable window
23
+ target (Union[Unset, str]): Target value for the metric
24
+ """
25
+
26
+ last_pod_retention_period: Union[Unset, str] = UNSET
27
+ max_num_replicas: Union[Unset, int] = UNSET
28
+ metric: Union[Unset, str] = UNSET
29
+ min_num_replicas: Union[Unset, int] = UNSET
30
+ scale_down_delay: Union[Unset, str] = UNSET
31
+ scale_up_minimum: Union[Unset, int] = UNSET
32
+ stable_window: Union[Unset, str] = UNSET
33
+ target: Union[Unset, str] = UNSET
34
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
+
36
+ def to_dict(self) -> dict[str, Any]:
37
+ last_pod_retention_period = self.last_pod_retention_period
38
+
39
+ max_num_replicas = self.max_num_replicas
40
+
41
+ metric = self.metric
42
+
43
+ min_num_replicas = self.min_num_replicas
44
+
45
+ scale_down_delay = self.scale_down_delay
46
+
47
+ scale_up_minimum = self.scale_up_minimum
48
+
49
+ stable_window = self.stable_window
50
+
51
+ target = self.target
52
+
53
+ field_dict: dict[str, Any] = {}
54
+ field_dict.update(self.additional_properties)
55
+ field_dict.update({})
56
+ if last_pod_retention_period is not UNSET:
57
+ field_dict["last_pod_retention_period"] = last_pod_retention_period
58
+ if max_num_replicas is not UNSET:
59
+ field_dict["max_num_replicas"] = max_num_replicas
60
+ if metric is not UNSET:
61
+ field_dict["metric"] = metric
62
+ if min_num_replicas is not UNSET:
63
+ field_dict["min_num_replicas"] = min_num_replicas
64
+ if scale_down_delay is not UNSET:
65
+ field_dict["scale_down_delay"] = scale_down_delay
66
+ if scale_up_minimum is not UNSET:
67
+ field_dict["scale_up_minimum"] = scale_up_minimum
68
+ if stable_window is not UNSET:
69
+ field_dict["stable_window"] = stable_window
70
+ if target is not UNSET:
71
+ field_dict["target"] = target
72
+
73
+ return field_dict
74
+
75
+ @classmethod
76
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
77
+ d = src_dict.copy()
78
+ last_pod_retention_period = d.pop("last_pod_retention_period", UNSET)
79
+
80
+ max_num_replicas = d.pop("max_num_replicas", UNSET)
81
+
82
+ metric = d.pop("metric", UNSET)
83
+
84
+ min_num_replicas = d.pop("min_num_replicas", UNSET)
85
+
86
+ scale_down_delay = d.pop("scale_down_delay", UNSET)
87
+
88
+ scale_up_minimum = d.pop("scale_up_minimum", UNSET)
89
+
90
+ stable_window = d.pop("stable_window", UNSET)
91
+
92
+ target = d.pop("target", UNSET)
93
+
94
+ serverless_config = cls(
95
+ last_pod_retention_period=last_pod_retention_period,
96
+ max_num_replicas=max_num_replicas,
97
+ metric=metric,
98
+ min_num_replicas=min_num_replicas,
99
+ scale_down_delay=scale_down_delay,
100
+ scale_up_minimum=scale_up_minimum,
101
+ stable_window=stable_window,
102
+ target=target,
103
+ )
104
+
105
+ serverless_config.additional_properties = d
106
+ return serverless_config
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,86 @@
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="StandardFieldsDynamoDb")
9
+
10
+
11
+ @_attrs_define
12
+ class StandardFieldsDynamoDb:
13
+ """Standard fields for Persistance
14
+
15
+ Attributes:
16
+ created_at (Union[Unset, str]): The date and time when the resource was created
17
+ created_by (Union[Unset, str]): The user or service account who created the resource
18
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
19
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
20
+ """
21
+
22
+ created_at: Union[Unset, str] = UNSET
23
+ created_by: Union[Unset, str] = UNSET
24
+ updated_at: Union[Unset, str] = UNSET
25
+ updated_by: Union[Unset, str] = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ created_at = self.created_at
30
+
31
+ created_by = self.created_by
32
+
33
+ updated_at = self.updated_at
34
+
35
+ updated_by = self.updated_by
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update({})
40
+ if created_at is not UNSET:
41
+ field_dict["created_at"] = created_at
42
+ if created_by is not UNSET:
43
+ field_dict["created_by"] = created_by
44
+ if updated_at is not UNSET:
45
+ field_dict["updated_at"] = updated_at
46
+ if updated_by is not UNSET:
47
+ field_dict["updated_by"] = updated_by
48
+
49
+ return field_dict
50
+
51
+ @classmethod
52
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
53
+ d = src_dict.copy()
54
+ created_at = d.pop("created_at", UNSET)
55
+
56
+ created_by = d.pop("created_by", UNSET)
57
+
58
+ updated_at = d.pop("updated_at", UNSET)
59
+
60
+ updated_by = d.pop("updated_by", UNSET)
61
+
62
+ standard_fields_dynamo_db = cls(
63
+ created_at=created_at,
64
+ created_by=created_by,
65
+ updated_at=updated_at,
66
+ updated_by=updated_by,
67
+ )
68
+
69
+ standard_fields_dynamo_db.additional_properties = d
70
+ return standard_fields_dynamo_db
71
+
72
+ @property
73
+ def additional_keys(self) -> list[str]:
74
+ return list(self.additional_properties.keys())
75
+
76
+ def __getitem__(self, key: str) -> Any:
77
+ return self.additional_properties[key]
78
+
79
+ def __setitem__(self, key: str, value: Any) -> None:
80
+ self.additional_properties[key] = value
81
+
82
+ def __delitem__(self, key: str) -> None:
83
+ del self.additional_properties[key]
84
+
85
+ def __contains__(self, key: str) -> bool:
86
+ 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.store_agent_labels import StoreAgentLabels
10
+ from ..models.store_configuration import StoreConfiguration
11
+
12
+
13
+ T = TypeVar("T", bound="StoreAgent")
14
+
15
+
16
+ @_attrs_define
17
+ class StoreAgent:
18
+ """Store agent
19
+
20
+ Attributes:
21
+ created_at (Union[Unset, str]): The date and time when the resource was created
22
+ created_by (Union[Unset, str]): The user or service account who created the resource
23
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
24
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
25
+ configuration (Union[Unset, List['StoreConfiguration']]): Store agent configuration
26
+ description (Union[Unset, str]): Store agent description
27
+ display_name (Union[Unset, str]): Store agent display name
28
+ image (Union[Unset, str]): Store agent image
29
+ labels (Union[Unset, StoreAgentLabels]): Store agent labels
30
+ name (Union[Unset, str]): Store agent name
31
+ """
32
+
33
+ created_at: Union[Unset, str] = UNSET
34
+ created_by: Union[Unset, str] = UNSET
35
+ updated_at: Union[Unset, str] = UNSET
36
+ updated_by: Union[Unset, str] = UNSET
37
+ configuration: Union[Unset, List["StoreConfiguration"]] = UNSET
38
+ description: Union[Unset, str] = UNSET
39
+ display_name: Union[Unset, str] = UNSET
40
+ image: Union[Unset, str] = UNSET
41
+ labels: Union[Unset, "StoreAgentLabels"] = UNSET
42
+ name: Union[Unset, str] = UNSET
43
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
+
45
+ def to_dict(self) -> dict[str, Any]:
46
+ created_at = self.created_at
47
+
48
+ created_by = self.created_by
49
+
50
+ updated_at = self.updated_at
51
+
52
+ updated_by = self.updated_by
53
+
54
+ configuration: Union[Unset, List[Dict[str, Any]]] = UNSET
55
+ if not isinstance(self.configuration, Unset):
56
+ configuration = []
57
+ for configuration_item_data in self.configuration:
58
+ configuration_item = configuration_item_data.to_dict()
59
+ configuration.append(configuration_item)
60
+
61
+ description = self.description
62
+
63
+ display_name = self.display_name
64
+
65
+ image = self.image
66
+
67
+ labels: Union[Unset, Dict[str, Any]] = UNSET
68
+ if not isinstance(self.labels, Unset):
69
+ labels = self.labels.to_dict()
70
+
71
+ name = self.name
72
+
73
+ field_dict: dict[str, Any] = {}
74
+ field_dict.update(self.additional_properties)
75
+ field_dict.update({})
76
+ if created_at is not UNSET:
77
+ field_dict["created_at"] = created_at
78
+ if created_by is not UNSET:
79
+ field_dict["created_by"] = created_by
80
+ if updated_at is not UNSET:
81
+ field_dict["updated_at"] = updated_at
82
+ if updated_by is not UNSET:
83
+ field_dict["updated_by"] = updated_by
84
+ if configuration is not UNSET:
85
+ field_dict["configuration"] = configuration
86
+ if description is not UNSET:
87
+ field_dict["description"] = description
88
+ if display_name is not UNSET:
89
+ field_dict["display_name"] = display_name
90
+ if image is not UNSET:
91
+ field_dict["image"] = image
92
+ if labels is not UNSET:
93
+ field_dict["labels"] = labels
94
+ if name is not UNSET:
95
+ field_dict["name"] = name
96
+
97
+ return field_dict
98
+
99
+ @classmethod
100
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
101
+ from ..models.store_agent_labels import StoreAgentLabels
102
+ from ..models.store_configuration import StoreConfiguration
103
+
104
+ d = src_dict.copy()
105
+ created_at = d.pop("created_at", UNSET)
106
+
107
+ created_by = d.pop("created_by", UNSET)
108
+
109
+ updated_at = d.pop("updated_at", UNSET)
110
+
111
+ updated_by = d.pop("updated_by", UNSET)
112
+
113
+ configuration = []
114
+ _configuration = d.pop("configuration", UNSET)
115
+ for configuration_item_data in _configuration or []:
116
+ configuration_item = StoreConfiguration.from_dict(configuration_item_data)
117
+
118
+ configuration.append(configuration_item)
119
+
120
+ description = d.pop("description", UNSET)
121
+
122
+ display_name = d.pop("display_name", UNSET)
123
+
124
+ image = d.pop("image", UNSET)
125
+
126
+ _labels = d.pop("labels", UNSET)
127
+ labels: Union[Unset, StoreAgentLabels]
128
+ if isinstance(_labels, Unset):
129
+ labels = UNSET
130
+ else:
131
+ labels = StoreAgentLabels.from_dict(_labels)
132
+
133
+ name = d.pop("name", UNSET)
134
+
135
+ store_agent = cls(
136
+ created_at=created_at,
137
+ created_by=created_by,
138
+ updated_at=updated_at,
139
+ updated_by=updated_by,
140
+ configuration=configuration,
141
+ description=description,
142
+ display_name=display_name,
143
+ image=image,
144
+ labels=labels,
145
+ name=name,
146
+ )
147
+
148
+ store_agent.additional_properties = d
149
+ return store_agent
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
@@ -0,0 +1,95 @@
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="StoreAgentConfiguration")
9
+
10
+
11
+ @_attrs_define
12
+ class StoreAgentConfiguration:
13
+ """Store agent configuration used to configure your agent directly from beamlit interface
14
+
15
+ Attributes:
16
+ description (Union[Unset, str]): Store function configuration description
17
+ if_ (Union[Unset, str]): Conditional rendering for the configuration, example: provider === 'openai'
18
+ name (Union[Unset, str]): Store function configuration name
19
+ required (Union[Unset, bool]): Store function configuration required
20
+ secret (Union[Unset, bool]): Store function configuration secret
21
+ """
22
+
23
+ description: Union[Unset, str] = UNSET
24
+ if_: Union[Unset, str] = UNSET
25
+ name: Union[Unset, str] = UNSET
26
+ required: Union[Unset, bool] = UNSET
27
+ secret: Union[Unset, bool] = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ description = self.description
32
+
33
+ if_ = self.if_
34
+
35
+ name = self.name
36
+
37
+ required = self.required
38
+
39
+ secret = self.secret
40
+
41
+ field_dict: dict[str, Any] = {}
42
+ field_dict.update(self.additional_properties)
43
+ field_dict.update({})
44
+ if description is not UNSET:
45
+ field_dict["description"] = description
46
+ if if_ is not UNSET:
47
+ field_dict["if"] = if_
48
+ if name is not UNSET:
49
+ field_dict["name"] = name
50
+ if required is not UNSET:
51
+ field_dict["required"] = required
52
+ if secret is not UNSET:
53
+ field_dict["secret"] = secret
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
59
+ d = src_dict.copy()
60
+ description = d.pop("description", UNSET)
61
+
62
+ if_ = d.pop("if", UNSET)
63
+
64
+ name = d.pop("name", UNSET)
65
+
66
+ required = d.pop("required", UNSET)
67
+
68
+ secret = d.pop("secret", UNSET)
69
+
70
+ store_agent_configuration = cls(
71
+ description=description,
72
+ if_=if_,
73
+ name=name,
74
+ required=required,
75
+ secret=secret,
76
+ )
77
+
78
+ store_agent_configuration.additional_properties = d
79
+ return store_agent_configuration
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,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="StoreAgentLabels")
7
+
8
+
9
+ @_attrs_define
10
+ class StoreAgentLabels:
11
+ """Store agent labels"""
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
+ store_agent_labels = cls()
25
+
26
+ store_agent_labels.additional_properties = d
27
+ return store_agent_labels
28
+
29
+ @property
30
+ def additional_keys(self) -> list[str]:
31
+ return list(self.additional_properties.keys())
32
+
33
+ def __getitem__(self, key: str) -> 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,149 @@
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.store_configuration_option import StoreConfigurationOption
10
+
11
+
12
+ T = TypeVar("T", bound="StoreConfiguration")
13
+
14
+
15
+ @_attrs_define
16
+ class StoreConfiguration:
17
+ """Store configuration for resources (eg: agent, function, etc)
18
+
19
+ Attributes:
20
+ available_models (Union[Unset, List[str]]): Available models for the configuration
21
+ description (Union[Unset, str]): Store configuration description
22
+ display_name (Union[Unset, str]): Store configuration display name
23
+ if_ (Union[Unset, str]): Conditional rendering for the configuration, example: provider === 'openai'
24
+ name (Union[Unset, str]): Store configuration name
25
+ options (Union[Unset, List['StoreConfigurationOption']]):
26
+ required (Union[Unset, bool]): Store configuration required
27
+ secret (Union[Unset, bool]): Store configuration secret
28
+ type (Union[Unset, str]): Store configuration type
29
+ """
30
+
31
+ available_models: Union[Unset, List[str]] = UNSET
32
+ description: Union[Unset, str] = UNSET
33
+ display_name: Union[Unset, str] = UNSET
34
+ if_: Union[Unset, str] = UNSET
35
+ name: Union[Unset, str] = UNSET
36
+ options: Union[Unset, List["StoreConfigurationOption"]] = UNSET
37
+ required: Union[Unset, bool] = UNSET
38
+ secret: Union[Unset, bool] = UNSET
39
+ type: 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
+ available_models: Union[Unset, List[str]] = UNSET
44
+ if not isinstance(self.available_models, Unset):
45
+ available_models = self.available_models
46
+
47
+ description = self.description
48
+
49
+ display_name = self.display_name
50
+
51
+ if_ = self.if_
52
+
53
+ name = self.name
54
+
55
+ options: Union[Unset, List[Dict[str, Any]]] = UNSET
56
+ if not isinstance(self.options, Unset):
57
+ options = []
58
+ for options_item_data in self.options:
59
+ options_item = options_item_data.to_dict()
60
+ options.append(options_item)
61
+
62
+ required = self.required
63
+
64
+ secret = self.secret
65
+
66
+ type = self.type
67
+
68
+ field_dict: dict[str, Any] = {}
69
+ field_dict.update(self.additional_properties)
70
+ field_dict.update({})
71
+ if available_models is not UNSET:
72
+ field_dict["available_models"] = available_models
73
+ if description is not UNSET:
74
+ field_dict["description"] = description
75
+ if display_name is not UNSET:
76
+ field_dict["display_name"] = display_name
77
+ if if_ is not UNSET:
78
+ field_dict["if"] = if_
79
+ if name is not UNSET:
80
+ field_dict["name"] = name
81
+ if options is not UNSET:
82
+ field_dict["options"] = options
83
+ if required is not UNSET:
84
+ field_dict["required"] = required
85
+ if secret is not UNSET:
86
+ field_dict["secret"] = secret
87
+ if type is not UNSET:
88
+ field_dict["type"] = type
89
+
90
+ return field_dict
91
+
92
+ @classmethod
93
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
94
+ from ..models.store_configuration_option import StoreConfigurationOption
95
+
96
+ d = src_dict.copy()
97
+ available_models = cast(List[str], d.pop("available_models", UNSET))
98
+
99
+ description = d.pop("description", UNSET)
100
+
101
+ display_name = d.pop("display_name", UNSET)
102
+
103
+ if_ = d.pop("if", UNSET)
104
+
105
+ name = d.pop("name", UNSET)
106
+
107
+ options = []
108
+ _options = d.pop("options", UNSET)
109
+ for options_item_data in _options or []:
110
+ options_item = StoreConfigurationOption.from_dict(options_item_data)
111
+
112
+ options.append(options_item)
113
+
114
+ required = d.pop("required", UNSET)
115
+
116
+ secret = d.pop("secret", UNSET)
117
+
118
+ type = d.pop("type", UNSET)
119
+
120
+ store_configuration = cls(
121
+ available_models=available_models,
122
+ description=description,
123
+ display_name=display_name,
124
+ if_=if_,
125
+ name=name,
126
+ options=options,
127
+ required=required,
128
+ secret=secret,
129
+ type=type,
130
+ )
131
+
132
+ store_configuration.additional_properties = d
133
+ return store_configuration
134
+
135
+ @property
136
+ def additional_keys(self) -> list[str]:
137
+ return list(self.additional_properties.keys())
138
+
139
+ def __getitem__(self, key: str) -> Any:
140
+ return self.additional_properties[key]
141
+
142
+ def __setitem__(self, key: str, value: Any) -> None:
143
+ self.additional_properties[key] = value
144
+
145
+ def __delitem__(self, key: str) -> None:
146
+ del self.additional_properties[key]
147
+
148
+ def __contains__(self, key: str) -> bool:
149
+ return key in self.additional_properties