beamlit 0.0.18__py3-none-any.whl → 0.0.20rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. beamlit/api/agents/create_agent.py +14 -9
  2. beamlit/api/agents/get_agent_deployment.py +22 -1
  3. beamlit/api/agents/update_agent.py +14 -9
  4. beamlit/api/functions/create_function.py +14 -9
  5. beamlit/api/functions/update_function.py +14 -9
  6. beamlit/api/{authentication_providers/list_organizations_for_authentication_provider.py → integrations/create_integration_connection.py} +45 -41
  7. beamlit/api/integrations/delete_integration_connection.py +158 -0
  8. beamlit/api/integrations/get_integration.py +97 -0
  9. beamlit/api/integrations/get_integration_connection.py +154 -0
  10. beamlit/api/integrations/get_integration_connection_model.py +97 -0
  11. beamlit/api/integrations/get_integration_model.py +97 -0
  12. beamlit/api/integrations/list_integration_connection_models.py +97 -0
  13. beamlit/api/{authentication_providers/list_models_for_authentication_provider.py → integrations/list_integration_connections.py} +24 -48
  14. beamlit/api/integrations/list_integration_models.py +97 -0
  15. beamlit/api/integrations/update_integration_connection.py +180 -0
  16. beamlit/authentication/__init__.py +2 -1
  17. beamlit/authentication/authentication.py +3 -0
  18. beamlit/authentication/clientcredentials.py +99 -0
  19. beamlit/authentication/credentials.py +7 -1
  20. beamlit/authentication/device_mode.py +0 -2
  21. beamlit/common/generate.py +166 -0
  22. beamlit/common/logger.py +30 -0
  23. beamlit/common/settings.py +112 -0
  24. beamlit/common/utils.py +13 -0
  25. beamlit/models/__init__.py +50 -24
  26. beamlit/models/agent_deployment.py +117 -49
  27. beamlit/models/{agent_deployment_configuration.py → agent_deployment_configuration_type_0.py} +5 -5
  28. beamlit/models/agent_deployment_history.py +46 -13
  29. beamlit/models/agent_deployment_history_event.py +78 -22
  30. beamlit/models/{function_deployment_pod_template.py → agent_deployment_pod_template_type_0.py} +5 -5
  31. beamlit/models/agent_with_deployments.py +174 -0
  32. beamlit/models/deployment_configurations.py +19 -6
  33. beamlit/models/deployment_serverless_config_type_0.py +218 -0
  34. beamlit/models/environment_metrics.py +19 -0
  35. beamlit/models/function_deployment.py +110 -42
  36. beamlit/models/{function_deployment_configuration.py → function_deployment_configuration_type_0.py} +5 -5
  37. beamlit/models/{agent_deployment_pod_template.py → function_deployment_pod_template_type_0.py} +5 -5
  38. beamlit/models/function_with_deployments.py +174 -0
  39. beamlit/models/increase_and_rate_metric.py +102 -0
  40. beamlit/models/integration.py +196 -0
  41. beamlit/models/integration_config.py +43 -0
  42. beamlit/models/integration_connection.py +196 -0
  43. beamlit/models/integration_connection_config.py +43 -0
  44. beamlit/models/integration_connection_secret.py +59 -0
  45. beamlit/models/integration_model.py +142 -0
  46. beamlit/models/integration_secret.py +59 -0
  47. beamlit/models/metrics.py +61 -20
  48. beamlit/models/model_deployment.py +96 -64
  49. beamlit/models/{model_deployment_pod_template.py → model_deployment_pod_template_type_0.py} +5 -5
  50. beamlit/models/policy.py +8 -34
  51. beamlit/models/provider_config.py +0 -9
  52. beamlit/models/resource_deployment_metrics.py +231 -36
  53. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +75 -0
  54. beamlit/models/{resource_deployment_metrics_inference_per_second_per_region.py → resource_deployment_metrics_inference_per_second_per_region_type_0.py} +5 -5
  55. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +73 -0
  56. beamlit/models/{resource_deployment_metrics_query_per_second_per_region_per_code.py → resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py} +5 -5
  57. beamlit/models/resource_metrics.py +36 -0
  58. beamlit/models/runtime.py +29 -12
  59. beamlit/models/{runtime_readiness_probe.py → runtime_readiness_probe_type_0.py} +5 -5
  60. beamlit/models/store_agent.py +29 -13
  61. beamlit/models/{store_agent_labels.py → store_agent_labels_type_0.py} +5 -5
  62. beamlit/models/store_configuration.py +15 -4
  63. beamlit/models/store_configuration_option.py +18 -5
  64. beamlit/models/store_function.py +29 -13
  65. beamlit/models/{store_function_labels.py → store_function_labels_type_0.py} +5 -5
  66. beamlit/run.py +49 -0
  67. {beamlit-0.0.18.dist-info → beamlit-0.0.20rc1.dist-info}/METADATA +5 -2
  68. {beamlit-0.0.18.dist-info → beamlit-0.0.20rc1.dist-info}/RECORD +70 -46
  69. beamlit/api/authentication_providers/get_model_with_repo_for_authentication_provider.py +0 -184
  70. beamlit/models/deployment_serverless_config.py +0 -129
  71. beamlit/models/labels.py +0 -43
  72. /beamlit/api/{authentication_providers → integrations}/__init__.py +0 -0
  73. {beamlit-0.0.18.dist-info → beamlit-0.0.20rc1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,196 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, 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.integration_config import IntegrationConfig
10
+ from ..models.integration_secret import IntegrationSecret
11
+ from ..models.labels_type_0 import LabelsType0
12
+
13
+
14
+ T = TypeVar("T", bound="Integration")
15
+
16
+
17
+ @_attrs_define
18
+ class Integration:
19
+ """Model provider
20
+
21
+ Attributes:
22
+ created_at (Union[Unset, str]): The date and time when the resource was created
23
+ created_by (Union[Unset, str]): The user or service account who created the resource
24
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
25
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
26
+ config (Union[Unset, IntegrationConfig]): Integration config
27
+ display_name (Union[Unset, str]): Integration display name
28
+ labels (Union['LabelsType0', None, Unset]): Labels
29
+ name (Union[Unset, str]): Integration name
30
+ secret (Union[Unset, IntegrationSecret]): Integration secret
31
+ type (Union[Unset, str]): Integration type
32
+ workspace (Union[Unset, str]): Workspace name
33
+ """
34
+
35
+ created_at: Union[Unset, str] = UNSET
36
+ created_by: Union[Unset, str] = UNSET
37
+ updated_at: Union[Unset, str] = UNSET
38
+ updated_by: Union[Unset, str] = UNSET
39
+ config: Union[Unset, "IntegrationConfig"] = UNSET
40
+ display_name: Union[Unset, str] = UNSET
41
+ labels: Union["LabelsType0", None, Unset] = UNSET
42
+ name: Union[Unset, str] = UNSET
43
+ secret: Union[Unset, "IntegrationSecret"] = UNSET
44
+ type: Union[Unset, str] = UNSET
45
+ workspace: Union[Unset, str] = UNSET
46
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
47
+
48
+ def to_dict(self) -> dict[str, Any]:
49
+ from ..models.labels_type_0 import LabelsType0
50
+
51
+ created_at = self.created_at
52
+
53
+ created_by = self.created_by
54
+
55
+ updated_at = self.updated_at
56
+
57
+ updated_by = self.updated_by
58
+
59
+ config: Union[Unset, Dict[str, Any]] = UNSET
60
+ if not isinstance(self.config, Unset):
61
+ config = self.config.to_dict()
62
+
63
+ display_name = self.display_name
64
+
65
+ labels: Union[Dict[str, Any], None, Unset]
66
+ if isinstance(self.labels, Unset):
67
+ labels = UNSET
68
+ elif isinstance(self.labels, LabelsType0):
69
+ labels = self.labels.to_dict()
70
+ else:
71
+ labels = self.labels
72
+
73
+ name = self.name
74
+
75
+ secret: Union[Unset, Dict[str, Any]] = UNSET
76
+ if not isinstance(self.secret, Unset):
77
+ secret = self.secret.to_dict()
78
+
79
+ type = self.type
80
+
81
+ workspace = self.workspace
82
+
83
+ field_dict: dict[str, Any] = {}
84
+ field_dict.update(self.additional_properties)
85
+ field_dict.update({})
86
+ if created_at is not UNSET:
87
+ field_dict["created_at"] = created_at
88
+ if created_by is not UNSET:
89
+ field_dict["created_by"] = created_by
90
+ if updated_at is not UNSET:
91
+ field_dict["updated_at"] = updated_at
92
+ if updated_by is not UNSET:
93
+ field_dict["updated_by"] = updated_by
94
+ if config is not UNSET:
95
+ field_dict["config"] = config
96
+ if display_name is not UNSET:
97
+ field_dict["display_name"] = display_name
98
+ if labels is not UNSET:
99
+ field_dict["labels"] = labels
100
+ if name is not UNSET:
101
+ field_dict["name"] = name
102
+ if secret is not UNSET:
103
+ field_dict["secret"] = secret
104
+ if type is not UNSET:
105
+ field_dict["type"] = type
106
+ if workspace is not UNSET:
107
+ field_dict["workspace"] = workspace
108
+
109
+ return field_dict
110
+
111
+ @classmethod
112
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
113
+ from ..models.integration_config import IntegrationConfig
114
+ from ..models.integration_secret import IntegrationSecret
115
+ from ..models.labels_type_0 import LabelsType0
116
+
117
+ d = src_dict.copy()
118
+ created_at = d.pop("created_at", UNSET)
119
+
120
+ created_by = d.pop("created_by", UNSET)
121
+
122
+ updated_at = d.pop("updated_at", UNSET)
123
+
124
+ updated_by = d.pop("updated_by", UNSET)
125
+
126
+ _config = d.pop("config", UNSET)
127
+ config: Union[Unset, IntegrationConfig]
128
+ if isinstance(_config, Unset):
129
+ config = UNSET
130
+ else:
131
+ config = IntegrationConfig.from_dict(_config)
132
+
133
+ display_name = d.pop("display_name", UNSET)
134
+
135
+ def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
136
+ if data is None:
137
+ return data
138
+ if isinstance(data, Unset):
139
+ return data
140
+ try:
141
+ if not isinstance(data, dict):
142
+ raise TypeError()
143
+ componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
144
+
145
+ return componentsschemas_labels_type_0
146
+ except: # noqa: E722
147
+ pass
148
+ return cast(Union["LabelsType0", None, Unset], data)
149
+
150
+ labels = _parse_labels(d.pop("labels", UNSET))
151
+
152
+ name = d.pop("name", UNSET)
153
+
154
+ _secret = d.pop("secret", UNSET)
155
+ secret: Union[Unset, IntegrationSecret]
156
+ if isinstance(_secret, Unset):
157
+ secret = UNSET
158
+ else:
159
+ secret = IntegrationSecret.from_dict(_secret)
160
+
161
+ type = d.pop("type", UNSET)
162
+
163
+ workspace = d.pop("workspace", UNSET)
164
+
165
+ integration = cls(
166
+ created_at=created_at,
167
+ created_by=created_by,
168
+ updated_at=updated_at,
169
+ updated_by=updated_by,
170
+ config=config,
171
+ display_name=display_name,
172
+ labels=labels,
173
+ name=name,
174
+ secret=secret,
175
+ type=type,
176
+ workspace=workspace,
177
+ )
178
+
179
+ integration.additional_properties = d
180
+ return integration
181
+
182
+ @property
183
+ def additional_keys(self) -> list[str]:
184
+ return list(self.additional_properties.keys())
185
+
186
+ def __getitem__(self, key: str) -> Any:
187
+ return self.additional_properties[key]
188
+
189
+ def __setitem__(self, key: str, value: Any) -> None:
190
+ self.additional_properties[key] = value
191
+
192
+ def __delitem__(self, key: str) -> None:
193
+ del self.additional_properties[key]
194
+
195
+ def __contains__(self, key: str) -> bool:
196
+ 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="IntegrationConfig")
7
+
8
+
9
+ @_attrs_define
10
+ class IntegrationConfig:
11
+ """Integration config"""
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
+ integration_config = cls()
25
+
26
+ integration_config.additional_properties = d
27
+ return integration_config
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,196 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, 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.integration_connection_config import IntegrationConnectionConfig
10
+ from ..models.integration_connection_secret import IntegrationConnectionSecret
11
+ from ..models.labels_type_0 import LabelsType0
12
+
13
+
14
+ T = TypeVar("T", bound="IntegrationConnection")
15
+
16
+
17
+ @_attrs_define
18
+ class IntegrationConnection:
19
+ """Integration Connection
20
+
21
+ Attributes:
22
+ created_at (Union[Unset, str]): The date and time when the resource was created
23
+ created_by (Union[Unset, str]): The user or service account who created the resource
24
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
25
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
26
+ config (Union[Unset, IntegrationConnectionConfig]): Integration config
27
+ display_name (Union[Unset, str]): Integration connection display name
28
+ integration (Union[Unset, str]): Integration type
29
+ labels (Union['LabelsType0', None, Unset]): Labels
30
+ name (Union[Unset, str]): Integration connection name
31
+ secret (Union[Unset, IntegrationConnectionSecret]): Integration secret
32
+ workspace (Union[Unset, str]): Workspace name
33
+ """
34
+
35
+ created_at: Union[Unset, str] = UNSET
36
+ created_by: Union[Unset, str] = UNSET
37
+ updated_at: Union[Unset, str] = UNSET
38
+ updated_by: Union[Unset, str] = UNSET
39
+ config: Union[Unset, "IntegrationConnectionConfig"] = UNSET
40
+ display_name: Union[Unset, str] = UNSET
41
+ integration: Union[Unset, str] = UNSET
42
+ labels: Union["LabelsType0", None, Unset] = UNSET
43
+ name: Union[Unset, str] = UNSET
44
+ secret: Union[Unset, "IntegrationConnectionSecret"] = UNSET
45
+ workspace: Union[Unset, str] = UNSET
46
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
47
+
48
+ def to_dict(self) -> dict[str, Any]:
49
+ from ..models.labels_type_0 import LabelsType0
50
+
51
+ created_at = self.created_at
52
+
53
+ created_by = self.created_by
54
+
55
+ updated_at = self.updated_at
56
+
57
+ updated_by = self.updated_by
58
+
59
+ config: Union[Unset, Dict[str, Any]] = UNSET
60
+ if not isinstance(self.config, Unset):
61
+ config = self.config.to_dict()
62
+
63
+ display_name = self.display_name
64
+
65
+ integration = self.integration
66
+
67
+ labels: Union[Dict[str, Any], None, Unset]
68
+ if isinstance(self.labels, Unset):
69
+ labels = UNSET
70
+ elif isinstance(self.labels, LabelsType0):
71
+ labels = self.labels.to_dict()
72
+ else:
73
+ labels = self.labels
74
+
75
+ name = self.name
76
+
77
+ secret: Union[Unset, Dict[str, Any]] = UNSET
78
+ if not isinstance(self.secret, Unset):
79
+ secret = self.secret.to_dict()
80
+
81
+ workspace = self.workspace
82
+
83
+ field_dict: dict[str, Any] = {}
84
+ field_dict.update(self.additional_properties)
85
+ field_dict.update({})
86
+ if created_at is not UNSET:
87
+ field_dict["created_at"] = created_at
88
+ if created_by is not UNSET:
89
+ field_dict["created_by"] = created_by
90
+ if updated_at is not UNSET:
91
+ field_dict["updated_at"] = updated_at
92
+ if updated_by is not UNSET:
93
+ field_dict["updated_by"] = updated_by
94
+ if config is not UNSET:
95
+ field_dict["config"] = config
96
+ if display_name is not UNSET:
97
+ field_dict["display_name"] = display_name
98
+ if integration is not UNSET:
99
+ field_dict["integration"] = integration
100
+ if labels is not UNSET:
101
+ field_dict["labels"] = labels
102
+ if name is not UNSET:
103
+ field_dict["name"] = name
104
+ if secret is not UNSET:
105
+ field_dict["secret"] = secret
106
+ if workspace is not UNSET:
107
+ field_dict["workspace"] = workspace
108
+
109
+ return field_dict
110
+
111
+ @classmethod
112
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
113
+ from ..models.integration_connection_config import IntegrationConnectionConfig
114
+ from ..models.integration_connection_secret import IntegrationConnectionSecret
115
+ from ..models.labels_type_0 import LabelsType0
116
+
117
+ d = src_dict.copy()
118
+ created_at = d.pop("created_at", UNSET)
119
+
120
+ created_by = d.pop("created_by", UNSET)
121
+
122
+ updated_at = d.pop("updated_at", UNSET)
123
+
124
+ updated_by = d.pop("updated_by", UNSET)
125
+
126
+ _config = d.pop("config", UNSET)
127
+ config: Union[Unset, IntegrationConnectionConfig]
128
+ if isinstance(_config, Unset):
129
+ config = UNSET
130
+ else:
131
+ config = IntegrationConnectionConfig.from_dict(_config)
132
+
133
+ display_name = d.pop("display_name", UNSET)
134
+
135
+ integration = d.pop("integration", UNSET)
136
+
137
+ def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
138
+ if data is None:
139
+ return data
140
+ if isinstance(data, Unset):
141
+ return data
142
+ try:
143
+ if not isinstance(data, dict):
144
+ raise TypeError()
145
+ componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
146
+
147
+ return componentsschemas_labels_type_0
148
+ except: # noqa: E722
149
+ pass
150
+ return cast(Union["LabelsType0", None, Unset], data)
151
+
152
+ labels = _parse_labels(d.pop("labels", UNSET))
153
+
154
+ name = d.pop("name", UNSET)
155
+
156
+ _secret = d.pop("secret", UNSET)
157
+ secret: Union[Unset, IntegrationConnectionSecret]
158
+ if isinstance(_secret, Unset):
159
+ secret = UNSET
160
+ else:
161
+ secret = IntegrationConnectionSecret.from_dict(_secret)
162
+
163
+ workspace = d.pop("workspace", UNSET)
164
+
165
+ integration_connection = cls(
166
+ created_at=created_at,
167
+ created_by=created_by,
168
+ updated_at=updated_at,
169
+ updated_by=updated_by,
170
+ config=config,
171
+ display_name=display_name,
172
+ integration=integration,
173
+ labels=labels,
174
+ name=name,
175
+ secret=secret,
176
+ workspace=workspace,
177
+ )
178
+
179
+ integration_connection.additional_properties = d
180
+ return integration_connection
181
+
182
+ @property
183
+ def additional_keys(self) -> list[str]:
184
+ return list(self.additional_properties.keys())
185
+
186
+ def __getitem__(self, key: str) -> Any:
187
+ return self.additional_properties[key]
188
+
189
+ def __setitem__(self, key: str, value: Any) -> None:
190
+ self.additional_properties[key] = value
191
+
192
+ def __delitem__(self, key: str) -> None:
193
+ del self.additional_properties[key]
194
+
195
+ def __contains__(self, key: str) -> bool:
196
+ 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="IntegrationConnectionConfig")
7
+
8
+
9
+ @_attrs_define
10
+ class IntegrationConnectionConfig:
11
+ """Integration config"""
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
+ integration_connection_config = cls()
25
+
26
+ integration_connection_config.additional_properties = d
27
+ return integration_connection_config
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,59 @@
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="IntegrationConnectionSecret")
9
+
10
+
11
+ @_attrs_define
12
+ class IntegrationConnectionSecret:
13
+ """Integration secret
14
+
15
+ Attributes:
16
+ api_key (Union[Unset, str]): The API key to use for the integration
17
+ """
18
+
19
+ api_key: Union[Unset, str] = UNSET
20
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ api_key = self.api_key
24
+
25
+ field_dict: dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update({})
28
+ if api_key is not UNSET:
29
+ field_dict["api_key"] = api_key
30
+
31
+ return field_dict
32
+
33
+ @classmethod
34
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
35
+ d = src_dict.copy()
36
+ api_key = d.pop("api_key", UNSET)
37
+
38
+ integration_connection_secret = cls(
39
+ api_key=api_key,
40
+ )
41
+
42
+ integration_connection_secret.additional_properties = d
43
+ return integration_connection_secret
44
+
45
+ @property
46
+ def additional_keys(self) -> list[str]:
47
+ return list(self.additional_properties.keys())
48
+
49
+ def __getitem__(self, key: str) -> Any:
50
+ return self.additional_properties[key]
51
+
52
+ def __setitem__(self, key: str, value: Any) -> None:
53
+ self.additional_properties[key] = value
54
+
55
+ def __delitem__(self, key: str) -> None:
56
+ del self.additional_properties[key]
57
+
58
+ def __contains__(self, key: str) -> bool:
59
+ return key in self.additional_properties
@@ -0,0 +1,142 @@
1
+ from typing import Any, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="IntegrationModel")
9
+
10
+
11
+ @_attrs_define
12
+ class IntegrationModel:
13
+ """Model obtained from an external authentication provider, such as HuggingFace, OpenAI, etc...
14
+
15
+ Attributes:
16
+ created_at (Union[Unset, str]): Provider model created at
17
+ downloads (Union[Unset, int]): Provider model downloads
18
+ id (Union[Unset, str]): Provider model ID
19
+ library_name (Union[Unset, str]): Provider model library name
20
+ likes (Union[Unset, int]): Provider model likes
21
+ name (Union[Unset, str]): Provider model name
22
+ pipeline_tag (Union[Unset, str]): Provider model pipeline tag
23
+ private (Union[Unset, bool]): Provider model private
24
+ tags (Union[Unset, List[str]]): Provider model tags
25
+ trending_score (Union[Unset, int]): Provider model trending score
26
+ """
27
+
28
+ created_at: Union[Unset, str] = UNSET
29
+ downloads: Union[Unset, int] = UNSET
30
+ id: Union[Unset, str] = UNSET
31
+ library_name: Union[Unset, str] = UNSET
32
+ likes: Union[Unset, int] = UNSET
33
+ name: Union[Unset, str] = UNSET
34
+ pipeline_tag: Union[Unset, str] = UNSET
35
+ private: Union[Unset, bool] = UNSET
36
+ tags: Union[Unset, List[str]] = UNSET
37
+ trending_score: Union[Unset, int] = UNSET
38
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
+
40
+ def to_dict(self) -> dict[str, Any]:
41
+ created_at = self.created_at
42
+
43
+ downloads = self.downloads
44
+
45
+ id = self.id
46
+
47
+ library_name = self.library_name
48
+
49
+ likes = self.likes
50
+
51
+ name = self.name
52
+
53
+ pipeline_tag = self.pipeline_tag
54
+
55
+ private = self.private
56
+
57
+ tags: Union[Unset, List[str]] = UNSET
58
+ if not isinstance(self.tags, Unset):
59
+ tags = self.tags
60
+
61
+ trending_score = self.trending_score
62
+
63
+ field_dict: dict[str, Any] = {}
64
+ field_dict.update(self.additional_properties)
65
+ field_dict.update({})
66
+ if created_at is not UNSET:
67
+ field_dict["created_at"] = created_at
68
+ if downloads is not UNSET:
69
+ field_dict["downloads"] = downloads
70
+ if id is not UNSET:
71
+ field_dict["id"] = id
72
+ if library_name is not UNSET:
73
+ field_dict["library_name"] = library_name
74
+ if likes is not UNSET:
75
+ field_dict["likes"] = likes
76
+ if name is not UNSET:
77
+ field_dict["name"] = name
78
+ if pipeline_tag is not UNSET:
79
+ field_dict["pipeline_tag"] = pipeline_tag
80
+ if private is not UNSET:
81
+ field_dict["private"] = private
82
+ if tags is not UNSET:
83
+ field_dict["tags"] = tags
84
+ if trending_score is not UNSET:
85
+ field_dict["trending_score"] = trending_score
86
+
87
+ return field_dict
88
+
89
+ @classmethod
90
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
91
+ d = src_dict.copy()
92
+ created_at = d.pop("created_at", UNSET)
93
+
94
+ downloads = d.pop("downloads", UNSET)
95
+
96
+ id = d.pop("id", UNSET)
97
+
98
+ library_name = d.pop("library_name", UNSET)
99
+
100
+ likes = d.pop("likes", UNSET)
101
+
102
+ name = d.pop("name", UNSET)
103
+
104
+ pipeline_tag = d.pop("pipeline_tag", UNSET)
105
+
106
+ private = d.pop("private", UNSET)
107
+
108
+ tags = cast(List[str], d.pop("tags", UNSET))
109
+
110
+ trending_score = d.pop("trending_score", UNSET)
111
+
112
+ integration_model = cls(
113
+ created_at=created_at,
114
+ downloads=downloads,
115
+ id=id,
116
+ library_name=library_name,
117
+ likes=likes,
118
+ name=name,
119
+ pipeline_tag=pipeline_tag,
120
+ private=private,
121
+ tags=tags,
122
+ trending_score=trending_score,
123
+ )
124
+
125
+ integration_model.additional_properties = d
126
+ return integration_model
127
+
128
+ @property
129
+ def additional_keys(self) -> list[str]:
130
+ return list(self.additional_properties.keys())
131
+
132
+ def __getitem__(self, key: str) -> Any:
133
+ return self.additional_properties[key]
134
+
135
+ def __setitem__(self, key: str, value: Any) -> None:
136
+ self.additional_properties[key] = value
137
+
138
+ def __delitem__(self, key: str) -> None:
139
+ del self.additional_properties[key]
140
+
141
+ def __contains__(self, key: str) -> bool:
142
+ return key in self.additional_properties