blaxel 0.64.0__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.
- blaxel/__init__.py +8 -0
- blaxel/agents/__init__.py +5 -0
- blaxel/agents/chain.py +153 -0
- blaxel/agents/chat.py +286 -0
- blaxel/agents/decorator.py +208 -0
- blaxel/agents/thread.py +24 -0
- blaxel/agents/voice/openai.py +255 -0
- blaxel/agents/voice/utils.py +25 -0
- blaxel/api/__init__.py +1 -0
- blaxel/api/agents/__init__.py +0 -0
- blaxel/api/agents/create_agent.py +155 -0
- blaxel/api/agents/delete_agent.py +146 -0
- blaxel/api/agents/get_agent.py +146 -0
- blaxel/api/agents/get_agent_logs.py +151 -0
- blaxel/api/agents/get_agent_metrics.py +150 -0
- blaxel/api/agents/get_agent_trace_ids.py +201 -0
- blaxel/api/agents/list_agent_revisions.py +155 -0
- blaxel/api/agents/list_agents.py +127 -0
- blaxel/api/agents/update_agent.py +168 -0
- blaxel/api/configurations/__init__.py +0 -0
- blaxel/api/configurations/get_configuration.py +122 -0
- blaxel/api/default/__init__.py +0 -0
- blaxel/api/default/get_trace.py +150 -0
- blaxel/api/default/get_trace_ids.py +218 -0
- blaxel/api/default/get_trace_logs.py +186 -0
- blaxel/api/default/list_mcp_hub_definitions.py +127 -0
- blaxel/api/functions/__init__.py +0 -0
- blaxel/api/functions/create_function.py +155 -0
- blaxel/api/functions/delete_function.py +146 -0
- blaxel/api/functions/get_function.py +146 -0
- blaxel/api/functions/get_function_logs.py +151 -0
- blaxel/api/functions/get_function_metrics.py +150 -0
- blaxel/api/functions/get_function_trace_ids.py +201 -0
- blaxel/api/functions/list_function_revisions.py +158 -0
- blaxel/api/functions/list_functions.py +131 -0
- blaxel/api/functions/update_function.py +168 -0
- blaxel/api/integrations/__init__.py +0 -0
- blaxel/api/integrations/create_integration_connection.py +167 -0
- blaxel/api/integrations/delete_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration.py +97 -0
- blaxel/api/integrations/get_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration_connection_model.py +104 -0
- blaxel/api/integrations/get_integration_connection_model_endpoint_configurations.py +97 -0
- blaxel/api/integrations/list_integration_connection_models.py +97 -0
- blaxel/api/integrations/list_integration_connections.py +139 -0
- blaxel/api/integrations/update_integration_connection.py +180 -0
- blaxel/api/invitations/__init__.py +0 -0
- blaxel/api/invitations/list_all_pending_invitations.py +142 -0
- blaxel/api/knowledgebases/__init__.py +0 -0
- blaxel/api/knowledgebases/create_knowledgebase.py +163 -0
- blaxel/api/knowledgebases/delete_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/get_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/list_knowledgebase_revisions.py +158 -0
- blaxel/api/knowledgebases/list_knowledgebases.py +139 -0
- blaxel/api/knowledgebases/update_knowledgebase.py +176 -0
- blaxel/api/locations/__init__.py +0 -0
- blaxel/api/locations/list_locations.py +139 -0
- blaxel/api/metrics/__init__.py +0 -0
- blaxel/api/metrics/get_metrics.py +130 -0
- blaxel/api/models/__init__.py +0 -0
- blaxel/api/models/create_model.py +163 -0
- blaxel/api/models/delete_model.py +154 -0
- blaxel/api/models/get_model.py +154 -0
- blaxel/api/models/get_model_logs.py +155 -0
- blaxel/api/models/get_model_metrics.py +158 -0
- blaxel/api/models/get_model_trace_ids.py +201 -0
- blaxel/api/models/list_model_revisions.py +158 -0
- blaxel/api/models/list_models.py +135 -0
- blaxel/api/models/update_model.py +176 -0
- blaxel/api/policies/__init__.py +0 -0
- blaxel/api/policies/create_policy.py +167 -0
- blaxel/api/policies/delete_policy.py +154 -0
- blaxel/api/policies/get_policy.py +154 -0
- blaxel/api/policies/list_policies.py +139 -0
- blaxel/api/policies/update_policy.py +180 -0
- blaxel/api/privateclusters/__init__.py +0 -0
- blaxel/api/privateclusters/create_private_cluster.py +132 -0
- blaxel/api/privateclusters/delete_private_cluster.py +156 -0
- blaxel/api/privateclusters/get_private_cluster.py +159 -0
- blaxel/api/privateclusters/get_private_cluster_health.py +97 -0
- blaxel/api/privateclusters/list_private_clusters.py +140 -0
- blaxel/api/privateclusters/update_private_cluster.py +156 -0
- blaxel/api/privateclusters/update_private_cluster_health.py +97 -0
- blaxel/api/service_accounts/__init__.py +0 -0
- blaxel/api/service_accounts/create_api_key_for_service_account.py +177 -0
- blaxel/api/service_accounts/create_workspace_service_account.py +170 -0
- blaxel/api/service_accounts/delete_api_key_for_service_account.py +104 -0
- blaxel/api/service_accounts/delete_workspace_service_account.py +160 -0
- blaxel/api/service_accounts/get_workspace_service_accounts.py +141 -0
- blaxel/api/service_accounts/list_api_keys_for_service_account.py +163 -0
- blaxel/api/service_accounts/update_workspace_service_account.py +183 -0
- blaxel/api/store/__init__.py +0 -0
- blaxel/api/store/get_store_agent.py +146 -0
- blaxel/api/store/get_store_function.py +146 -0
- blaxel/api/store/list_store_agents.py +131 -0
- blaxel/api/store/list_store_functions.py +131 -0
- blaxel/api/workspaces/__init__.py +0 -0
- blaxel/api/workspaces/accept_workspace_invitation.py +161 -0
- blaxel/api/workspaces/create_worspace.py +163 -0
- blaxel/api/workspaces/decline_workspace_invitation.py +158 -0
- blaxel/api/workspaces/delete_workspace.py +154 -0
- blaxel/api/workspaces/get_workspace.py +154 -0
- blaxel/api/workspaces/invite_workspace_user.py +174 -0
- blaxel/api/workspaces/leave_workspace.py +161 -0
- blaxel/api/workspaces/list_workspace_users.py +139 -0
- blaxel/api/workspaces/list_workspaces.py +139 -0
- blaxel/api/workspaces/remove_workspace_user.py +101 -0
- blaxel/api/workspaces/update_workspace.py +176 -0
- blaxel/api/workspaces/update_workspace_user_role.py +187 -0
- blaxel/authentication/__init__.py +45 -0
- blaxel/authentication/apikey.py +50 -0
- blaxel/authentication/authentication.py +176 -0
- blaxel/authentication/clientcredentials.py +103 -0
- blaxel/authentication/credentials.py +295 -0
- blaxel/authentication/device_mode.py +197 -0
- blaxel/client.py +281 -0
- blaxel/common/__init__.py +17 -0
- blaxel/common/error.py +27 -0
- blaxel/common/instrumentation.py +317 -0
- blaxel/common/logger.py +60 -0
- blaxel/common/secrets.py +39 -0
- blaxel/common/settings.py +150 -0
- blaxel/common/slugify.py +18 -0
- blaxel/common/utils.py +34 -0
- blaxel/deploy/__init__.py +8 -0
- blaxel/deploy/deploy.py +316 -0
- blaxel/deploy/format.py +46 -0
- blaxel/deploy/parser.py +192 -0
- blaxel/errors.py +16 -0
- blaxel/functions/__init__.py +7 -0
- blaxel/functions/common.py +228 -0
- blaxel/functions/decorator.py +64 -0
- blaxel/functions/local/local.py +48 -0
- blaxel/functions/mcp/client.py +96 -0
- blaxel/functions/mcp/mcp.py +168 -0
- blaxel/functions/mcp/utils.py +56 -0
- blaxel/functions/remote/remote.py +183 -0
- blaxel/models/__init__.py +233 -0
- blaxel/models/acl.py +133 -0
- blaxel/models/agent.py +126 -0
- blaxel/models/agent_chain.py +88 -0
- blaxel/models/agent_spec.py +346 -0
- blaxel/models/api_key.py +142 -0
- blaxel/models/configuration.py +85 -0
- blaxel/models/continent.py +70 -0
- blaxel/models/core_event.py +97 -0
- blaxel/models/core_spec.py +249 -0
- blaxel/models/core_spec_configurations.py +77 -0
- blaxel/models/country.py +70 -0
- blaxel/models/create_api_key_for_service_account_body.py +69 -0
- blaxel/models/create_workspace_service_account_body.py +71 -0
- blaxel/models/create_workspace_service_account_response_200.py +105 -0
- blaxel/models/delete_workspace_service_account_response_200.py +96 -0
- blaxel/models/entrypoint.py +96 -0
- blaxel/models/entrypoint_env.py +45 -0
- blaxel/models/flavor.py +70 -0
- blaxel/models/form.py +120 -0
- blaxel/models/form_config.py +45 -0
- blaxel/models/form_oauthomitempty.py +45 -0
- blaxel/models/form_secrets.py +45 -0
- blaxel/models/function.py +126 -0
- blaxel/models/function_kit.py +97 -0
- blaxel/models/function_spec.py +310 -0
- blaxel/models/get_trace_ids_response_200.py +45 -0
- blaxel/models/get_trace_logs_response_200.py +45 -0
- blaxel/models/get_trace_response_200.py +45 -0
- blaxel/models/get_workspace_service_accounts_response_200_item.py +96 -0
- blaxel/models/histogram_bucket.py +79 -0
- blaxel/models/histogram_stats.py +88 -0
- blaxel/models/integration_connection.py +96 -0
- blaxel/models/integration_connection_spec.py +114 -0
- blaxel/models/integration_connection_spec_config.py +45 -0
- blaxel/models/integration_connection_spec_secret.py +45 -0
- blaxel/models/integration_model.py +162 -0
- blaxel/models/integration_repository.py +88 -0
- blaxel/models/invite_workspace_user_body.py +60 -0
- blaxel/models/knowledgebase.py +126 -0
- blaxel/models/knowledgebase_spec.py +163 -0
- blaxel/models/knowledgebase_spec_options.py +45 -0
- blaxel/models/last_n_requests_metric.py +79 -0
- blaxel/models/latency_metric.py +144 -0
- blaxel/models/location_response.py +113 -0
- blaxel/models/mcp_definition.py +188 -0
- blaxel/models/mcp_definition_entrypoint.py +45 -0
- blaxel/models/mcp_definition_form.py +45 -0
- blaxel/models/metadata.py +139 -0
- blaxel/models/metadata_labels.py +45 -0
- blaxel/models/metric.py +79 -0
- blaxel/models/metrics.py +169 -0
- blaxel/models/metrics_models.py +45 -0
- blaxel/models/metrics_request_total_per_code.py +45 -0
- blaxel/models/metrics_rps_per_code.py +45 -0
- blaxel/models/model.py +126 -0
- blaxel/models/model_private_cluster.py +79 -0
- blaxel/models/model_spec.py +249 -0
- blaxel/models/o_auth.py +72 -0
- blaxel/models/owner_fields.py +70 -0
- blaxel/models/pending_invitation.py +124 -0
- blaxel/models/pending_invitation_accept.py +85 -0
- blaxel/models/pending_invitation_render.py +147 -0
- blaxel/models/pending_invitation_render_invited_by.py +88 -0
- blaxel/models/pending_invitation_render_workspace.py +70 -0
- blaxel/models/pending_invitation_workspace_details.py +72 -0
- blaxel/models/pod_template_spec.py +45 -0
- blaxel/models/policy.py +96 -0
- blaxel/models/policy_location.py +70 -0
- blaxel/models/policy_max_tokens.py +106 -0
- blaxel/models/policy_spec.py +151 -0
- blaxel/models/private_cluster.py +183 -0
- blaxel/models/private_location.py +61 -0
- blaxel/models/repository.py +70 -0
- blaxel/models/request_duration_over_time_metric.py +97 -0
- blaxel/models/request_duration_over_time_metrics.py +80 -0
- blaxel/models/request_total_by_origin_metric.py +115 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin.py +45 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +45 -0
- blaxel/models/request_total_metric.py +123 -0
- blaxel/models/request_total_metric_request_total_per_code.py +45 -0
- blaxel/models/request_total_metric_rps_per_code.py +45 -0
- blaxel/models/resource_log.py +79 -0
- blaxel/models/resource_metrics.py +270 -0
- blaxel/models/resource_metrics_request_total_per_code.py +45 -0
- blaxel/models/resource_metrics_rps_per_code.py +45 -0
- blaxel/models/revision_configuration.py +97 -0
- blaxel/models/revision_metadata.py +124 -0
- blaxel/models/runtime.py +196 -0
- blaxel/models/runtime_startup_probe.py +45 -0
- blaxel/models/serverless_config.py +80 -0
- blaxel/models/spec_configuration.py +70 -0
- blaxel/models/store_agent.py +178 -0
- blaxel/models/store_agent_labels.py +45 -0
- blaxel/models/store_configuration.py +151 -0
- blaxel/models/store_configuration_option.py +79 -0
- blaxel/models/store_function.py +211 -0
- blaxel/models/store_function_kit.py +97 -0
- blaxel/models/store_function_labels.py +45 -0
- blaxel/models/store_function_parameter.py +88 -0
- blaxel/models/time_fields.py +70 -0
- blaxel/models/token_rate_metric.py +88 -0
- blaxel/models/token_rate_metrics.py +120 -0
- blaxel/models/token_total_metric.py +106 -0
- blaxel/models/trace_ids_response.py +45 -0
- blaxel/models/update_workspace_service_account_body.py +69 -0
- blaxel/models/update_workspace_service_account_response_200.py +96 -0
- blaxel/models/update_workspace_user_role_body.py +60 -0
- blaxel/models/websocket_channel.py +88 -0
- blaxel/models/workspace.py +148 -0
- blaxel/models/workspace_labels.py +45 -0
- blaxel/models/workspace_user.py +115 -0
- blaxel/py.typed +1 -0
- blaxel/run.py +108 -0
- blaxel/serve/app.py +131 -0
- blaxel/serve/middlewares/__init__.py +10 -0
- blaxel/serve/middlewares/accesslog.py +32 -0
- blaxel/serve/middlewares/processtime.py +28 -0
- blaxel/types.py +46 -0
- blaxel-0.64.0.dist-info/METADATA +96 -0
- blaxel-0.64.0.dist-info/RECORD +261 -0
- blaxel-0.64.0.dist-info/WHEEL +4 -0
- blaxel-0.64.0.dist-info/entry_points.txt +2 -0
- blaxel-0.64.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,88 @@
|
|
1
|
+
from typing import Any, 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="HistogramStats")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class HistogramStats:
|
13
|
+
"""Histogram stats
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
average (Union[Unset, float]): Average request duration
|
17
|
+
p50 (Union[Unset, float]): P50 request duration
|
18
|
+
p90 (Union[Unset, float]): P90 request duration
|
19
|
+
p99 (Union[Unset, float]): P99 request duration
|
20
|
+
"""
|
21
|
+
|
22
|
+
average: Union[Unset, float] = UNSET
|
23
|
+
p50: Union[Unset, float] = UNSET
|
24
|
+
p90: Union[Unset, float] = UNSET
|
25
|
+
p99: Union[Unset, float] = UNSET
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
27
|
+
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
29
|
+
average = self.average
|
30
|
+
|
31
|
+
p50 = self.p50
|
32
|
+
|
33
|
+
p90 = self.p90
|
34
|
+
|
35
|
+
p99 = self.p99
|
36
|
+
|
37
|
+
field_dict: dict[str, Any] = {}
|
38
|
+
field_dict.update(self.additional_properties)
|
39
|
+
field_dict.update({})
|
40
|
+
if average is not UNSET:
|
41
|
+
field_dict["average"] = average
|
42
|
+
if p50 is not UNSET:
|
43
|
+
field_dict["p50"] = p50
|
44
|
+
if p90 is not UNSET:
|
45
|
+
field_dict["p90"] = p90
|
46
|
+
if p99 is not UNSET:
|
47
|
+
field_dict["p99"] = p99
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
53
|
+
if not src_dict:
|
54
|
+
return None
|
55
|
+
d = src_dict.copy()
|
56
|
+
average = d.pop("average", UNSET)
|
57
|
+
|
58
|
+
p50 = d.pop("p50", UNSET)
|
59
|
+
|
60
|
+
p90 = d.pop("p90", UNSET)
|
61
|
+
|
62
|
+
p99 = d.pop("p99", UNSET)
|
63
|
+
|
64
|
+
histogram_stats = cls(
|
65
|
+
average=average,
|
66
|
+
p50=p50,
|
67
|
+
p90=p90,
|
68
|
+
p99=p99,
|
69
|
+
)
|
70
|
+
|
71
|
+
histogram_stats.additional_properties = d
|
72
|
+
return histogram_stats
|
73
|
+
|
74
|
+
@property
|
75
|
+
def additional_keys(self) -> list[str]:
|
76
|
+
return list(self.additional_properties.keys())
|
77
|
+
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
79
|
+
return self.additional_properties[key]
|
80
|
+
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
82
|
+
self.additional_properties[key] = value
|
83
|
+
|
84
|
+
def __delitem__(self, key: str) -> None:
|
85
|
+
del self.additional_properties[key]
|
86
|
+
|
87
|
+
def __contains__(self, key: str) -> bool:
|
88
|
+
return key in self.additional_properties
|
@@ -0,0 +1,96 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, 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.integration_connection_spec import IntegrationConnectionSpec
|
10
|
+
from ..models.metadata import Metadata
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="IntegrationConnection")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class IntegrationConnection:
|
18
|
+
"""Integration Connection
|
19
|
+
|
20
|
+
Attributes:
|
21
|
+
metadata (Union[Unset, Metadata]): Metadata
|
22
|
+
spec (Union[Unset, IntegrationConnectionSpec]): Integration connection specification
|
23
|
+
"""
|
24
|
+
|
25
|
+
metadata: Union[Unset, "Metadata"] = UNSET
|
26
|
+
spec: Union[Unset, "IntegrationConnectionSpec"] = UNSET
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
28
|
+
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
30
|
+
metadata: Union[Unset, dict[str, Any]] = UNSET
|
31
|
+
if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
|
32
|
+
metadata = self.metadata.to_dict()
|
33
|
+
elif self.metadata and isinstance(self.metadata, dict):
|
34
|
+
metadata = self.metadata
|
35
|
+
|
36
|
+
spec: Union[Unset, dict[str, Any]] = UNSET
|
37
|
+
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
38
|
+
spec = self.spec.to_dict()
|
39
|
+
elif self.spec and isinstance(self.spec, dict):
|
40
|
+
spec = self.spec
|
41
|
+
|
42
|
+
field_dict: dict[str, Any] = {}
|
43
|
+
field_dict.update(self.additional_properties)
|
44
|
+
field_dict.update({})
|
45
|
+
if metadata is not UNSET:
|
46
|
+
field_dict["metadata"] = metadata
|
47
|
+
if spec is not UNSET:
|
48
|
+
field_dict["spec"] = spec
|
49
|
+
|
50
|
+
return field_dict
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
54
|
+
from ..models.integration_connection_spec import IntegrationConnectionSpec
|
55
|
+
from ..models.metadata import Metadata
|
56
|
+
|
57
|
+
if not src_dict:
|
58
|
+
return None
|
59
|
+
d = src_dict.copy()
|
60
|
+
_metadata = d.pop("metadata", UNSET)
|
61
|
+
metadata: Union[Unset, Metadata]
|
62
|
+
if isinstance(_metadata, Unset):
|
63
|
+
metadata = UNSET
|
64
|
+
else:
|
65
|
+
metadata = Metadata.from_dict(_metadata)
|
66
|
+
|
67
|
+
_spec = d.pop("spec", UNSET)
|
68
|
+
spec: Union[Unset, IntegrationConnectionSpec]
|
69
|
+
if isinstance(_spec, Unset):
|
70
|
+
spec = UNSET
|
71
|
+
else:
|
72
|
+
spec = IntegrationConnectionSpec.from_dict(_spec)
|
73
|
+
|
74
|
+
integration_connection = cls(
|
75
|
+
metadata=metadata,
|
76
|
+
spec=spec,
|
77
|
+
)
|
78
|
+
|
79
|
+
integration_connection.additional_properties = d
|
80
|
+
return integration_connection
|
81
|
+
|
82
|
+
@property
|
83
|
+
def additional_keys(self) -> list[str]:
|
84
|
+
return list(self.additional_properties.keys())
|
85
|
+
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
87
|
+
return self.additional_properties[key]
|
88
|
+
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
90
|
+
self.additional_properties[key] = value
|
91
|
+
|
92
|
+
def __delitem__(self, key: str) -> None:
|
93
|
+
del self.additional_properties[key]
|
94
|
+
|
95
|
+
def __contains__(self, key: str) -> bool:
|
96
|
+
return key in self.additional_properties
|
@@ -0,0 +1,114 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, 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.integration_connection_spec_config import IntegrationConnectionSpecConfig
|
10
|
+
from ..models.integration_connection_spec_secret import IntegrationConnectionSpecSecret
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="IntegrationConnectionSpec")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class IntegrationConnectionSpec:
|
18
|
+
"""Integration connection specification
|
19
|
+
|
20
|
+
Attributes:
|
21
|
+
config (Union[Unset, IntegrationConnectionSpecConfig]): Additional configuration for the integration
|
22
|
+
integration (Union[Unset, str]): Integration type
|
23
|
+
sandbox (Union[Unset, bool]): Sandbox mode
|
24
|
+
secret (Union[Unset, IntegrationConnectionSpecSecret]): Integration secret
|
25
|
+
"""
|
26
|
+
|
27
|
+
config: Union[Unset, "IntegrationConnectionSpecConfig"] = UNSET
|
28
|
+
integration: Union[Unset, str] = UNSET
|
29
|
+
sandbox: Union[Unset, bool] = UNSET
|
30
|
+
secret: Union[Unset, "IntegrationConnectionSpecSecret"] = UNSET
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
32
|
+
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
34
|
+
config: Union[Unset, dict[str, Any]] = UNSET
|
35
|
+
if self.config and not isinstance(self.config, Unset) and not isinstance(self.config, dict):
|
36
|
+
config = self.config.to_dict()
|
37
|
+
elif self.config and isinstance(self.config, dict):
|
38
|
+
config = self.config
|
39
|
+
|
40
|
+
integration = self.integration
|
41
|
+
|
42
|
+
sandbox = self.sandbox
|
43
|
+
|
44
|
+
secret: Union[Unset, dict[str, Any]] = UNSET
|
45
|
+
if self.secret and not isinstance(self.secret, Unset) and not isinstance(self.secret, dict):
|
46
|
+
secret = self.secret.to_dict()
|
47
|
+
elif self.secret and isinstance(self.secret, dict):
|
48
|
+
secret = self.secret
|
49
|
+
|
50
|
+
field_dict: dict[str, Any] = {}
|
51
|
+
field_dict.update(self.additional_properties)
|
52
|
+
field_dict.update({})
|
53
|
+
if config is not UNSET:
|
54
|
+
field_dict["config"] = config
|
55
|
+
if integration is not UNSET:
|
56
|
+
field_dict["integration"] = integration
|
57
|
+
if sandbox is not UNSET:
|
58
|
+
field_dict["sandbox"] = sandbox
|
59
|
+
if secret is not UNSET:
|
60
|
+
field_dict["secret"] = secret
|
61
|
+
|
62
|
+
return field_dict
|
63
|
+
|
64
|
+
@classmethod
|
65
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
66
|
+
from ..models.integration_connection_spec_config import IntegrationConnectionSpecConfig
|
67
|
+
from ..models.integration_connection_spec_secret import IntegrationConnectionSpecSecret
|
68
|
+
|
69
|
+
if not src_dict:
|
70
|
+
return None
|
71
|
+
d = src_dict.copy()
|
72
|
+
_config = d.pop("config", UNSET)
|
73
|
+
config: Union[Unset, IntegrationConnectionSpecConfig]
|
74
|
+
if isinstance(_config, Unset):
|
75
|
+
config = UNSET
|
76
|
+
else:
|
77
|
+
config = IntegrationConnectionSpecConfig.from_dict(_config)
|
78
|
+
|
79
|
+
integration = d.pop("integration", UNSET)
|
80
|
+
|
81
|
+
sandbox = d.pop("sandbox", UNSET)
|
82
|
+
|
83
|
+
_secret = d.pop("secret", UNSET)
|
84
|
+
secret: Union[Unset, IntegrationConnectionSpecSecret]
|
85
|
+
if isinstance(_secret, Unset):
|
86
|
+
secret = UNSET
|
87
|
+
else:
|
88
|
+
secret = IntegrationConnectionSpecSecret.from_dict(_secret)
|
89
|
+
|
90
|
+
integration_connection_spec = cls(
|
91
|
+
config=config,
|
92
|
+
integration=integration,
|
93
|
+
sandbox=sandbox,
|
94
|
+
secret=secret,
|
95
|
+
)
|
96
|
+
|
97
|
+
integration_connection_spec.additional_properties = d
|
98
|
+
return integration_connection_spec
|
99
|
+
|
100
|
+
@property
|
101
|
+
def additional_keys(self) -> list[str]:
|
102
|
+
return list(self.additional_properties.keys())
|
103
|
+
|
104
|
+
def __getitem__(self, key: str) -> Any:
|
105
|
+
return self.additional_properties[key]
|
106
|
+
|
107
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
108
|
+
self.additional_properties[key] = value
|
109
|
+
|
110
|
+
def __delitem__(self, key: str) -> None:
|
111
|
+
del self.additional_properties[key]
|
112
|
+
|
113
|
+
def __contains__(self, key: str) -> bool:
|
114
|
+
return key in self.additional_properties
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="IntegrationConnectionSpecConfig")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class IntegrationConnectionSpecConfig:
|
11
|
+
"""Additional configuration for the integration"""
|
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
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
integration_connection_spec_config = cls()
|
27
|
+
|
28
|
+
integration_connection_spec_config.additional_properties = d
|
29
|
+
return integration_connection_spec_config
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="IntegrationConnectionSpecSecret")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class IntegrationConnectionSpecSecret:
|
11
|
+
"""Integration secret"""
|
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
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
integration_connection_spec_secret = cls()
|
27
|
+
|
28
|
+
integration_connection_spec_secret.additional_properties = d
|
29
|
+
return integration_connection_spec_secret
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -0,0 +1,162 @@
|
|
1
|
+
from typing import Any, 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
|
+
author (Union[Unset, str]): Provider model author
|
17
|
+
created_at (Union[Unset, str]): Provider model created at
|
18
|
+
downloads (Union[Unset, int]): Provider model downloads
|
19
|
+
endpoint (Union[Unset, str]): Model endpoint URL
|
20
|
+
id (Union[Unset, str]): Provider model ID
|
21
|
+
library_name (Union[Unset, str]): Provider model library name
|
22
|
+
likes (Union[Unset, int]): Provider model likes
|
23
|
+
model_private (Union[Unset, str]): Is the model private
|
24
|
+
name (Union[Unset, str]): Provider model name
|
25
|
+
pipeline_tag (Union[Unset, str]): Provider model pipeline tag
|
26
|
+
tags (Union[Unset, list[str]]): Provider model tags
|
27
|
+
trending_score (Union[Unset, int]): Provider model trending score
|
28
|
+
"""
|
29
|
+
|
30
|
+
author: Union[Unset, str] = UNSET
|
31
|
+
created_at: Union[Unset, str] = UNSET
|
32
|
+
downloads: Union[Unset, int] = UNSET
|
33
|
+
endpoint: Union[Unset, str] = UNSET
|
34
|
+
id: Union[Unset, str] = UNSET
|
35
|
+
library_name: Union[Unset, str] = UNSET
|
36
|
+
likes: Union[Unset, int] = UNSET
|
37
|
+
model_private: Union[Unset, str] = UNSET
|
38
|
+
name: Union[Unset, str] = UNSET
|
39
|
+
pipeline_tag: Union[Unset, str] = UNSET
|
40
|
+
tags: Union[Unset, list[str]] = UNSET
|
41
|
+
trending_score: Union[Unset, int] = UNSET
|
42
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
43
|
+
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
45
|
+
author = self.author
|
46
|
+
|
47
|
+
created_at = self.created_at
|
48
|
+
|
49
|
+
downloads = self.downloads
|
50
|
+
|
51
|
+
endpoint = self.endpoint
|
52
|
+
|
53
|
+
id = self.id
|
54
|
+
|
55
|
+
library_name = self.library_name
|
56
|
+
|
57
|
+
likes = self.likes
|
58
|
+
|
59
|
+
model_private = self.model_private
|
60
|
+
|
61
|
+
name = self.name
|
62
|
+
|
63
|
+
pipeline_tag = self.pipeline_tag
|
64
|
+
|
65
|
+
tags: Union[Unset, list[str]] = UNSET
|
66
|
+
if not isinstance(self.tags, Unset):
|
67
|
+
tags = self.tags
|
68
|
+
|
69
|
+
trending_score = self.trending_score
|
70
|
+
|
71
|
+
field_dict: dict[str, Any] = {}
|
72
|
+
field_dict.update(self.additional_properties)
|
73
|
+
field_dict.update({})
|
74
|
+
if author is not UNSET:
|
75
|
+
field_dict["author"] = author
|
76
|
+
if created_at is not UNSET:
|
77
|
+
field_dict["created_at"] = created_at
|
78
|
+
if downloads is not UNSET:
|
79
|
+
field_dict["downloads"] = downloads
|
80
|
+
if endpoint is not UNSET:
|
81
|
+
field_dict["endpoint"] = endpoint
|
82
|
+
if id is not UNSET:
|
83
|
+
field_dict["id"] = id
|
84
|
+
if library_name is not UNSET:
|
85
|
+
field_dict["library_name"] = library_name
|
86
|
+
if likes is not UNSET:
|
87
|
+
field_dict["likes"] = likes
|
88
|
+
if model_private is not UNSET:
|
89
|
+
field_dict["model_private"] = model_private
|
90
|
+
if name is not UNSET:
|
91
|
+
field_dict["name"] = name
|
92
|
+
if pipeline_tag is not UNSET:
|
93
|
+
field_dict["pipeline_tag"] = pipeline_tag
|
94
|
+
if tags is not UNSET:
|
95
|
+
field_dict["tags"] = tags
|
96
|
+
if trending_score is not UNSET:
|
97
|
+
field_dict["trending_score"] = trending_score
|
98
|
+
|
99
|
+
return field_dict
|
100
|
+
|
101
|
+
@classmethod
|
102
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
103
|
+
if not src_dict:
|
104
|
+
return None
|
105
|
+
d = src_dict.copy()
|
106
|
+
author = d.pop("author", UNSET)
|
107
|
+
|
108
|
+
created_at = d.pop("created_at", UNSET)
|
109
|
+
|
110
|
+
downloads = d.pop("downloads", UNSET)
|
111
|
+
|
112
|
+
endpoint = d.pop("endpoint", UNSET)
|
113
|
+
|
114
|
+
id = d.pop("id", UNSET)
|
115
|
+
|
116
|
+
library_name = d.pop("library_name", UNSET)
|
117
|
+
|
118
|
+
likes = d.pop("likes", UNSET)
|
119
|
+
|
120
|
+
model_private = d.pop("model_private", UNSET)
|
121
|
+
|
122
|
+
name = d.pop("name", UNSET)
|
123
|
+
|
124
|
+
pipeline_tag = d.pop("pipeline_tag", UNSET)
|
125
|
+
|
126
|
+
tags = cast(list[str], d.pop("tags", UNSET))
|
127
|
+
|
128
|
+
trending_score = d.pop("trending_score", UNSET)
|
129
|
+
|
130
|
+
integration_model = cls(
|
131
|
+
author=author,
|
132
|
+
created_at=created_at,
|
133
|
+
downloads=downloads,
|
134
|
+
endpoint=endpoint,
|
135
|
+
id=id,
|
136
|
+
library_name=library_name,
|
137
|
+
likes=likes,
|
138
|
+
model_private=model_private,
|
139
|
+
name=name,
|
140
|
+
pipeline_tag=pipeline_tag,
|
141
|
+
tags=tags,
|
142
|
+
trending_score=trending_score,
|
143
|
+
)
|
144
|
+
|
145
|
+
integration_model.additional_properties = d
|
146
|
+
return integration_model
|
147
|
+
|
148
|
+
@property
|
149
|
+
def additional_keys(self) -> list[str]:
|
150
|
+
return list(self.additional_properties.keys())
|
151
|
+
|
152
|
+
def __getitem__(self, key: str) -> Any:
|
153
|
+
return self.additional_properties[key]
|
154
|
+
|
155
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
156
|
+
self.additional_properties[key] = value
|
157
|
+
|
158
|
+
def __delitem__(self, key: str) -> None:
|
159
|
+
del self.additional_properties[key]
|
160
|
+
|
161
|
+
def __contains__(self, key: str) -> bool:
|
162
|
+
return key in self.additional_properties
|
@@ -0,0 +1,88 @@
|
|
1
|
+
from typing import Any, 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="IntegrationRepository")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class IntegrationRepository:
|
13
|
+
"""Integration repository
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
id (Union[Unset, str]): Repository ID
|
17
|
+
name (Union[Unset, str]): Repository name
|
18
|
+
organization (Union[Unset, str]): Repository owner
|
19
|
+
url (Union[Unset, str]): Repository URL
|
20
|
+
"""
|
21
|
+
|
22
|
+
id: Union[Unset, str] = UNSET
|
23
|
+
name: Union[Unset, str] = UNSET
|
24
|
+
organization: Union[Unset, str] = UNSET
|
25
|
+
url: 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
|
+
id = self.id
|
30
|
+
|
31
|
+
name = self.name
|
32
|
+
|
33
|
+
organization = self.organization
|
34
|
+
|
35
|
+
url = self.url
|
36
|
+
|
37
|
+
field_dict: dict[str, Any] = {}
|
38
|
+
field_dict.update(self.additional_properties)
|
39
|
+
field_dict.update({})
|
40
|
+
if id is not UNSET:
|
41
|
+
field_dict["id"] = id
|
42
|
+
if name is not UNSET:
|
43
|
+
field_dict["name"] = name
|
44
|
+
if organization is not UNSET:
|
45
|
+
field_dict["organization"] = organization
|
46
|
+
if url is not UNSET:
|
47
|
+
field_dict["url"] = url
|
48
|
+
|
49
|
+
return field_dict
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
53
|
+
if not src_dict:
|
54
|
+
return None
|
55
|
+
d = src_dict.copy()
|
56
|
+
id = d.pop("id", UNSET)
|
57
|
+
|
58
|
+
name = d.pop("name", UNSET)
|
59
|
+
|
60
|
+
organization = d.pop("organization", UNSET)
|
61
|
+
|
62
|
+
url = d.pop("url", UNSET)
|
63
|
+
|
64
|
+
integration_repository = cls(
|
65
|
+
id=id,
|
66
|
+
name=name,
|
67
|
+
organization=organization,
|
68
|
+
url=url,
|
69
|
+
)
|
70
|
+
|
71
|
+
integration_repository.additional_properties = d
|
72
|
+
return integration_repository
|
73
|
+
|
74
|
+
@property
|
75
|
+
def additional_keys(self) -> list[str]:
|
76
|
+
return list(self.additional_properties.keys())
|
77
|
+
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
79
|
+
return self.additional_properties[key]
|
80
|
+
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
82
|
+
self.additional_properties[key] = value
|
83
|
+
|
84
|
+
def __delitem__(self, key: str) -> None:
|
85
|
+
del self.additional_properties[key]
|
86
|
+
|
87
|
+
def __contains__(self, key: str) -> bool:
|
88
|
+
return key in self.additional_properties
|
@@ -0,0 +1,60 @@
|
|
1
|
+
from typing import Any, 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="InviteWorkspaceUserBody")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class InviteWorkspaceUserBody:
|
13
|
+
"""
|
14
|
+
Attributes:
|
15
|
+
email (Union[Unset, str]):
|
16
|
+
"""
|
17
|
+
|
18
|
+
email: Union[Unset, str] = UNSET
|
19
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
20
|
+
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
22
|
+
email = self.email
|
23
|
+
|
24
|
+
field_dict: dict[str, Any] = {}
|
25
|
+
field_dict.update(self.additional_properties)
|
26
|
+
field_dict.update({})
|
27
|
+
if email is not UNSET:
|
28
|
+
field_dict["email"] = email
|
29
|
+
|
30
|
+
return field_dict
|
31
|
+
|
32
|
+
@classmethod
|
33
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
34
|
+
if not src_dict:
|
35
|
+
return None
|
36
|
+
d = src_dict.copy()
|
37
|
+
email = d.pop("email", UNSET)
|
38
|
+
|
39
|
+
invite_workspace_user_body = cls(
|
40
|
+
email=email,
|
41
|
+
)
|
42
|
+
|
43
|
+
invite_workspace_user_body.additional_properties = d
|
44
|
+
return invite_workspace_user_body
|
45
|
+
|
46
|
+
@property
|
47
|
+
def additional_keys(self) -> list[str]:
|
48
|
+
return list(self.additional_properties.keys())
|
49
|
+
|
50
|
+
def __getitem__(self, key: str) -> Any:
|
51
|
+
return self.additional_properties[key]
|
52
|
+
|
53
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
54
|
+
self.additional_properties[key] = value
|
55
|
+
|
56
|
+
def __delitem__(self, key: str) -> None:
|
57
|
+
del self.additional_properties[key]
|
58
|
+
|
59
|
+
def __contains__(self, key: str) -> bool:
|
60
|
+
return key in self.additional_properties
|