blaxel 0.2.33__py3-none-any.whl → 0.2.35__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 (278) hide show
  1. blaxel/__init__.py +2 -2
  2. blaxel/core/__init__.py +2 -1
  3. blaxel/core/client/api/agents/create_agent.py +64 -19
  4. blaxel/core/client/api/agents/delete_agent.py +44 -15
  5. blaxel/core/client/api/agents/get_agent.py +43 -14
  6. blaxel/core/client/api/agents/list_agents.py +40 -11
  7. blaxel/core/client/api/agents/update_agent.py +60 -19
  8. blaxel/core/client/api/compute/create_sandbox.py +60 -23
  9. blaxel/core/client/api/compute/delete_sandbox.py +40 -19
  10. blaxel/core/client/api/compute/get_sandbox.py +39 -18
  11. blaxel/core/client/api/compute/list_sandboxes.py +40 -19
  12. blaxel/core/client/api/compute/update_sandbox.py +56 -23
  13. blaxel/core/client/api/configurations/get_configuration.py +16 -4
  14. blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
  15. blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
  16. blaxel/core/client/api/default/get_template.py +8 -4
  17. blaxel/core/client/api/functions/create_function.py +62 -19
  18. blaxel/core/client/api/functions/delete_function.py +46 -15
  19. blaxel/core/client/api/functions/get_function.py +45 -14
  20. blaxel/core/client/api/functions/list_functions.py +44 -15
  21. blaxel/core/client/api/functions/update_function.py +62 -19
  22. blaxel/core/client/api/images/cleanup_images.py +12 -12
  23. blaxel/core/client/api/images/delete_image.py +12 -8
  24. blaxel/core/client/api/images/delete_image_tag.py +12 -8
  25. blaxel/core/client/api/images/get_image.py +12 -8
  26. blaxel/core/client/api/images/list_images.py +12 -8
  27. blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
  28. blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
  29. blaxel/core/client/api/integrations/get_integration.py +12 -8
  30. blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
  31. blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
  32. blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
  33. blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
  34. blaxel/core/client/api/jobs/create_job.py +20 -12
  35. blaxel/core/client/api/jobs/create_job_execution.py +22 -16
  36. blaxel/core/client/api/jobs/delete_job.py +12 -8
  37. blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
  38. blaxel/core/client/api/jobs/get_job.py +24 -20
  39. blaxel/core/client/api/jobs/get_job_execution.py +8 -4
  40. blaxel/core/client/api/jobs/list_job_executions.py +8 -4
  41. blaxel/core/client/api/jobs/list_jobs.py +12 -8
  42. blaxel/core/client/api/jobs/update_job.py +20 -12
  43. blaxel/core/client/api/locations/list_locations.py +12 -8
  44. blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
  45. blaxel/core/client/api/models/create_model.py +52 -23
  46. blaxel/core/client/api/models/delete_model.py +40 -19
  47. blaxel/core/client/api/models/get_model.py +40 -19
  48. blaxel/core/client/api/models/list_models.py +40 -19
  49. blaxel/core/client/api/models/update_model.py +52 -23
  50. blaxel/core/client/api/policies/create_policy.py +12 -8
  51. blaxel/core/client/api/policies/delete_policy.py +12 -8
  52. blaxel/core/client/api/policies/get_policy.py +12 -8
  53. blaxel/core/client/api/policies/list_policies.py +12 -8
  54. blaxel/core/client/api/policies/update_policy.py +12 -8
  55. blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
  56. blaxel/core/client/api/sandboxhub/__init__.py +0 -0
  57. blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
  58. blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
  59. blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
  60. blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
  61. blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
  62. blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
  63. blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
  64. blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
  65. blaxel/core/client/api/templates/list_templates.py +12 -8
  66. blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
  67. blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
  68. blaxel/core/client/api/volumes/create_volume.py +56 -23
  69. blaxel/core/client/api/volumes/delete_volume.py +44 -19
  70. blaxel/core/client/api/volumes/get_volume.py +40 -19
  71. blaxel/core/client/api/volumes/list_volumes.py +40 -19
  72. blaxel/core/client/api/workspaces/create_workspace.py +54 -23
  73. blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
  74. blaxel/core/client/api/workspaces/get_workspace.py +42 -19
  75. blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
  76. blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
  77. blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
  78. blaxel/core/client/api/workspaces/update_workspace.py +50 -19
  79. blaxel/core/client/models/__init__.py +76 -146
  80. blaxel/core/client/models/agent.py +43 -47
  81. blaxel/core/client/models/agent_runtime.py +139 -0
  82. blaxel/core/client/models/agent_runtime_generation.py +18 -0
  83. blaxel/core/client/models/agent_spec.py +33 -110
  84. blaxel/core/client/models/api_key.py +5 -4
  85. blaxel/core/client/models/core_event.py +5 -5
  86. blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
  87. blaxel/core/client/models/create_job_execution_request.py +1 -1
  88. blaxel/core/client/models/create_job_execution_response.py +13 -9
  89. blaxel/core/client/models/custom_domain.py +19 -36
  90. blaxel/core/client/models/custom_domain_metadata.py +4 -3
  91. blaxel/core/client/models/custom_domain_spec.py +14 -5
  92. blaxel/core/client/models/custom_domain_spec_status.py +19 -0
  93. blaxel/core/client/models/entrypoint.py +39 -13
  94. blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
  95. blaxel/core/client/models/entrypoint_env.py +3 -3
  96. blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
  97. blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
  98. blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
  99. blaxel/core/client/models/expiration_policy.py +30 -11
  100. blaxel/core/client/models/expiration_policy_action.py +17 -0
  101. blaxel/core/client/models/expiration_policy_type.py +19 -0
  102. blaxel/core/client/models/flavor.py +13 -5
  103. blaxel/core/client/models/flavor_type.py +18 -0
  104. blaxel/core/client/models/form.py +6 -6
  105. blaxel/core/client/models/function.py +43 -47
  106. blaxel/core/client/models/function_runtime.py +138 -0
  107. blaxel/core/client/models/function_runtime_generation.py +18 -0
  108. blaxel/core/client/models/function_spec.py +27 -73
  109. blaxel/core/client/models/function_spec_transport.py +18 -0
  110. blaxel/core/client/models/image.py +19 -36
  111. blaxel/core/client/models/integration_connection.py +25 -39
  112. blaxel/core/client/models/integration_connection_spec.py +8 -5
  113. blaxel/core/client/models/integration_connection_spec_config.py +1 -1
  114. blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
  115. blaxel/core/client/models/integration_endpoint.py +41 -11
  116. blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
  117. blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
  118. blaxel/core/client/models/job.py +43 -47
  119. blaxel/core/client/models/job_execution.py +30 -37
  120. blaxel/core/client/models/job_execution_metadata.py +3 -3
  121. blaxel/core/client/models/job_execution_spec.py +2 -2
  122. blaxel/core/client/models/job_execution_stats.py +5 -5
  123. blaxel/core/client/models/job_execution_status.py +24 -0
  124. blaxel/core/client/models/job_execution_task.py +12 -4
  125. blaxel/core/client/models/job_execution_task_metadata.py +1 -1
  126. blaxel/core/client/models/job_execution_task_spec.py +2 -2
  127. blaxel/core/client/models/job_execution_task_status.py +23 -0
  128. blaxel/core/client/models/job_runtime.py +172 -0
  129. blaxel/core/client/models/job_runtime_generation.py +18 -0
  130. blaxel/core/client/models/job_spec.py +20 -88
  131. blaxel/core/client/models/location_response.py +5 -5
  132. blaxel/core/client/models/mcp_definition.py +30 -17
  133. blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
  134. blaxel/core/client/models/metadata.py +23 -17
  135. blaxel/core/client/models/metadata_labels.py +4 -1
  136. blaxel/core/client/models/model.py +43 -47
  137. blaxel/core/client/models/model_runtime.py +99 -0
  138. blaxel/core/client/models/model_runtime_type.py +34 -0
  139. blaxel/core/client/models/model_spec.py +12 -58
  140. blaxel/core/client/models/o_auth.py +23 -6
  141. blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
  142. blaxel/core/client/models/pending_invitation_accept.py +2 -1
  143. blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
  144. blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
  145. blaxel/core/client/models/policy.py +20 -36
  146. blaxel/core/client/models/policy_location.py +13 -5
  147. blaxel/core/client/models/policy_location_type.py +19 -0
  148. blaxel/core/client/models/policy_max_tokens.py +6 -6
  149. blaxel/core/client/models/policy_resource_type.py +20 -0
  150. blaxel/core/client/models/policy_spec.py +31 -10
  151. blaxel/core/client/models/policy_spec_type.py +19 -0
  152. blaxel/core/client/models/port.py +25 -15
  153. blaxel/core/client/models/port_protocol.py +19 -0
  154. blaxel/core/client/models/preview.py +19 -36
  155. blaxel/core/client/models/preview_metadata.py +12 -10
  156. blaxel/core/client/models/preview_token.py +19 -36
  157. blaxel/core/client/models/preview_token_metadata.py +8 -6
  158. blaxel/core/client/models/repository.py +2 -2
  159. blaxel/core/client/models/revision_configuration.py +3 -3
  160. blaxel/core/client/models/sandbox.py +45 -58
  161. blaxel/core/client/models/sandbox_definition.py +37 -22
  162. blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
  163. blaxel/core/client/models/sandbox_error.py +148 -0
  164. blaxel/core/client/models/sandbox_error_details.py +45 -0
  165. blaxel/core/client/models/sandbox_lifecycle.py +3 -2
  166. blaxel/core/client/models/sandbox_runtime.py +145 -0
  167. blaxel/core/client/models/sandbox_spec.py +33 -134
  168. blaxel/core/client/models/status.py +25 -0
  169. blaxel/core/client/models/template.py +8 -7
  170. blaxel/core/client/models/template_variable.py +5 -5
  171. blaxel/core/client/models/trigger.py +14 -6
  172. blaxel/core/client/models/trigger_configuration.py +7 -6
  173. blaxel/core/client/models/trigger_type.py +19 -0
  174. blaxel/core/client/models/volume.py +35 -47
  175. blaxel/core/client/models/volume_attachment.py +6 -4
  176. blaxel/core/client/models/volume_spec.py +7 -4
  177. blaxel/core/client/models/volume_state.py +3 -3
  178. blaxel/core/client/models/volume_template.py +19 -33
  179. blaxel/core/client/models/volume_template_state.py +12 -4
  180. blaxel/core/client/models/volume_template_state_status.py +19 -0
  181. blaxel/core/client/models/volume_template_version.py +12 -4
  182. blaxel/core/client/models/volume_template_version_status.py +19 -0
  183. blaxel/core/client/models/workspace.py +35 -25
  184. blaxel/core/client/models/workspace_runtime.py +3 -2
  185. blaxel/core/client/models/workspace_status.py +22 -0
  186. blaxel/core/common/__init__.py +1 -1
  187. blaxel/core/jobs/__init__.py +0 -1
  188. blaxel/core/sandbox/__init__.py +2 -0
  189. blaxel/core/sandbox/client/api/process/post_process.py +8 -4
  190. blaxel/core/sandbox/client/models/__init__.py +0 -2
  191. blaxel/core/sandbox/client/models/process_response.py +16 -0
  192. blaxel/core/sandbox/client/models/process_response_status.py +9 -0
  193. blaxel/core/sandbox/default/__init__.py +2 -0
  194. blaxel/core/sandbox/default/interpreter.py +5 -1
  195. blaxel/core/sandbox/default/preview.py +3 -1
  196. blaxel/core/sandbox/default/sandbox.py +85 -26
  197. blaxel/core/sandbox/sync/process.py +2 -1
  198. blaxel/core/sandbox/sync/sandbox.py +68 -23
  199. blaxel/core/sandbox/types.py +3 -0
  200. blaxel/core/tools/common.py +16 -2
  201. blaxel/core/volume/__init__.py +2 -2
  202. blaxel/core/volume/volume.py +227 -11
  203. blaxel/langgraph/tools.py +34 -2
  204. blaxel/openai/tools.py +33 -1
  205. {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
  206. {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/RECORD +209 -248
  207. blaxel/core/client/models/acl.py +0 -133
  208. blaxel/core/client/models/billable_time_metric.py +0 -89
  209. blaxel/core/client/models/core_spec.py +0 -194
  210. blaxel/core/client/models/core_spec_configurations.py +0 -77
  211. blaxel/core/client/models/histogram_bucket.py +0 -79
  212. blaxel/core/client/models/histogram_stats.py +0 -88
  213. blaxel/core/client/models/integration_model.py +0 -162
  214. blaxel/core/client/models/job_execution_config.py +0 -79
  215. blaxel/core/client/models/job_metrics.py +0 -262
  216. blaxel/core/client/models/jobs_chart_value.py +0 -70
  217. blaxel/core/client/models/jobs_network_chart.py +0 -102
  218. blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
  219. blaxel/core/client/models/jobs_total.py +0 -88
  220. blaxel/core/client/models/last_n_requests_metric.py +0 -97
  221. blaxel/core/client/models/latency_metric.py +0 -148
  222. blaxel/core/client/models/logs_response.py +0 -63
  223. blaxel/core/client/models/logs_response_data.py +0 -99
  224. blaxel/core/client/models/mcp_definition_form.py +0 -45
  225. blaxel/core/client/models/memory_allocation_by_name.py +0 -70
  226. blaxel/core/client/models/memory_allocation_metric.py +0 -61
  227. blaxel/core/client/models/metric.py +0 -79
  228. blaxel/core/client/models/metrics.py +0 -273
  229. blaxel/core/client/models/metrics_models.py +0 -45
  230. blaxel/core/client/models/metrics_rps_per_code.py +0 -45
  231. blaxel/core/client/models/pod_template_spec.py +0 -45
  232. blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
  233. blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
  234. blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
  235. blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
  236. blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
  237. blaxel/core/client/models/request_total_metric.py +0 -155
  238. blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
  239. blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
  240. blaxel/core/client/models/request_total_response_data.py +0 -97
  241. blaxel/core/client/models/resource.py +0 -99
  242. blaxel/core/client/models/resource_log.py +0 -88
  243. blaxel/core/client/models/resource_log_chart.py +0 -133
  244. blaxel/core/client/models/resource_log_response.py +0 -83
  245. blaxel/core/client/models/resource_metrics.py +0 -618
  246. blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
  247. blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
  248. blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
  249. blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
  250. blaxel/core/client/models/resource_trace.py +0 -97
  251. blaxel/core/client/models/runtime.py +0 -317
  252. blaxel/core/client/models/runtime_configuration.py +0 -45
  253. blaxel/core/client/models/runtime_startup_probe.py +0 -45
  254. blaxel/core/client/models/sandbox_metrics.py +0 -88
  255. blaxel/core/client/models/serverless_config.py +0 -117
  256. blaxel/core/client/models/serverless_config_configuration.py +0 -45
  257. blaxel/core/client/models/start_sandbox.py +0 -98
  258. blaxel/core/client/models/stop_sandbox.py +0 -98
  259. blaxel/core/client/models/store_agent.py +0 -181
  260. blaxel/core/client/models/store_agent_labels.py +0 -45
  261. blaxel/core/client/models/store_configuration.py +0 -156
  262. blaxel/core/client/models/store_configuration_option.py +0 -79
  263. blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
  264. blaxel/core/client/models/token_rate_metric.py +0 -106
  265. blaxel/core/client/models/token_rate_metrics.py +0 -124
  266. blaxel/core/client/models/token_total_metric.py +0 -112
  267. blaxel/core/client/models/trace_ids_response.py +0 -45
  268. blaxel/core/client/models/websocket_channel.py +0 -97
  269. blaxel/core/client/models/websocket_message.py +0 -106
  270. blaxel/core/sandbox/client/api/root/delete.py +0 -130
  271. blaxel/core/sandbox/client/api/root/get.py +0 -130
  272. blaxel/core/sandbox/client/api/root/options.py +0 -130
  273. blaxel/core/sandbox/client/api/root/patch.py +0 -130
  274. blaxel/core/sandbox/client/api/root/post.py +0 -130
  275. blaxel/core/sandbox/client/api/root/put.py +0 -130
  276. /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
  277. {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
  278. {blaxel-0.2.33.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
@@ -1,70 +0,0 @@
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="MemoryAllocationByName")
9
-
10
-
11
- @_attrs_define
12
- class MemoryAllocationByName:
13
- """Memory allocation by service name
14
-
15
- Attributes:
16
- allocation (Union[Unset, float]): Memory allocation value
17
- name (Union[Unset, str]): Name
18
- """
19
-
20
- allocation: Union[Unset, float] = UNSET
21
- name: Union[Unset, str] = UNSET
22
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
-
24
- def to_dict(self) -> dict[str, Any]:
25
- allocation = self.allocation
26
-
27
- name = self.name
28
-
29
- field_dict: dict[str, Any] = {}
30
- field_dict.update(self.additional_properties)
31
- field_dict.update({})
32
- if allocation is not UNSET:
33
- field_dict["allocation"] = allocation
34
- if name is not UNSET:
35
- field_dict["name"] = name
36
-
37
- return field_dict
38
-
39
- @classmethod
40
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
41
- if not src_dict:
42
- return None
43
- d = src_dict.copy()
44
- allocation = d.pop("allocation", UNSET)
45
-
46
- name = d.pop("name", UNSET)
47
-
48
- memory_allocation_by_name = cls(
49
- allocation=allocation,
50
- name=name,
51
- )
52
-
53
- memory_allocation_by_name.additional_properties = d
54
- return memory_allocation_by_name
55
-
56
- @property
57
- def additional_keys(self) -> list[str]:
58
- return list(self.additional_properties.keys())
59
-
60
- def __getitem__(self, key: str) -> Any:
61
- return self.additional_properties[key]
62
-
63
- def __setitem__(self, key: str, value: Any) -> None:
64
- self.additional_properties[key] = value
65
-
66
- def __delitem__(self, key: str) -> None:
67
- del self.additional_properties[key]
68
-
69
- def __contains__(self, key: str) -> bool:
70
- return key in self.additional_properties
@@ -1,61 +0,0 @@
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="MemoryAllocationMetric")
9
-
10
-
11
- @_attrs_define
12
- class MemoryAllocationMetric:
13
- """Metrics for memory allocation
14
-
15
- Attributes:
16
- total_allocation (Union[Unset, float]): Total memory allocation in GB-seconds
17
- """
18
-
19
- total_allocation: Union[Unset, float] = UNSET
20
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
-
22
- def to_dict(self) -> dict[str, Any]:
23
- total_allocation = self.total_allocation
24
-
25
- field_dict: dict[str, Any] = {}
26
- field_dict.update(self.additional_properties)
27
- field_dict.update({})
28
- if total_allocation is not UNSET:
29
- field_dict["totalAllocation"] = total_allocation
30
-
31
- return field_dict
32
-
33
- @classmethod
34
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
35
- if not src_dict:
36
- return None
37
- d = src_dict.copy()
38
- total_allocation = d.pop("totalAllocation", d.pop("total_allocation", UNSET))
39
-
40
- memory_allocation_metric = cls(
41
- total_allocation=total_allocation,
42
- )
43
-
44
- memory_allocation_metric.additional_properties = d
45
- return memory_allocation_metric
46
-
47
- @property
48
- def additional_keys(self) -> list[str]:
49
- return list(self.additional_properties.keys())
50
-
51
- def __getitem__(self, key: str) -> Any:
52
- return self.additional_properties[key]
53
-
54
- def __setitem__(self, key: str, value: Any) -> None:
55
- self.additional_properties[key] = value
56
-
57
- def __delitem__(self, key: str) -> None:
58
- del self.additional_properties[key]
59
-
60
- def __contains__(self, key: str) -> bool:
61
- return key in self.additional_properties
@@ -1,79 +0,0 @@
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="Metric")
9
-
10
-
11
- @_attrs_define
12
- class Metric:
13
- """Metric
14
-
15
- Attributes:
16
- rate (Union[Unset, int]): Metric value
17
- request_total (Union[Unset, int]): Metric value
18
- timestamp (Union[Unset, str]): Metric timestamp
19
- """
20
-
21
- rate: Union[Unset, int] = UNSET
22
- request_total: 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
- rate = self.rate
28
-
29
- request_total = self.request_total
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 rate is not UNSET:
37
- field_dict["rate"] = rate
38
- if request_total is not UNSET:
39
- field_dict["requestTotal"] = request_total
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 | None:
47
- if not src_dict:
48
- return None
49
- d = src_dict.copy()
50
- rate = d.pop("rate", UNSET)
51
-
52
- request_total = d.pop("requestTotal", d.pop("request_total", UNSET))
53
-
54
- timestamp = d.pop("timestamp", UNSET)
55
-
56
- metric = cls(
57
- rate=rate,
58
- request_total=request_total,
59
- timestamp=timestamp,
60
- )
61
-
62
- metric.additional_properties = d
63
- return metric
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
@@ -1,273 +0,0 @@
1
- from typing import TYPE_CHECKING, 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
- if TYPE_CHECKING:
9
- from ..models.last_n_requests_metric import LastNRequestsMetric
10
- from ..models.metric import Metric
11
- from ..models.metrics_models import MetricsModels
12
- from ..models.metrics_request_total_per_code import MetricsRequestTotalPerCode
13
- from ..models.metrics_rps_per_code import MetricsRpsPerCode
14
- from ..models.request_total_response_data import RequestTotalResponseData
15
-
16
-
17
- T = TypeVar("T", bound="Metrics")
18
-
19
-
20
- @_attrs_define
21
- class Metrics:
22
- """Metrics for resources
23
-
24
- Attributes:
25
- agents (Union[Unset, Any]): Metrics for agents
26
- functions (Union[Unset, Any]): Metrics for functions
27
- inference_error_global (Union[Unset, list['Metric']]): Array of metrics
28
- inference_global (Union[Unset, list[Any]]): Historical requests for all resources globally
29
- items (Union[Unset, list['RequestTotalResponseData']]): Historical requests for all resources globally
30
- jobs (Union[Unset, Any]): Metrics for jobs
31
- last_n_requests (Union[Unset, list['LastNRequestsMetric']]): Metric value
32
- models (Union[Unset, MetricsModels]): Metrics for models
33
- request_total (Union[Unset, float]): Number of requests for all resources globally
34
- request_total_per_code (Union[Unset, MetricsRequestTotalPerCode]): Number of requests for all resources globally
35
- per code
36
- rps (Union[Unset, float]): Number of requests per second for all resources globally
37
- rps_per_code (Union[Unset, MetricsRpsPerCode]): Number of requests per second for all resources globally per
38
- code
39
- sandboxes (Union[Unset, Any]): Metrics for sandboxes
40
- """
41
-
42
- agents: Union[Unset, Any] = UNSET
43
- functions: Union[Unset, Any] = UNSET
44
- inference_error_global: Union[Unset, list["Metric"]] = UNSET
45
- inference_global: Union[Unset, list[Any]] = UNSET
46
- items: Union[Unset, list["RequestTotalResponseData"]] = UNSET
47
- jobs: Union[Unset, Any] = UNSET
48
- last_n_requests: Union[Unset, list["LastNRequestsMetric"]] = UNSET
49
- models: Union[Unset, "MetricsModels"] = UNSET
50
- request_total: Union[Unset, float] = UNSET
51
- request_total_per_code: Union[Unset, "MetricsRequestTotalPerCode"] = UNSET
52
- rps: Union[Unset, float] = UNSET
53
- rps_per_code: Union[Unset, "MetricsRpsPerCode"] = UNSET
54
- sandboxes: Union[Unset, Any] = UNSET
55
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
56
-
57
- def to_dict(self) -> dict[str, Any]:
58
- agents = self.agents
59
-
60
- functions = self.functions
61
-
62
- inference_error_global: Union[Unset, list[dict[str, Any]]] = UNSET
63
- if not isinstance(self.inference_error_global, Unset):
64
- inference_error_global = []
65
- for componentsschemas_array_metric_item_data in self.inference_error_global:
66
- if type(componentsschemas_array_metric_item_data) is dict:
67
- componentsschemas_array_metric_item = componentsschemas_array_metric_item_data
68
- else:
69
- componentsschemas_array_metric_item = (
70
- componentsschemas_array_metric_item_data.to_dict()
71
- )
72
- inference_error_global.append(componentsschemas_array_metric_item)
73
-
74
- inference_global: Union[Unset, list[Any]] = UNSET
75
- if not isinstance(self.inference_global, Unset):
76
- inference_global = self.inference_global
77
-
78
- items: Union[Unset, list[dict[str, Any]]] = UNSET
79
- if not isinstance(self.items, Unset):
80
- items = []
81
- for items_item_data in self.items:
82
- if type(items_item_data) is dict:
83
- items_item = items_item_data
84
- else:
85
- items_item = items_item_data.to_dict()
86
- items.append(items_item)
87
-
88
- jobs = self.jobs
89
-
90
- last_n_requests: Union[Unset, list[dict[str, Any]]] = UNSET
91
- if not isinstance(self.last_n_requests, Unset):
92
- last_n_requests = []
93
- for last_n_requests_item_data in self.last_n_requests:
94
- if type(last_n_requests_item_data) is dict:
95
- last_n_requests_item = last_n_requests_item_data
96
- else:
97
- last_n_requests_item = last_n_requests_item_data.to_dict()
98
- last_n_requests.append(last_n_requests_item)
99
-
100
- models: Union[Unset, dict[str, Any]] = UNSET
101
- if self.models and not isinstance(self.models, Unset) and not isinstance(self.models, dict):
102
- models = self.models.to_dict()
103
- elif self.models and isinstance(self.models, dict):
104
- models = self.models
105
-
106
- request_total = self.request_total
107
-
108
- request_total_per_code: Union[Unset, dict[str, Any]] = UNSET
109
- if (
110
- self.request_total_per_code
111
- and not isinstance(self.request_total_per_code, Unset)
112
- and not isinstance(self.request_total_per_code, dict)
113
- ):
114
- request_total_per_code = self.request_total_per_code.to_dict()
115
- elif self.request_total_per_code and isinstance(self.request_total_per_code, dict):
116
- request_total_per_code = self.request_total_per_code
117
-
118
- rps = self.rps
119
-
120
- rps_per_code: Union[Unset, dict[str, Any]] = UNSET
121
- if (
122
- self.rps_per_code
123
- and not isinstance(self.rps_per_code, Unset)
124
- and not isinstance(self.rps_per_code, dict)
125
- ):
126
- rps_per_code = self.rps_per_code.to_dict()
127
- elif self.rps_per_code and isinstance(self.rps_per_code, dict):
128
- rps_per_code = self.rps_per_code
129
-
130
- sandboxes = self.sandboxes
131
-
132
- field_dict: dict[str, Any] = {}
133
- field_dict.update(self.additional_properties)
134
- field_dict.update({})
135
- if agents is not UNSET:
136
- field_dict["agents"] = agents
137
- if functions is not UNSET:
138
- field_dict["functions"] = functions
139
- if inference_error_global is not UNSET:
140
- field_dict["inferenceErrorGlobal"] = inference_error_global
141
- if inference_global is not UNSET:
142
- field_dict["inferenceGlobal"] = inference_global
143
- if items is not UNSET:
144
- field_dict["items"] = items
145
- if jobs is not UNSET:
146
- field_dict["jobs"] = jobs
147
- if last_n_requests is not UNSET:
148
- field_dict["lastNRequests"] = last_n_requests
149
- if models is not UNSET:
150
- field_dict["models"] = models
151
- if request_total is not UNSET:
152
- field_dict["requestTotal"] = request_total
153
- if request_total_per_code is not UNSET:
154
- field_dict["requestTotalPerCode"] = request_total_per_code
155
- if rps is not UNSET:
156
- field_dict["rps"] = rps
157
- if rps_per_code is not UNSET:
158
- field_dict["rpsPerCode"] = rps_per_code
159
- if sandboxes is not UNSET:
160
- field_dict["sandboxes"] = sandboxes
161
-
162
- return field_dict
163
-
164
- @classmethod
165
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
166
- from ..models.last_n_requests_metric import LastNRequestsMetric
167
- from ..models.metric import Metric
168
- from ..models.metrics_models import MetricsModels
169
- from ..models.metrics_request_total_per_code import MetricsRequestTotalPerCode
170
- from ..models.metrics_rps_per_code import MetricsRpsPerCode
171
- from ..models.request_total_response_data import RequestTotalResponseData
172
-
173
- if not src_dict:
174
- return None
175
- d = src_dict.copy()
176
- agents = d.pop("agents", UNSET)
177
-
178
- functions = d.pop("functions", UNSET)
179
-
180
- inference_error_global = []
181
- _inference_error_global = d.pop(
182
- "inferenceErrorGlobal", d.pop("inference_error_global", UNSET)
183
- )
184
- for componentsschemas_array_metric_item_data in _inference_error_global or []:
185
- componentsschemas_array_metric_item = Metric.from_dict(
186
- componentsschemas_array_metric_item_data
187
- )
188
-
189
- inference_error_global.append(componentsschemas_array_metric_item)
190
-
191
- inference_global = cast(
192
- list[Any], d.pop("inferenceGlobal", d.pop("inference_global", UNSET))
193
- )
194
-
195
- items = []
196
- _items = d.pop("items", UNSET)
197
- for items_item_data in _items or []:
198
- items_item = RequestTotalResponseData.from_dict(items_item_data)
199
-
200
- items.append(items_item)
201
-
202
- jobs = d.pop("jobs", UNSET)
203
-
204
- last_n_requests = []
205
- _last_n_requests = d.pop("lastNRequests", d.pop("last_n_requests", UNSET))
206
- for last_n_requests_item_data in _last_n_requests or []:
207
- last_n_requests_item = LastNRequestsMetric.from_dict(last_n_requests_item_data)
208
-
209
- last_n_requests.append(last_n_requests_item)
210
-
211
- _models = d.pop("models", UNSET)
212
- models: Union[Unset, MetricsModels]
213
- if isinstance(_models, Unset):
214
- models = UNSET
215
- else:
216
- models = MetricsModels.from_dict(_models)
217
-
218
- request_total = d.pop("requestTotal", d.pop("request_total", UNSET))
219
-
220
- _request_total_per_code = d.pop(
221
- "requestTotalPerCode", d.pop("request_total_per_code", UNSET)
222
- )
223
- request_total_per_code: Union[Unset, MetricsRequestTotalPerCode]
224
- if isinstance(_request_total_per_code, Unset):
225
- request_total_per_code = UNSET
226
- else:
227
- request_total_per_code = MetricsRequestTotalPerCode.from_dict(_request_total_per_code)
228
-
229
- rps = d.pop("rps", UNSET)
230
-
231
- _rps_per_code = d.pop("rpsPerCode", d.pop("rps_per_code", UNSET))
232
- rps_per_code: Union[Unset, MetricsRpsPerCode]
233
- if isinstance(_rps_per_code, Unset):
234
- rps_per_code = UNSET
235
- else:
236
- rps_per_code = MetricsRpsPerCode.from_dict(_rps_per_code)
237
-
238
- sandboxes = d.pop("sandboxes", UNSET)
239
-
240
- metrics = cls(
241
- agents=agents,
242
- functions=functions,
243
- inference_error_global=inference_error_global,
244
- inference_global=inference_global,
245
- items=items,
246
- jobs=jobs,
247
- last_n_requests=last_n_requests,
248
- models=models,
249
- request_total=request_total,
250
- request_total_per_code=request_total_per_code,
251
- rps=rps,
252
- rps_per_code=rps_per_code,
253
- sandboxes=sandboxes,
254
- )
255
-
256
- metrics.additional_properties = d
257
- return metrics
258
-
259
- @property
260
- def additional_keys(self) -> list[str]:
261
- return list(self.additional_properties.keys())
262
-
263
- def __getitem__(self, key: str) -> Any:
264
- return self.additional_properties[key]
265
-
266
- def __setitem__(self, key: str, value: Any) -> None:
267
- self.additional_properties[key] = value
268
-
269
- def __delitem__(self, key: str) -> None:
270
- del self.additional_properties[key]
271
-
272
- def __contains__(self, key: str) -> bool:
273
- return key in self.additional_properties
@@ -1,45 +0,0 @@
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="MetricsModels")
7
-
8
-
9
- @_attrs_define
10
- class MetricsModels:
11
- """Metrics for models"""
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 | None:
23
- if not src_dict:
24
- return None
25
- d = src_dict.copy()
26
- metrics_models = cls()
27
-
28
- metrics_models.additional_properties = d
29
- return metrics_models
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
@@ -1,45 +0,0 @@
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="MetricsRpsPerCode")
7
-
8
-
9
- @_attrs_define
10
- class MetricsRpsPerCode:
11
- """Number of requests per second 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 | None:
23
- if not src_dict:
24
- return None
25
- d = src_dict.copy()
26
- metrics_rps_per_code = cls()
27
-
28
- metrics_rps_per_code.additional_properties = d
29
- return metrics_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
@@ -1,45 +0,0 @@
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="PodTemplateSpec")
7
-
8
-
9
- @_attrs_define
10
- class PodTemplateSpec:
11
- """Pod template specification"""
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 | None:
23
- if not src_dict:
24
- return None
25
- d = src_dict.copy()
26
- pod_template_spec = cls()
27
-
28
- pod_template_spec.additional_properties = d
29
- return pod_template_spec
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