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,115 @@
|
|
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.request_total_by_origin_metric_request_total_by_origin import (
|
10
|
+
RequestTotalByOriginMetricRequestTotalByOrigin,
|
11
|
+
)
|
12
|
+
from ..models.request_total_by_origin_metric_request_total_by_origin_and_code import (
|
13
|
+
RequestTotalByOriginMetricRequestTotalByOriginAndCode,
|
14
|
+
)
|
15
|
+
|
16
|
+
|
17
|
+
T = TypeVar("T", bound="RequestTotalByOriginMetric")
|
18
|
+
|
19
|
+
|
20
|
+
@_attrs_define
|
21
|
+
class RequestTotalByOriginMetric:
|
22
|
+
"""Request total by origin metric
|
23
|
+
|
24
|
+
Attributes:
|
25
|
+
request_total_by_origin (Union[Unset, RequestTotalByOriginMetricRequestTotalByOrigin]): Request total by origin
|
26
|
+
request_total_by_origin_and_code (Union[Unset, RequestTotalByOriginMetricRequestTotalByOriginAndCode]): Request
|
27
|
+
total by origin and code
|
28
|
+
"""
|
29
|
+
|
30
|
+
request_total_by_origin: Union[Unset, "RequestTotalByOriginMetricRequestTotalByOrigin"] = UNSET
|
31
|
+
request_total_by_origin_and_code: Union[Unset, "RequestTotalByOriginMetricRequestTotalByOriginAndCode"] = UNSET
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
33
|
+
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
35
|
+
request_total_by_origin: Union[Unset, dict[str, Any]] = UNSET
|
36
|
+
if (
|
37
|
+
self.request_total_by_origin
|
38
|
+
and not isinstance(self.request_total_by_origin, Unset)
|
39
|
+
and not isinstance(self.request_total_by_origin, dict)
|
40
|
+
):
|
41
|
+
request_total_by_origin = self.request_total_by_origin.to_dict()
|
42
|
+
elif self.request_total_by_origin and isinstance(self.request_total_by_origin, dict):
|
43
|
+
request_total_by_origin = self.request_total_by_origin
|
44
|
+
|
45
|
+
request_total_by_origin_and_code: Union[Unset, dict[str, Any]] = UNSET
|
46
|
+
if (
|
47
|
+
self.request_total_by_origin_and_code
|
48
|
+
and not isinstance(self.request_total_by_origin_and_code, Unset)
|
49
|
+
and not isinstance(self.request_total_by_origin_and_code, dict)
|
50
|
+
):
|
51
|
+
request_total_by_origin_and_code = self.request_total_by_origin_and_code.to_dict()
|
52
|
+
elif self.request_total_by_origin_and_code and isinstance(self.request_total_by_origin_and_code, dict):
|
53
|
+
request_total_by_origin_and_code = self.request_total_by_origin_and_code
|
54
|
+
|
55
|
+
field_dict: dict[str, Any] = {}
|
56
|
+
field_dict.update(self.additional_properties)
|
57
|
+
field_dict.update({})
|
58
|
+
if request_total_by_origin is not UNSET:
|
59
|
+
field_dict["requestTotalByOrigin"] = request_total_by_origin
|
60
|
+
if request_total_by_origin_and_code is not UNSET:
|
61
|
+
field_dict["requestTotalByOriginAndCode"] = request_total_by_origin_and_code
|
62
|
+
|
63
|
+
return field_dict
|
64
|
+
|
65
|
+
@classmethod
|
66
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
67
|
+
from ..models.request_total_by_origin_metric_request_total_by_origin import (
|
68
|
+
RequestTotalByOriginMetricRequestTotalByOrigin,
|
69
|
+
)
|
70
|
+
from ..models.request_total_by_origin_metric_request_total_by_origin_and_code import (
|
71
|
+
RequestTotalByOriginMetricRequestTotalByOriginAndCode,
|
72
|
+
)
|
73
|
+
|
74
|
+
if not src_dict:
|
75
|
+
return None
|
76
|
+
d = src_dict.copy()
|
77
|
+
_request_total_by_origin = d.pop("requestTotalByOrigin", UNSET)
|
78
|
+
request_total_by_origin: Union[Unset, RequestTotalByOriginMetricRequestTotalByOrigin]
|
79
|
+
if isinstance(_request_total_by_origin, Unset):
|
80
|
+
request_total_by_origin = UNSET
|
81
|
+
else:
|
82
|
+
request_total_by_origin = RequestTotalByOriginMetricRequestTotalByOrigin.from_dict(_request_total_by_origin)
|
83
|
+
|
84
|
+
_request_total_by_origin_and_code = d.pop("requestTotalByOriginAndCode", UNSET)
|
85
|
+
request_total_by_origin_and_code: Union[Unset, RequestTotalByOriginMetricRequestTotalByOriginAndCode]
|
86
|
+
if isinstance(_request_total_by_origin_and_code, Unset):
|
87
|
+
request_total_by_origin_and_code = UNSET
|
88
|
+
else:
|
89
|
+
request_total_by_origin_and_code = RequestTotalByOriginMetricRequestTotalByOriginAndCode.from_dict(
|
90
|
+
_request_total_by_origin_and_code
|
91
|
+
)
|
92
|
+
|
93
|
+
request_total_by_origin_metric = cls(
|
94
|
+
request_total_by_origin=request_total_by_origin,
|
95
|
+
request_total_by_origin_and_code=request_total_by_origin_and_code,
|
96
|
+
)
|
97
|
+
|
98
|
+
request_total_by_origin_metric.additional_properties = d
|
99
|
+
return request_total_by_origin_metric
|
100
|
+
|
101
|
+
@property
|
102
|
+
def additional_keys(self) -> list[str]:
|
103
|
+
return list(self.additional_properties.keys())
|
104
|
+
|
105
|
+
def __getitem__(self, key: str) -> Any:
|
106
|
+
return self.additional_properties[key]
|
107
|
+
|
108
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
109
|
+
self.additional_properties[key] = value
|
110
|
+
|
111
|
+
def __delitem__(self, key: str) -> None:
|
112
|
+
del self.additional_properties[key]
|
113
|
+
|
114
|
+
def __contains__(self, key: str) -> bool:
|
115
|
+
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="RequestTotalByOriginMetricRequestTotalByOrigin")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class RequestTotalByOriginMetricRequestTotalByOrigin:
|
11
|
+
"""Request total by origin"""
|
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
|
+
request_total_by_origin_metric_request_total_by_origin = cls()
|
27
|
+
|
28
|
+
request_total_by_origin_metric_request_total_by_origin.additional_properties = d
|
29
|
+
return request_total_by_origin_metric_request_total_by_origin
|
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="RequestTotalByOriginMetricRequestTotalByOriginAndCode")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class RequestTotalByOriginMetricRequestTotalByOriginAndCode:
|
11
|
+
"""Request total by origin and code"""
|
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
|
+
request_total_by_origin_metric_request_total_by_origin_and_code = cls()
|
27
|
+
|
28
|
+
request_total_by_origin_metric_request_total_by_origin_and_code.additional_properties = d
|
29
|
+
return request_total_by_origin_metric_request_total_by_origin_and_code
|
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,123 @@
|
|
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.request_total_metric_request_total_per_code import (
|
10
|
+
RequestTotalMetricRequestTotalPerCode,
|
11
|
+
)
|
12
|
+
from ..models.request_total_metric_rps_per_code import RequestTotalMetricRpsPerCode
|
13
|
+
|
14
|
+
|
15
|
+
T = TypeVar("T", bound="RequestTotalMetric")
|
16
|
+
|
17
|
+
|
18
|
+
@_attrs_define
|
19
|
+
class RequestTotalMetric:
|
20
|
+
"""Metrics for request total
|
21
|
+
|
22
|
+
Attributes:
|
23
|
+
request_total (Union[Unset, float]): Number of requests for all resources globally
|
24
|
+
request_total_per_code (Union[Unset, RequestTotalMetricRequestTotalPerCode]): Number of requests for all
|
25
|
+
resources globally per code
|
26
|
+
rps (Union[Unset, float]): Number of requests per second for all resources globally
|
27
|
+
rps_per_code (Union[Unset, RequestTotalMetricRpsPerCode]): Number of requests for all resources globally
|
28
|
+
"""
|
29
|
+
|
30
|
+
request_total: Union[Unset, float] = UNSET
|
31
|
+
request_total_per_code: Union[Unset, "RequestTotalMetricRequestTotalPerCode"] = UNSET
|
32
|
+
rps: Union[Unset, float] = UNSET
|
33
|
+
rps_per_code: Union[Unset, "RequestTotalMetricRpsPerCode"] = UNSET
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
35
|
+
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
37
|
+
request_total = self.request_total
|
38
|
+
|
39
|
+
request_total_per_code: Union[Unset, dict[str, Any]] = UNSET
|
40
|
+
if (
|
41
|
+
self.request_total_per_code
|
42
|
+
and not isinstance(self.request_total_per_code, Unset)
|
43
|
+
and not isinstance(self.request_total_per_code, dict)
|
44
|
+
):
|
45
|
+
request_total_per_code = self.request_total_per_code.to_dict()
|
46
|
+
elif self.request_total_per_code and isinstance(self.request_total_per_code, dict):
|
47
|
+
request_total_per_code = self.request_total_per_code
|
48
|
+
|
49
|
+
rps = self.rps
|
50
|
+
|
51
|
+
rps_per_code: Union[Unset, dict[str, Any]] = UNSET
|
52
|
+
if self.rps_per_code and not isinstance(self.rps_per_code, Unset) and not isinstance(self.rps_per_code, dict):
|
53
|
+
rps_per_code = self.rps_per_code.to_dict()
|
54
|
+
elif self.rps_per_code and isinstance(self.rps_per_code, dict):
|
55
|
+
rps_per_code = self.rps_per_code
|
56
|
+
|
57
|
+
field_dict: dict[str, Any] = {}
|
58
|
+
field_dict.update(self.additional_properties)
|
59
|
+
field_dict.update({})
|
60
|
+
if request_total is not UNSET:
|
61
|
+
field_dict["requestTotal"] = request_total
|
62
|
+
if request_total_per_code is not UNSET:
|
63
|
+
field_dict["requestTotalPerCode"] = request_total_per_code
|
64
|
+
if rps is not UNSET:
|
65
|
+
field_dict["rps"] = rps
|
66
|
+
if rps_per_code is not UNSET:
|
67
|
+
field_dict["rpsPerCode"] = rps_per_code
|
68
|
+
|
69
|
+
return field_dict
|
70
|
+
|
71
|
+
@classmethod
|
72
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
73
|
+
from ..models.request_total_metric_request_total_per_code import (
|
74
|
+
RequestTotalMetricRequestTotalPerCode,
|
75
|
+
)
|
76
|
+
from ..models.request_total_metric_rps_per_code import RequestTotalMetricRpsPerCode
|
77
|
+
|
78
|
+
if not src_dict:
|
79
|
+
return None
|
80
|
+
d = src_dict.copy()
|
81
|
+
request_total = d.pop("requestTotal", UNSET)
|
82
|
+
|
83
|
+
_request_total_per_code = d.pop("requestTotalPerCode", UNSET)
|
84
|
+
request_total_per_code: Union[Unset, RequestTotalMetricRequestTotalPerCode]
|
85
|
+
if isinstance(_request_total_per_code, Unset):
|
86
|
+
request_total_per_code = UNSET
|
87
|
+
else:
|
88
|
+
request_total_per_code = RequestTotalMetricRequestTotalPerCode.from_dict(_request_total_per_code)
|
89
|
+
|
90
|
+
rps = d.pop("rps", UNSET)
|
91
|
+
|
92
|
+
_rps_per_code = d.pop("rpsPerCode", UNSET)
|
93
|
+
rps_per_code: Union[Unset, RequestTotalMetricRpsPerCode]
|
94
|
+
if isinstance(_rps_per_code, Unset):
|
95
|
+
rps_per_code = UNSET
|
96
|
+
else:
|
97
|
+
rps_per_code = RequestTotalMetricRpsPerCode.from_dict(_rps_per_code)
|
98
|
+
|
99
|
+
request_total_metric = cls(
|
100
|
+
request_total=request_total,
|
101
|
+
request_total_per_code=request_total_per_code,
|
102
|
+
rps=rps,
|
103
|
+
rps_per_code=rps_per_code,
|
104
|
+
)
|
105
|
+
|
106
|
+
request_total_metric.additional_properties = d
|
107
|
+
return request_total_metric
|
108
|
+
|
109
|
+
@property
|
110
|
+
def additional_keys(self) -> list[str]:
|
111
|
+
return list(self.additional_properties.keys())
|
112
|
+
|
113
|
+
def __getitem__(self, key: str) -> Any:
|
114
|
+
return self.additional_properties[key]
|
115
|
+
|
116
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
117
|
+
self.additional_properties[key] = value
|
118
|
+
|
119
|
+
def __delitem__(self, key: str) -> None:
|
120
|
+
del self.additional_properties[key]
|
121
|
+
|
122
|
+
def __contains__(self, key: str) -> bool:
|
123
|
+
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="RequestTotalMetricRequestTotalPerCode")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class RequestTotalMetricRequestTotalPerCode:
|
11
|
+
"""Number of requests for all resources globally per code"""
|
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
|
+
request_total_metric_request_total_per_code = cls()
|
27
|
+
|
28
|
+
request_total_metric_request_total_per_code.additional_properties = d
|
29
|
+
return request_total_metric_request_total_per_code
|
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="RequestTotalMetricRpsPerCode")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class RequestTotalMetricRpsPerCode:
|
11
|
+
"""Number of requests for all resources globally"""
|
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
|
+
request_total_metric_rps_per_code = cls()
|
27
|
+
|
28
|
+
request_total_metric_rps_per_code.additional_properties = d
|
29
|
+
return request_total_metric_rps_per_code
|
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,79 @@
|
|
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="ResourceLog")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class ResourceLog:
|
13
|
+
"""Log for a resource deployment (eg. model deployment, function deployment)
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
message (Union[Unset, str]): Content of the log
|
17
|
+
severity (Union[Unset, int]): Severity of the log
|
18
|
+
timestamp (Union[Unset, str]): The timestamp of the log
|
19
|
+
"""
|
20
|
+
|
21
|
+
message: Union[Unset, str] = UNSET
|
22
|
+
severity: Union[Unset, int] = UNSET
|
23
|
+
timestamp: Union[Unset, str] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
message = self.message
|
28
|
+
|
29
|
+
severity = self.severity
|
30
|
+
|
31
|
+
timestamp = self.timestamp
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if message is not UNSET:
|
37
|
+
field_dict["message"] = message
|
38
|
+
if severity is not UNSET:
|
39
|
+
field_dict["severity"] = severity
|
40
|
+
if timestamp is not UNSET:
|
41
|
+
field_dict["timestamp"] = timestamp
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
47
|
+
if not src_dict:
|
48
|
+
return None
|
49
|
+
d = src_dict.copy()
|
50
|
+
message = d.pop("message", UNSET)
|
51
|
+
|
52
|
+
severity = d.pop("severity", UNSET)
|
53
|
+
|
54
|
+
timestamp = d.pop("timestamp", UNSET)
|
55
|
+
|
56
|
+
resource_log = cls(
|
57
|
+
message=message,
|
58
|
+
severity=severity,
|
59
|
+
timestamp=timestamp,
|
60
|
+
)
|
61
|
+
|
62
|
+
resource_log.additional_properties = d
|
63
|
+
return resource_log
|
64
|
+
|
65
|
+
@property
|
66
|
+
def additional_keys(self) -> list[str]:
|
67
|
+
return list(self.additional_properties.keys())
|
68
|
+
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
70
|
+
return self.additional_properties[key]
|
71
|
+
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
+
self.additional_properties[key] = value
|
74
|
+
|
75
|
+
def __delitem__(self, key: str) -> None:
|
76
|
+
del self.additional_properties[key]
|
77
|
+
|
78
|
+
def __contains__(self, key: str) -> bool:
|
79
|
+
return key in self.additional_properties
|