blaxel 0.2.34__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 (276) hide show
  1. blaxel/__init__.py +2 -2
  2. blaxel/core/client/api/agents/create_agent.py +64 -19
  3. blaxel/core/client/api/agents/delete_agent.py +44 -15
  4. blaxel/core/client/api/agents/get_agent.py +43 -14
  5. blaxel/core/client/api/agents/list_agents.py +40 -11
  6. blaxel/core/client/api/agents/update_agent.py +60 -19
  7. blaxel/core/client/api/compute/create_sandbox.py +60 -23
  8. blaxel/core/client/api/compute/delete_sandbox.py +40 -19
  9. blaxel/core/client/api/compute/get_sandbox.py +39 -18
  10. blaxel/core/client/api/compute/list_sandboxes.py +40 -19
  11. blaxel/core/client/api/compute/update_sandbox.py +56 -23
  12. blaxel/core/client/api/configurations/get_configuration.py +16 -4
  13. blaxel/core/client/api/customdomains/create_custom_domain.py +12 -0
  14. blaxel/core/client/api/customdomains/list_custom_domains.py +16 -4
  15. blaxel/core/client/api/default/get_template.py +8 -4
  16. blaxel/core/client/api/functions/create_function.py +62 -19
  17. blaxel/core/client/api/functions/delete_function.py +46 -15
  18. blaxel/core/client/api/functions/get_function.py +45 -14
  19. blaxel/core/client/api/functions/list_functions.py +44 -15
  20. blaxel/core/client/api/functions/update_function.py +62 -19
  21. blaxel/core/client/api/images/cleanup_images.py +12 -12
  22. blaxel/core/client/api/images/delete_image.py +12 -8
  23. blaxel/core/client/api/images/delete_image_tag.py +12 -8
  24. blaxel/core/client/api/images/get_image.py +12 -8
  25. blaxel/core/client/api/images/list_images.py +12 -8
  26. blaxel/core/client/api/integrations/create_integration_connection.py +56 -23
  27. blaxel/core/client/api/integrations/delete_integration_connection.py +48 -19
  28. blaxel/core/client/api/integrations/get_integration.py +12 -8
  29. blaxel/core/client/api/integrations/get_integration_connection.py +44 -19
  30. blaxel/core/client/api/integrations/get_integration_connection_model.py +2 -2
  31. blaxel/core/client/api/integrations/list_integration_connections.py +36 -19
  32. blaxel/core/client/api/integrations/update_integration_connection.py +52 -19
  33. blaxel/core/client/api/jobs/create_job.py +20 -12
  34. blaxel/core/client/api/jobs/create_job_execution.py +22 -16
  35. blaxel/core/client/api/jobs/delete_job.py +12 -8
  36. blaxel/core/client/api/jobs/delete_job_execution.py +12 -8
  37. blaxel/core/client/api/jobs/get_job.py +24 -20
  38. blaxel/core/client/api/jobs/get_job_execution.py +8 -4
  39. blaxel/core/client/api/jobs/list_job_executions.py +8 -4
  40. blaxel/core/client/api/jobs/list_jobs.py +12 -8
  41. blaxel/core/client/api/jobs/update_job.py +20 -12
  42. blaxel/core/client/api/locations/list_locations.py +12 -8
  43. blaxel/core/client/api/{default → mcphub}/list_mcp_hub_definitions.py +20 -4
  44. blaxel/core/client/api/models/create_model.py +52 -23
  45. blaxel/core/client/api/models/delete_model.py +40 -19
  46. blaxel/core/client/api/models/get_model.py +40 -19
  47. blaxel/core/client/api/models/list_models.py +40 -19
  48. blaxel/core/client/api/models/update_model.py +52 -23
  49. blaxel/core/client/api/policies/create_policy.py +12 -8
  50. blaxel/core/client/api/policies/delete_policy.py +12 -8
  51. blaxel/core/client/api/policies/get_policy.py +12 -8
  52. blaxel/core/client/api/policies/list_policies.py +12 -8
  53. blaxel/core/client/api/policies/update_policy.py +12 -8
  54. blaxel/core/client/api/public_ipslist/list_public_ips.py +37 -5
  55. blaxel/core/client/api/sandboxhub/__init__.py +0 -0
  56. blaxel/core/client/api/{default → sandboxhub}/list_sandbox_hub_definitions.py +20 -4
  57. blaxel/core/client/api/service_accounts/create_api_key_for_service_account.py +12 -8
  58. blaxel/core/client/api/service_accounts/create_workspace_service_account.py +12 -8
  59. blaxel/core/client/api/service_accounts/delete_api_key_for_service_account.py +6 -4
  60. blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +12 -8
  61. blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +12 -8
  62. blaxel/core/client/api/service_accounts/list_api_keys_for_service_account.py +12 -8
  63. blaxel/core/client/api/service_accounts/update_workspace_service_account.py +8 -8
  64. blaxel/core/client/api/templates/list_templates.py +12 -8
  65. blaxel/core/client/api/volume_templates/create_volume_template.py +8 -4
  66. blaxel/core/client/api/volume_templates/list_volume_templates.py +8 -4
  67. blaxel/core/client/api/volumes/create_volume.py +56 -23
  68. blaxel/core/client/api/volumes/delete_volume.py +44 -19
  69. blaxel/core/client/api/volumes/get_volume.py +40 -19
  70. blaxel/core/client/api/volumes/list_volumes.py +40 -19
  71. blaxel/core/client/api/workspaces/create_workspace.py +54 -23
  72. blaxel/core/client/api/workspaces/delete_workspace.py +42 -19
  73. blaxel/core/client/api/workspaces/get_workspace.py +42 -19
  74. blaxel/core/client/api/workspaces/invite_workspace_user.py +8 -4
  75. blaxel/core/client/api/workspaces/list_workspace_users.py +12 -8
  76. blaxel/core/client/api/workspaces/list_workspaces.py +36 -19
  77. blaxel/core/client/api/workspaces/update_workspace.py +50 -19
  78. blaxel/core/client/models/__init__.py +76 -146
  79. blaxel/core/client/models/agent.py +43 -47
  80. blaxel/core/client/models/agent_runtime.py +139 -0
  81. blaxel/core/client/models/agent_runtime_generation.py +18 -0
  82. blaxel/core/client/models/agent_spec.py +33 -110
  83. blaxel/core/client/models/api_key.py +5 -4
  84. blaxel/core/client/models/core_event.py +5 -5
  85. blaxel/core/client/models/create_api_key_for_service_account_body.py +2 -1
  86. blaxel/core/client/models/create_job_execution_request.py +1 -1
  87. blaxel/core/client/models/create_job_execution_response.py +13 -9
  88. blaxel/core/client/models/custom_domain.py +19 -36
  89. blaxel/core/client/models/custom_domain_metadata.py +4 -3
  90. blaxel/core/client/models/custom_domain_spec.py +14 -5
  91. blaxel/core/client/models/custom_domain_spec_status.py +19 -0
  92. blaxel/core/client/models/entrypoint.py +39 -13
  93. blaxel/core/client/models/{workspace_labels.py → entrypoint_args_item.py} +6 -6
  94. blaxel/core/client/models/entrypoint_env.py +3 -3
  95. blaxel/core/client/models/{job_metrics_executions_total.py → entrypoint_super_gateway_args_item.py} +6 -6
  96. blaxel/core/client/models/{spec_configuration.py → env.py} +17 -8
  97. blaxel/core/{sandbox/client/models/welcome_response.py → client/models/error.py} +26 -23
  98. blaxel/core/client/models/expiration_policy.py +30 -11
  99. blaxel/core/client/models/expiration_policy_action.py +17 -0
  100. blaxel/core/client/models/expiration_policy_type.py +19 -0
  101. blaxel/core/client/models/flavor.py +13 -5
  102. blaxel/core/client/models/flavor_type.py +18 -0
  103. blaxel/core/client/models/form.py +6 -6
  104. blaxel/core/client/models/function.py +43 -47
  105. blaxel/core/client/models/function_runtime.py +138 -0
  106. blaxel/core/client/models/function_runtime_generation.py +18 -0
  107. blaxel/core/client/models/function_spec.py +27 -73
  108. blaxel/core/client/models/function_spec_transport.py +18 -0
  109. blaxel/core/client/models/image.py +19 -36
  110. blaxel/core/client/models/integration_connection.py +25 -39
  111. blaxel/core/client/models/integration_connection_spec.py +8 -5
  112. blaxel/core/client/models/integration_connection_spec_config.py +1 -1
  113. blaxel/core/client/models/integration_connection_spec_secret.py +1 -1
  114. blaxel/core/client/models/integration_endpoint.py +41 -11
  115. blaxel/core/client/models/integration_endpoint_ignore_models_item.py +45 -0
  116. blaxel/core/client/models/{mcp_definition_entrypoint.py → integration_endpoint_models_item.py} +6 -6
  117. blaxel/core/client/models/job.py +43 -47
  118. blaxel/core/client/models/job_execution.py +30 -37
  119. blaxel/core/client/models/job_execution_metadata.py +3 -3
  120. blaxel/core/client/models/job_execution_spec.py +2 -2
  121. blaxel/core/client/models/job_execution_stats.py +5 -5
  122. blaxel/core/client/models/job_execution_status.py +24 -0
  123. blaxel/core/client/models/job_execution_task.py +12 -4
  124. blaxel/core/client/models/job_execution_task_metadata.py +1 -1
  125. blaxel/core/client/models/job_execution_task_spec.py +2 -2
  126. blaxel/core/client/models/job_execution_task_status.py +23 -0
  127. blaxel/core/client/models/job_runtime.py +172 -0
  128. blaxel/core/client/models/job_runtime_generation.py +18 -0
  129. blaxel/core/client/models/job_spec.py +20 -88
  130. blaxel/core/client/models/location_response.py +5 -5
  131. blaxel/core/client/models/mcp_definition.py +30 -17
  132. blaxel/core/client/models/{job_metrics_tasks_total.py → mcp_definition_categories_item.py} +6 -6
  133. blaxel/core/client/models/metadata.py +23 -17
  134. blaxel/core/client/models/metadata_labels.py +4 -1
  135. blaxel/core/client/models/model.py +43 -47
  136. blaxel/core/client/models/model_runtime.py +99 -0
  137. blaxel/core/client/models/model_runtime_type.py +34 -0
  138. blaxel/core/client/models/model_spec.py +12 -58
  139. blaxel/core/client/models/o_auth.py +23 -6
  140. blaxel/core/client/models/{form_oauth.py → o_auth_scope_item.py} +6 -6
  141. blaxel/core/client/models/pending_invitation_accept.py +2 -1
  142. blaxel/core/client/models/pending_invitation_workspace_details.py +27 -6
  143. blaxel/core/client/models/{metrics_request_total_per_code.py → pending_invitation_workspace_details_emails_item.py} +6 -6
  144. blaxel/core/client/models/policy.py +20 -36
  145. blaxel/core/client/models/policy_location.py +13 -5
  146. blaxel/core/client/models/policy_location_type.py +19 -0
  147. blaxel/core/client/models/policy_max_tokens.py +6 -6
  148. blaxel/core/client/models/policy_resource_type.py +20 -0
  149. blaxel/core/client/models/policy_spec.py +31 -10
  150. blaxel/core/client/models/policy_spec_type.py +19 -0
  151. blaxel/core/client/models/port.py +25 -15
  152. blaxel/core/client/models/port_protocol.py +19 -0
  153. blaxel/core/client/models/preview.py +19 -36
  154. blaxel/core/client/models/preview_metadata.py +12 -10
  155. blaxel/core/client/models/preview_token.py +19 -36
  156. blaxel/core/client/models/preview_token_metadata.py +8 -6
  157. blaxel/core/client/models/repository.py +2 -2
  158. blaxel/core/client/models/revision_configuration.py +3 -3
  159. blaxel/core/client/models/sandbox.py +45 -58
  160. blaxel/core/client/models/sandbox_definition.py +37 -22
  161. blaxel/core/client/models/sandbox_definition_categories_item.py +45 -0
  162. blaxel/core/client/models/sandbox_error.py +148 -0
  163. blaxel/core/client/models/sandbox_error_details.py +45 -0
  164. blaxel/core/client/models/sandbox_lifecycle.py +3 -2
  165. blaxel/core/client/models/sandbox_runtime.py +145 -0
  166. blaxel/core/client/models/sandbox_spec.py +33 -134
  167. blaxel/core/client/models/status.py +25 -0
  168. blaxel/core/client/models/template.py +8 -7
  169. blaxel/core/client/models/template_variable.py +5 -5
  170. blaxel/core/client/models/trigger.py +14 -6
  171. blaxel/core/client/models/trigger_configuration.py +7 -6
  172. blaxel/core/client/models/trigger_type.py +19 -0
  173. blaxel/core/client/models/volume.py +35 -47
  174. blaxel/core/client/models/volume_attachment.py +6 -4
  175. blaxel/core/client/models/volume_spec.py +7 -4
  176. blaxel/core/client/models/volume_state.py +3 -3
  177. blaxel/core/client/models/volume_template.py +19 -33
  178. blaxel/core/client/models/volume_template_state.py +12 -4
  179. blaxel/core/client/models/volume_template_state_status.py +19 -0
  180. blaxel/core/client/models/volume_template_version.py +12 -4
  181. blaxel/core/client/models/volume_template_version_status.py +19 -0
  182. blaxel/core/client/models/workspace.py +35 -25
  183. blaxel/core/client/models/workspace_runtime.py +3 -2
  184. blaxel/core/client/models/workspace_status.py +22 -0
  185. blaxel/core/common/__init__.py +1 -1
  186. blaxel/core/jobs/__init__.py +0 -1
  187. blaxel/core/sandbox/__init__.py +2 -0
  188. blaxel/core/sandbox/client/api/process/post_process.py +8 -4
  189. blaxel/core/sandbox/client/models/__init__.py +0 -2
  190. blaxel/core/sandbox/client/models/process_response.py +16 -0
  191. blaxel/core/sandbox/client/models/process_response_status.py +9 -0
  192. blaxel/core/sandbox/default/__init__.py +2 -0
  193. blaxel/core/sandbox/default/interpreter.py +5 -1
  194. blaxel/core/sandbox/default/preview.py +3 -1
  195. blaxel/core/sandbox/default/sandbox.py +51 -16
  196. blaxel/core/sandbox/sync/process.py +2 -1
  197. blaxel/core/sandbox/sync/sandbox.py +34 -13
  198. blaxel/core/tools/common.py +16 -2
  199. blaxel/core/volume/__init__.py +2 -2
  200. blaxel/core/volume/volume.py +32 -10
  201. blaxel/langgraph/tools.py +34 -2
  202. blaxel/openai/tools.py +33 -1
  203. {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/METADATA +3 -3
  204. {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/RECORD +207 -246
  205. blaxel/core/client/models/acl.py +0 -133
  206. blaxel/core/client/models/billable_time_metric.py +0 -89
  207. blaxel/core/client/models/core_spec.py +0 -194
  208. blaxel/core/client/models/core_spec_configurations.py +0 -77
  209. blaxel/core/client/models/histogram_bucket.py +0 -79
  210. blaxel/core/client/models/histogram_stats.py +0 -88
  211. blaxel/core/client/models/integration_model.py +0 -162
  212. blaxel/core/client/models/job_execution_config.py +0 -79
  213. blaxel/core/client/models/job_metrics.py +0 -262
  214. blaxel/core/client/models/jobs_chart_value.py +0 -70
  215. blaxel/core/client/models/jobs_network_chart.py +0 -102
  216. blaxel/core/client/models/jobs_success_failed_chart.py +0 -147
  217. blaxel/core/client/models/jobs_total.py +0 -88
  218. blaxel/core/client/models/last_n_requests_metric.py +0 -97
  219. blaxel/core/client/models/latency_metric.py +0 -148
  220. blaxel/core/client/models/logs_response.py +0 -63
  221. blaxel/core/client/models/logs_response_data.py +0 -99
  222. blaxel/core/client/models/mcp_definition_form.py +0 -45
  223. blaxel/core/client/models/memory_allocation_by_name.py +0 -70
  224. blaxel/core/client/models/memory_allocation_metric.py +0 -61
  225. blaxel/core/client/models/metric.py +0 -79
  226. blaxel/core/client/models/metrics.py +0 -273
  227. blaxel/core/client/models/metrics_models.py +0 -45
  228. blaxel/core/client/models/metrics_rps_per_code.py +0 -45
  229. blaxel/core/client/models/pod_template_spec.py +0 -45
  230. blaxel/core/client/models/request_duration_over_time_metric.py +0 -97
  231. blaxel/core/client/models/request_duration_over_time_metrics.py +0 -84
  232. blaxel/core/client/models/request_total_by_origin_metric.py +0 -129
  233. blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin.py +0 -45
  234. blaxel/core/client/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -45
  235. blaxel/core/client/models/request_total_metric.py +0 -155
  236. blaxel/core/client/models/request_total_metric_request_total_per_code.py +0 -45
  237. blaxel/core/client/models/request_total_metric_rps_per_code.py +0 -45
  238. blaxel/core/client/models/request_total_response_data.py +0 -97
  239. blaxel/core/client/models/resource.py +0 -99
  240. blaxel/core/client/models/resource_log.py +0 -88
  241. blaxel/core/client/models/resource_log_chart.py +0 -133
  242. blaxel/core/client/models/resource_log_response.py +0 -83
  243. blaxel/core/client/models/resource_metrics.py +0 -618
  244. blaxel/core/client/models/resource_metrics_request_total_per_code.py +0 -45
  245. blaxel/core/client/models/resource_metrics_request_total_per_code_previous.py +0 -45
  246. blaxel/core/client/models/resource_metrics_rps_per_code.py +0 -45
  247. blaxel/core/client/models/resource_metrics_rps_per_code_previous.py +0 -45
  248. blaxel/core/client/models/resource_trace.py +0 -97
  249. blaxel/core/client/models/runtime.py +0 -317
  250. blaxel/core/client/models/runtime_configuration.py +0 -45
  251. blaxel/core/client/models/runtime_startup_probe.py +0 -45
  252. blaxel/core/client/models/sandbox_metrics.py +0 -88
  253. blaxel/core/client/models/serverless_config.py +0 -117
  254. blaxel/core/client/models/serverless_config_configuration.py +0 -45
  255. blaxel/core/client/models/start_sandbox.py +0 -98
  256. blaxel/core/client/models/stop_sandbox.py +0 -98
  257. blaxel/core/client/models/store_agent.py +0 -181
  258. blaxel/core/client/models/store_agent_labels.py +0 -45
  259. blaxel/core/client/models/store_configuration.py +0 -156
  260. blaxel/core/client/models/store_configuration_option.py +0 -79
  261. blaxel/core/client/models/time_to_first_token_over_time_metrics.py +0 -87
  262. blaxel/core/client/models/token_rate_metric.py +0 -106
  263. blaxel/core/client/models/token_rate_metrics.py +0 -124
  264. blaxel/core/client/models/token_total_metric.py +0 -112
  265. blaxel/core/client/models/trace_ids_response.py +0 -45
  266. blaxel/core/client/models/websocket_channel.py +0 -97
  267. blaxel/core/client/models/websocket_message.py +0 -106
  268. blaxel/core/sandbox/client/api/root/delete.py +0 -130
  269. blaxel/core/sandbox/client/api/root/get.py +0 -130
  270. blaxel/core/sandbox/client/api/root/options.py +0 -130
  271. blaxel/core/sandbox/client/api/root/patch.py +0 -130
  272. blaxel/core/sandbox/client/api/root/post.py +0 -130
  273. blaxel/core/sandbox/client/api/root/put.py +0 -130
  274. /blaxel/core/{sandbox/client/api/root → client/api/mcphub}/__init__.py +0 -0
  275. {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/WHEEL +0 -0
  276. {blaxel-0.2.34.dist-info → blaxel-0.2.35.dist-info}/licenses/LICENSE +0 -0
@@ -1,10 +1,8 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union
1
+ from typing import TYPE_CHECKING, Any, TypeVar
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
- from ..types import UNSET, Unset
7
-
8
6
  if TYPE_CHECKING:
9
7
  from ..models.integration_connection_spec import IntegrationConnectionSpec
10
8
  from ..models.metadata import Metadata
@@ -15,41 +13,39 @@ T = TypeVar("T", bound="IntegrationConnection")
15
13
 
16
14
  @_attrs_define
17
15
  class IntegrationConnection:
18
- """Integration Connection
19
-
20
- Attributes:
21
- metadata (Union[Unset, Metadata]): Metadata
22
- spec (Union[Unset, IntegrationConnectionSpec]): Integration connection specification
16
+ """Configured connection to an external service (LLM provider, API, SaaS, database) storing credentials and settings
17
+ for use by workspace resources.
18
+
19
+ Attributes:
20
+ metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
21
+ and ownership information
22
+ spec (IntegrationConnectionSpec): Specification defining the integration type, configuration parameters, and
23
+ encrypted credentials
23
24
  """
24
25
 
25
- metadata: Union[Unset, "Metadata"] = UNSET
26
- spec: Union[Unset, "IntegrationConnectionSpec"] = UNSET
26
+ metadata: "Metadata"
27
+ spec: "IntegrationConnectionSpec"
27
28
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
29
 
29
30
  def to_dict(self) -> dict[str, Any]:
30
- metadata: Union[Unset, dict[str, Any]] = UNSET
31
- if (
32
- self.metadata
33
- and not isinstance(self.metadata, Unset)
34
- and not isinstance(self.metadata, dict)
35
- ):
36
- metadata = self.metadata.to_dict()
37
- elif self.metadata and isinstance(self.metadata, dict):
31
+ if type(self.metadata) is dict:
38
32
  metadata = self.metadata
33
+ else:
34
+ metadata = self.metadata.to_dict()
39
35
 
40
- spec: Union[Unset, dict[str, Any]] = UNSET
41
- if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
42
- spec = self.spec.to_dict()
43
- elif self.spec and isinstance(self.spec, dict):
36
+ if type(self.spec) is dict:
44
37
  spec = self.spec
38
+ else:
39
+ spec = self.spec.to_dict()
45
40
 
46
41
  field_dict: dict[str, Any] = {}
47
42
  field_dict.update(self.additional_properties)
48
- field_dict.update({})
49
- if metadata is not UNSET:
50
- field_dict["metadata"] = metadata
51
- if spec is not UNSET:
52
- field_dict["spec"] = spec
43
+ field_dict.update(
44
+ {
45
+ "metadata": metadata,
46
+ "spec": spec,
47
+ }
48
+ )
53
49
 
54
50
  return field_dict
55
51
 
@@ -61,19 +57,9 @@ class IntegrationConnection:
61
57
  if not src_dict:
62
58
  return None
63
59
  d = src_dict.copy()
64
- _metadata = d.pop("metadata", UNSET)
65
- metadata: Union[Unset, Metadata]
66
- if isinstance(_metadata, Unset):
67
- metadata = UNSET
68
- else:
69
- metadata = Metadata.from_dict(_metadata)
60
+ metadata = Metadata.from_dict(d.pop("metadata"))
70
61
 
71
- _spec = d.pop("spec", UNSET)
72
- spec: Union[Unset, IntegrationConnectionSpec]
73
- if isinstance(_spec, Unset):
74
- spec = UNSET
75
- else:
76
- spec = IntegrationConnectionSpec.from_dict(_spec)
62
+ spec = IntegrationConnectionSpec.from_dict(d.pop("spec"))
77
63
 
78
64
  integration_connection = cls(
79
65
  metadata=metadata,
@@ -15,13 +15,16 @@ T = TypeVar("T", bound="IntegrationConnectionSpec")
15
15
 
16
16
  @_attrs_define
17
17
  class IntegrationConnectionSpec:
18
- """Integration connection specification
18
+ """Specification defining the integration type, configuration parameters, and encrypted credentials
19
19
 
20
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
21
+ config (Union[Unset, IntegrationConnectionSpecConfig]): Non-sensitive configuration parameters for the
22
+ integration (e.g., organization ID, region)
23
+ integration (Union[Unset, str]): Integration provider type (e.g., openai, anthropic, github, slack) Example:
24
+ openai.
25
+ sandbox (Union[Unset, bool]): Whether this connection uses sandbox/test credentials instead of production
26
+ secret (Union[Unset, IntegrationConnectionSpecSecret]): Encrypted credentials and API keys for authenticating
27
+ with the external service
25
28
  """
26
29
 
27
30
  config: Union[Unset, "IntegrationConnectionSpecConfig"] = UNSET
@@ -8,7 +8,7 @@ T = TypeVar("T", bound="IntegrationConnectionSpecConfig")
8
8
 
9
9
  @_attrs_define
10
10
  class IntegrationConnectionSpecConfig:
11
- """Additional configuration for the integration"""
11
+ """Non-sensitive configuration parameters for the integration (e.g., organization ID, region)"""
12
12
 
13
13
  additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
14
14
 
@@ -8,7 +8,7 @@ T = TypeVar("T", bound="IntegrationConnectionSpecSecret")
8
8
 
9
9
  @_attrs_define
10
10
  class IntegrationConnectionSpecSecret:
11
- """Integration secret"""
11
+ """Encrypted credentials and API keys for authenticating with the external service"""
12
12
 
13
13
  additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
14
14
 
@@ -1,4 +1,4 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
1
+ from typing import TYPE_CHECKING, Any, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
@@ -6,6 +6,8 @@ from attrs import field as _attrs_field
6
6
  from ..types import UNSET, Unset
7
7
 
8
8
  if TYPE_CHECKING:
9
+ from ..models.integration_endpoint_ignore_models_item import IntegrationEndpointIgnoreModelsItem
10
+ from ..models.integration_endpoint_models_item import IntegrationEndpointModelsItem
9
11
  from ..models.integration_endpoint_token import IntegrationEndpointToken
10
12
 
11
13
 
@@ -18,18 +20,18 @@ class IntegrationEndpoint:
18
20
 
19
21
  Attributes:
20
22
  body (Union[Unset, str]): Integration endpoint body
21
- ignore_models (Union[Unset, list[Any]]): Integration endpoint ignore models
23
+ ignore_models (Union[Unset, list['IntegrationEndpointIgnoreModelsItem']]): Integration endpoint ignore models
22
24
  method (Union[Unset, str]): Integration endpoint method
23
- models (Union[Unset, list[Any]]): Integration endpoint models
25
+ models (Union[Unset, list['IntegrationEndpointModelsItem']]): Integration endpoint models
24
26
  stream_key (Union[Unset, str]): Integration endpoint stream key
25
27
  stream_token (Union[Unset, IntegrationEndpointToken]): Integration endpoint token
26
28
  token (Union[Unset, IntegrationEndpointToken]): Integration endpoint token
27
29
  """
28
30
 
29
31
  body: Union[Unset, str] = UNSET
30
- ignore_models: Union[Unset, list[Any]] = UNSET
32
+ ignore_models: Union[Unset, list["IntegrationEndpointIgnoreModelsItem"]] = UNSET
31
33
  method: Union[Unset, str] = UNSET
32
- models: Union[Unset, list[Any]] = UNSET
34
+ models: Union[Unset, list["IntegrationEndpointModelsItem"]] = UNSET
33
35
  stream_key: Union[Unset, str] = UNSET
34
36
  stream_token: Union[Unset, "IntegrationEndpointToken"] = UNSET
35
37
  token: Union[Unset, "IntegrationEndpointToken"] = UNSET
@@ -38,15 +40,27 @@ class IntegrationEndpoint:
38
40
  def to_dict(self) -> dict[str, Any]:
39
41
  body = self.body
40
42
 
41
- ignore_models: Union[Unset, list[Any]] = UNSET
43
+ ignore_models: Union[Unset, list[dict[str, Any]]] = UNSET
42
44
  if not isinstance(self.ignore_models, Unset):
43
- ignore_models = self.ignore_models
45
+ ignore_models = []
46
+ for ignore_models_item_data in self.ignore_models:
47
+ if type(ignore_models_item_data) is dict:
48
+ ignore_models_item = ignore_models_item_data
49
+ else:
50
+ ignore_models_item = ignore_models_item_data.to_dict()
51
+ ignore_models.append(ignore_models_item)
44
52
 
45
53
  method = self.method
46
54
 
47
- models: Union[Unset, list[Any]] = UNSET
55
+ models: Union[Unset, list[dict[str, Any]]] = UNSET
48
56
  if not isinstance(self.models, Unset):
49
- models = self.models
57
+ models = []
58
+ for models_item_data in self.models:
59
+ if type(models_item_data) is dict:
60
+ models_item = models_item_data
61
+ else:
62
+ models_item = models_item_data.to_dict()
63
+ models.append(models_item)
50
64
 
51
65
  stream_key = self.stream_key
52
66
 
@@ -88,6 +102,10 @@ class IntegrationEndpoint:
88
102
 
89
103
  @classmethod
90
104
  def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
105
+ from ..models.integration_endpoint_ignore_models_item import (
106
+ IntegrationEndpointIgnoreModelsItem,
107
+ )
108
+ from ..models.integration_endpoint_models_item import IntegrationEndpointModelsItem
91
109
  from ..models.integration_endpoint_token import IntegrationEndpointToken
92
110
 
93
111
  if not src_dict:
@@ -95,11 +113,23 @@ class IntegrationEndpoint:
95
113
  d = src_dict.copy()
96
114
  body = d.pop("body", UNSET)
97
115
 
98
- ignore_models = cast(list[Any], d.pop("ignoreModels", d.pop("ignore_models", UNSET)))
116
+ ignore_models = []
117
+ _ignore_models = d.pop("ignoreModels", d.pop("ignore_models", UNSET))
118
+ for ignore_models_item_data in _ignore_models or []:
119
+ ignore_models_item = IntegrationEndpointIgnoreModelsItem.from_dict(
120
+ ignore_models_item_data
121
+ )
122
+
123
+ ignore_models.append(ignore_models_item)
99
124
 
100
125
  method = d.pop("method", UNSET)
101
126
 
102
- models = cast(list[Any], d.pop("models", UNSET))
127
+ models = []
128
+ _models = d.pop("models", UNSET)
129
+ for models_item_data in _models or []:
130
+ models_item = IntegrationEndpointModelsItem.from_dict(models_item_data)
131
+
132
+ models.append(models_item)
103
133
 
104
134
  stream_key = d.pop("streamKey", d.pop("stream_key", UNSET))
105
135
 
@@ -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="IntegrationEndpointIgnoreModelsItem")
7
+
8
+
9
+ @_attrs_define
10
+ class IntegrationEndpointIgnoreModelsItem:
11
+ """ """
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
+ integration_endpoint_ignore_models_item = cls()
27
+
28
+ integration_endpoint_ignore_models_item.additional_properties = d
29
+ return integration_endpoint_ignore_models_item
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
@@ -3,12 +3,12 @@ from typing import Any, TypeVar
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
- T = TypeVar("T", bound="MCPDefinitionEntrypoint")
6
+ T = TypeVar("T", bound="IntegrationEndpointModelsItem")
7
7
 
8
8
 
9
9
  @_attrs_define
10
- class MCPDefinitionEntrypoint:
11
- """Entrypoint of the artifact"""
10
+ class IntegrationEndpointModelsItem:
11
+ """ """
12
12
 
13
13
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
14
14
 
@@ -23,10 +23,10 @@ class MCPDefinitionEntrypoint:
23
23
  if not src_dict:
24
24
  return None
25
25
  d = src_dict.copy()
26
- mcp_definition_entrypoint = cls()
26
+ integration_endpoint_models_item = cls()
27
27
 
28
- mcp_definition_entrypoint.additional_properties = d
29
- return mcp_definition_entrypoint
28
+ integration_endpoint_models_item.additional_properties = d
29
+ return integration_endpoint_models_item
30
30
 
31
31
  @property
32
32
  def additional_keys(self) -> list[str]:
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
+ from ..models.status import Status
6
7
  from ..types import UNSET, Unset
7
8
 
8
9
  if TYPE_CHECKING:
@@ -16,22 +17,35 @@ T = TypeVar("T", bound="Job")
16
17
 
17
18
  @_attrs_define
18
19
  class Job:
19
- """Job
20
-
21
- Attributes:
22
- events (Union[Unset, list['CoreEvent']]): Core events
23
- metadata (Union[Unset, Metadata]): Metadata
24
- spec (Union[Unset, JobSpec]): Job specification
25
- status (Union[Unset, str]): Job status
20
+ """Batch processing job definition for running parallel AI tasks. Jobs can execute multiple tasks concurrently with
21
+ configurable parallelism, retries, and timeouts.
22
+
23
+ Attributes:
24
+ metadata (Metadata): Common metadata fields shared by all Blaxel resources including name, labels, timestamps,
25
+ and ownership information
26
+ spec (JobSpec): Configuration for a batch job including execution parameters, parallelism settings, and
27
+ deployment region
28
+ events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
29
+ status (Union[Unset, Status]): Deployment status of a resource deployed on Blaxel
26
30
  """
27
31
 
32
+ metadata: "Metadata"
33
+ spec: "JobSpec"
28
34
  events: Union[Unset, list["CoreEvent"]] = UNSET
29
- metadata: Union[Unset, "Metadata"] = UNSET
30
- spec: Union[Unset, "JobSpec"] = UNSET
31
- status: Union[Unset, str] = UNSET
35
+ status: Union[Unset, Status] = UNSET
32
36
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
37
 
34
38
  def to_dict(self) -> dict[str, Any]:
39
+ if type(self.metadata) is dict:
40
+ metadata = self.metadata
41
+ else:
42
+ metadata = self.metadata.to_dict()
43
+
44
+ if type(self.spec) is dict:
45
+ spec = self.spec
46
+ else:
47
+ spec = self.spec.to_dict()
48
+
35
49
  events: Union[Unset, list[dict[str, Any]]] = UNSET
36
50
  if not isinstance(self.events, Unset):
37
51
  events = []
@@ -44,33 +58,20 @@ class Job:
44
58
  )
45
59
  events.append(componentsschemas_core_events_item)
46
60
 
47
- metadata: Union[Unset, dict[str, Any]] = UNSET
48
- if (
49
- self.metadata
50
- and not isinstance(self.metadata, Unset)
51
- and not isinstance(self.metadata, dict)
52
- ):
53
- metadata = self.metadata.to_dict()
54
- elif self.metadata and isinstance(self.metadata, dict):
55
- metadata = self.metadata
56
-
57
- spec: Union[Unset, dict[str, Any]] = UNSET
58
- if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
59
- spec = self.spec.to_dict()
60
- elif self.spec and isinstance(self.spec, dict):
61
- spec = self.spec
62
-
63
- status = self.status
61
+ status: Union[Unset, str] = UNSET
62
+ if not isinstance(self.status, Unset):
63
+ status = self.status.value
64
64
 
65
65
  field_dict: dict[str, Any] = {}
66
66
  field_dict.update(self.additional_properties)
67
- field_dict.update({})
67
+ field_dict.update(
68
+ {
69
+ "metadata": metadata,
70
+ "spec": spec,
71
+ }
72
+ )
68
73
  if events is not UNSET:
69
74
  field_dict["events"] = events
70
- if metadata is not UNSET:
71
- field_dict["metadata"] = metadata
72
- if spec is not UNSET:
73
- field_dict["spec"] = spec
74
75
  if status is not UNSET:
75
76
  field_dict["status"] = status
76
77
 
@@ -85,6 +86,10 @@ class Job:
85
86
  if not src_dict:
86
87
  return None
87
88
  d = src_dict.copy()
89
+ metadata = Metadata.from_dict(d.pop("metadata"))
90
+
91
+ spec = JobSpec.from_dict(d.pop("spec"))
92
+
88
93
  events = []
89
94
  _events = d.pop("events", UNSET)
90
95
  for componentsschemas_core_events_item_data in _events or []:
@@ -94,26 +99,17 @@ class Job:
94
99
 
95
100
  events.append(componentsschemas_core_events_item)
96
101
 
97
- _metadata = d.pop("metadata", UNSET)
98
- metadata: Union[Unset, Metadata]
99
- if isinstance(_metadata, Unset):
100
- metadata = UNSET
102
+ _status = d.pop("status", UNSET)
103
+ status: Union[Unset, Status]
104
+ if isinstance(_status, Unset):
105
+ status = UNSET
101
106
  else:
102
- metadata = Metadata.from_dict(_metadata)
103
-
104
- _spec = d.pop("spec", UNSET)
105
- spec: Union[Unset, JobSpec]
106
- if isinstance(_spec, Unset):
107
- spec = UNSET
108
- else:
109
- spec = JobSpec.from_dict(_spec)
110
-
111
- status = d.pop("status", UNSET)
107
+ status = Status(_status)
112
108
 
113
109
  job = cls(
114
- events=events,
115
110
  metadata=metadata,
116
111
  spec=spec,
112
+ events=events,
117
113
  status=status,
118
114
  )
119
115
 
@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
+ from ..models.job_execution_status import JobExecutionStatus
6
7
  from ..types import UNSET, Unset
7
8
 
8
9
  if TYPE_CHECKING:
@@ -20,36 +21,30 @@ class JobExecution:
20
21
  """Job execution
21
22
 
22
23
  Attributes:
23
- metadata (Union[Unset, JobExecutionMetadata]): Job execution metadata
24
- spec (Union[Unset, JobExecutionSpec]): Job execution specification
24
+ metadata (JobExecutionMetadata): Job execution metadata
25
+ spec (JobExecutionSpec): Job execution specification
25
26
  stats (Union[Unset, JobExecutionStats]): Job execution statistics
26
- status (Union[Unset, str]): Job execution status
27
+ status (Union[Unset, JobExecutionStatus]): Job execution status
27
28
  tasks (Union[Unset, list['JobExecutionTask']]): List of execution tasks
28
29
  """
29
30
 
30
- metadata: Union[Unset, "JobExecutionMetadata"] = UNSET
31
- spec: Union[Unset, "JobExecutionSpec"] = UNSET
31
+ metadata: "JobExecutionMetadata"
32
+ spec: "JobExecutionSpec"
32
33
  stats: Union[Unset, "JobExecutionStats"] = UNSET
33
- status: Union[Unset, str] = UNSET
34
+ status: Union[Unset, JobExecutionStatus] = UNSET
34
35
  tasks: Union[Unset, list["JobExecutionTask"]] = UNSET
35
36
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
36
37
 
37
38
  def to_dict(self) -> dict[str, Any]:
38
- metadata: Union[Unset, dict[str, Any]] = UNSET
39
- if (
40
- self.metadata
41
- and not isinstance(self.metadata, Unset)
42
- and not isinstance(self.metadata, dict)
43
- ):
44
- metadata = self.metadata.to_dict()
45
- elif self.metadata and isinstance(self.metadata, dict):
39
+ if type(self.metadata) is dict:
46
40
  metadata = self.metadata
41
+ else:
42
+ metadata = self.metadata.to_dict()
47
43
 
48
- spec: Union[Unset, dict[str, Any]] = UNSET
49
- if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
50
- spec = self.spec.to_dict()
51
- elif self.spec and isinstance(self.spec, dict):
44
+ if type(self.spec) is dict:
52
45
  spec = self.spec
46
+ else:
47
+ spec = self.spec.to_dict()
53
48
 
54
49
  stats: Union[Unset, dict[str, Any]] = UNSET
55
50
  if self.stats and not isinstance(self.stats, Unset) and not isinstance(self.stats, dict):
@@ -57,7 +52,9 @@ class JobExecution:
57
52
  elif self.stats and isinstance(self.stats, dict):
58
53
  stats = self.stats
59
54
 
60
- status = self.status
55
+ status: Union[Unset, str] = UNSET
56
+ if not isinstance(self.status, Unset):
57
+ status = self.status.value
61
58
 
62
59
  tasks: Union[Unset, list[dict[str, Any]]] = UNSET
63
60
  if not isinstance(self.tasks, Unset):
@@ -71,11 +68,12 @@ class JobExecution:
71
68
 
72
69
  field_dict: dict[str, Any] = {}
73
70
  field_dict.update(self.additional_properties)
74
- field_dict.update({})
75
- if metadata is not UNSET:
76
- field_dict["metadata"] = metadata
77
- if spec is not UNSET:
78
- field_dict["spec"] = spec
71
+ field_dict.update(
72
+ {
73
+ "metadata": metadata,
74
+ "spec": spec,
75
+ }
76
+ )
79
77
  if stats is not UNSET:
80
78
  field_dict["stats"] = stats
81
79
  if status is not UNSET:
@@ -95,19 +93,9 @@ class JobExecution:
95
93
  if not src_dict:
96
94
  return None
97
95
  d = src_dict.copy()
98
- _metadata = d.pop("metadata", UNSET)
99
- metadata: Union[Unset, JobExecutionMetadata]
100
- if isinstance(_metadata, Unset):
101
- metadata = UNSET
102
- else:
103
- metadata = JobExecutionMetadata.from_dict(_metadata)
96
+ metadata = JobExecutionMetadata.from_dict(d.pop("metadata"))
104
97
 
105
- _spec = d.pop("spec", UNSET)
106
- spec: Union[Unset, JobExecutionSpec]
107
- if isinstance(_spec, Unset):
108
- spec = UNSET
109
- else:
110
- spec = JobExecutionSpec.from_dict(_spec)
98
+ spec = JobExecutionSpec.from_dict(d.pop("spec"))
111
99
 
112
100
  _stats = d.pop("stats", UNSET)
113
101
  stats: Union[Unset, JobExecutionStats]
@@ -116,7 +104,12 @@ class JobExecution:
116
104
  else:
117
105
  stats = JobExecutionStats.from_dict(_stats)
118
106
 
119
- status = d.pop("status", UNSET)
107
+ _status = d.pop("status", UNSET)
108
+ status: Union[Unset, JobExecutionStatus]
109
+ if isinstance(_status, Unset):
110
+ status = UNSET
111
+ else:
112
+ status = JobExecutionStatus(_status)
120
113
 
121
114
  tasks = []
122
115
  _tasks = d.pop("tasks", UNSET)
@@ -18,11 +18,11 @@ class JobExecutionMetadata:
18
18
  created_at (Union[Unset, str]): Creation timestamp
19
19
  deleted_at (Union[Unset, str]): Deletion timestamp
20
20
  expired_at (Union[Unset, str]): Expiration timestamp
21
- id (Union[Unset, str]): Execution ID
22
- job (Union[Unset, str]): Job name
21
+ id (Union[Unset, str]): Execution ID Example: exec-abc123.
22
+ job (Union[Unset, str]): Job name Example: data-processing-job.
23
23
  started_at (Union[Unset, str]): Start timestamp
24
24
  updated_at (Union[Unset, str]): Last update timestamp
25
- workspace (Union[Unset, str]): Workspace ID
25
+ workspace (Union[Unset, str]): Workspace ID Example: my-workspace.
26
26
  """
27
27
 
28
28
  cluster: Union[Unset, str] = UNSET
@@ -17,9 +17,9 @@ class JobExecutionSpec:
17
17
  """Job execution specification
18
18
 
19
19
  Attributes:
20
- parallelism (Union[Unset, int]): Number of parallel tasks
20
+ parallelism (Union[Unset, int]): Number of parallel tasks Example: 5.
21
21
  tasks (Union[Unset, list['JobExecutionTask']]): List of execution tasks
22
- timeout (Union[Unset, int]): Job timeout in seconds (captured at execution creation time)
22
+ timeout (Union[Unset, int]): Job timeout in seconds (captured at execution creation time) Example: 3600.
23
23
  """
24
24
 
25
25
  parallelism: Union[Unset, int] = UNSET
@@ -14,11 +14,11 @@ class JobExecutionStats:
14
14
 
15
15
  Attributes:
16
16
  cancelled (Union[Unset, int]): Number of cancelled tasks
17
- failure (Union[Unset, int]): Number of failed tasks
18
- retried (Union[Unset, int]): Number of retried tasks
19
- running (Union[Unset, int]): Number of running tasks
20
- success (Union[Unset, int]): Number of successful tasks
21
- total (Union[Unset, int]): Total number of tasks
17
+ failure (Union[Unset, int]): Number of failed tasks Example: 1.
18
+ retried (Union[Unset, int]): Number of retried tasks Example: 2.
19
+ running (Union[Unset, int]): Number of running tasks Example: 1.
20
+ success (Union[Unset, int]): Number of successful tasks Example: 8.
21
+ total (Union[Unset, int]): Total number of tasks Example: 10.
22
22
  """
23
23
 
24
24
  cancelled: Union[Unset, int] = UNSET
@@ -0,0 +1,24 @@
1
+ from enum import Enum
2
+
3
+
4
+ class JobExecutionStatus(str, Enum):
5
+ CANCELLED = "cancelled"
6
+ CANCELLING = "cancelling"
7
+ FAILED = "failed"
8
+ PENDING = "pending"
9
+ QUEUED = "queued"
10
+ RUNNING = "running"
11
+ SUCCEEDED = "succeeded"
12
+ TIMEOUT = "timeout"
13
+
14
+ def __str__(self) -> str:
15
+ return str(self.value)
16
+
17
+ @classmethod
18
+ def _missing_(cls, value: object) -> "JobExecutionStatus | None":
19
+ if isinstance(value, str):
20
+ upper_value = value.upper()
21
+ for member in cls:
22
+ if member.value.upper() == upper_value:
23
+ return member
24
+ return None