blaxel 0.1.21rc69__py3-none-any.whl → 0.2.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.
Files changed (421) hide show
  1. blaxel/__init__.py +6 -3
  2. blaxel/core/__init__.py +44 -0
  3. blaxel/core/agents/__init__.py +115 -0
  4. blaxel/{authentication → core/authentication}/apikey.py +1 -0
  5. blaxel/{authentication → core/authentication}/clientcredentials.py +6 -2
  6. blaxel/{client → core/client}/api/agents/create_agent.py +1 -1
  7. blaxel/{client → core/client}/api/agents/update_agent.py +1 -1
  8. blaxel/{client → core/client}/api/compute/create_sandbox.py +1 -1
  9. blaxel/{client → core/client}/api/compute/create_sandbox_preview.py +1 -1
  10. blaxel/{client → core/client}/api/compute/create_sandbox_preview_token.py +1 -1
  11. blaxel/{client → core/client}/api/compute/update_sandbox.py +1 -1
  12. blaxel/{client → core/client}/api/compute/update_sandbox_preview.py +1 -1
  13. blaxel/{client → core/client}/api/functions/create_function.py +1 -1
  14. blaxel/{client → core/client}/api/functions/update_function.py +1 -1
  15. blaxel/{client → core/client}/api/integrations/create_integration_connection.py +1 -1
  16. blaxel/{client → core/client}/api/integrations/update_integration_connection.py +1 -1
  17. blaxel/{client → core/client}/api/jobs/create_job.py +1 -1
  18. blaxel/{client → core/client}/api/jobs/update_job.py +1 -1
  19. blaxel/{client → core/client}/api/knowledgebases/create_knowledgebase.py +1 -1
  20. blaxel/{client → core/client}/api/knowledgebases/update_knowledgebase.py +1 -1
  21. blaxel/{client → core/client}/api/models/create_model.py +1 -1
  22. blaxel/{client → core/client}/api/models/update_model.py +1 -1
  23. blaxel/{client → core/client}/api/policies/create_policy.py +1 -1
  24. blaxel/{client → core/client}/api/policies/update_policy.py +1 -1
  25. blaxel/{client → core/client}/api/service_accounts/create_api_key_for_service_account.py +1 -1
  26. blaxel/{client → core/client}/api/service_accounts/create_workspace_service_account.py +1 -1
  27. blaxel/{client → core/client}/api/service_accounts/update_workspace_service_account.py +1 -1
  28. blaxel/{client → core/client}/api/workspaces/check_workspace_availability.py +1 -1
  29. blaxel/{client → core/client}/api/workspaces/create_worspace.py +1 -1
  30. blaxel/{client → core/client}/api/workspaces/invite_workspace_user.py +1 -1
  31. blaxel/{client → core/client}/api/workspaces/update_workspace.py +1 -1
  32. blaxel/{client → core/client}/api/workspaces/update_workspace_user_role.py +1 -1
  33. blaxel/{client → core/client}/models/__init__.py +18 -0
  34. blaxel/{client → core/client}/models/agent.py +1 -1
  35. blaxel/{client → core/client}/models/agent_spec.py +2 -2
  36. blaxel/core/client/models/billable_time_metric.py +70 -0
  37. blaxel/{client → core/client}/models/core_spec.py +1 -1
  38. blaxel/{client → core/client}/models/function.py +1 -1
  39. blaxel/{client → core/client}/models/function_schema_properties.py +1 -1
  40. blaxel/{client → core/client}/models/function_spec.py +2 -2
  41. blaxel/{client → core/client}/models/integration.py +2 -2
  42. blaxel/{client → core/client}/models/integration_endpoints.py +1 -1
  43. blaxel/{client → core/client}/models/job.py +1 -1
  44. blaxel/{client → core/client}/models/job_spec.py +1 -1
  45. blaxel/{client → core/client}/models/jobs_chart_value.py +2 -2
  46. blaxel/{client → core/client}/models/knowledgebase.py +1 -1
  47. blaxel/{client → core/client}/models/location_response.py +1 -1
  48. blaxel/core/client/models/logs_response.py +63 -0
  49. blaxel/core/client/models/logs_response_data.py +99 -0
  50. blaxel/core/client/models/memory_allocation_by_name.py +70 -0
  51. blaxel/{client → core/client}/models/metadata.py +9 -0
  52. blaxel/{client → core/client}/models/model.py +1 -1
  53. blaxel/{client → core/client}/models/model_spec.py +1 -1
  54. blaxel/{client → core/client}/models/policy_spec.py +2 -2
  55. blaxel/core/client/models/resource.py +79 -0
  56. blaxel/core/client/models/resource_log_chart.py +133 -0
  57. blaxel/core/client/models/resource_log_response.py +83 -0
  58. blaxel/{client → core/client}/models/resource_metrics.py +27 -3
  59. blaxel/core/client/models/resource_trace.py +97 -0
  60. blaxel/{client → core/client}/models/runtime.py +1 -1
  61. blaxel/{client → core/client}/models/sandbox.py +1 -1
  62. blaxel/{client → core/client}/models/sandbox_definition.py +1 -1
  63. blaxel/{client → core/client}/models/sandbox_spec.py +1 -1
  64. blaxel/{client → core/client}/models/store_agent.py +1 -1
  65. blaxel/{client → core/client}/models/store_configuration.py +1 -1
  66. blaxel/{client → core/client}/models/template.py +1 -1
  67. blaxel/core/client/models/websocket_message.py +106 -0
  68. blaxel/core/common/__init__.py +6 -0
  69. blaxel/core/common/autoload.py +21 -0
  70. blaxel/{common → core/common}/internal.py +34 -62
  71. blaxel/core/common/logger.py +131 -0
  72. blaxel/{jobs → core/jobs}/__init__.py +41 -61
  73. blaxel/core/mcp/__init__.py +4 -0
  74. blaxel/{mcp → core/mcp}/client.py +26 -15
  75. blaxel/{mcp → core/mcp}/server.py +12 -37
  76. blaxel/core/models/__init__.py +52 -0
  77. blaxel/core/sandbox/__init__.py +29 -0
  78. blaxel/core/sandbox/action.py +79 -0
  79. blaxel/{sandbox → core/sandbox}/client/api/filesystem/put_filesystem_path.py +1 -1
  80. blaxel/{sandbox → core/sandbox}/client/api/network/post_network_process_pid_monitor.py +1 -1
  81. blaxel/core/sandbox/client/api/process/__init__.py +0 -0
  82. blaxel/{sandbox → core/sandbox}/client/api/process/delete_process_identifier_kill.py +0 -26
  83. blaxel/{sandbox → core/sandbox}/client/api/process/post_process.py +1 -1
  84. blaxel/{sandbox → core/sandbox}/client/models/__init__.py +2 -2
  85. blaxel/{sandbox → core/sandbox}/client/models/directory.py +2 -2
  86. blaxel/{sandbox → core/sandbox}/client/models/process_request.py +25 -1
  87. blaxel/core/sandbox/client/models/process_request_env.py +49 -0
  88. blaxel/core/sandbox/filesystem.py +280 -0
  89. blaxel/core/sandbox/network.py +10 -0
  90. blaxel/{sandbox → core/sandbox}/preview.py +45 -17
  91. blaxel/core/sandbox/process.py +159 -0
  92. blaxel/{sandbox → core/sandbox}/sandbox.py +62 -5
  93. blaxel/core/sandbox/session.py +124 -0
  94. blaxel/core/sandbox/types.py +103 -0
  95. blaxel/{tools → core/tools}/__init__.py +63 -91
  96. blaxel/crewai/__init__.py +4 -0
  97. blaxel/{models/crewai.py → crewai/model.py} +4 -2
  98. blaxel/crewai/py.typed +0 -0
  99. blaxel/crewai/tools.py +26 -0
  100. blaxel/googleadk/__init__.py +4 -0
  101. blaxel/{models/googleadk.py → googleadk/model.py} +8 -2
  102. blaxel/googleadk/py.typed +0 -0
  103. blaxel/googleadk/tools.py +72 -0
  104. blaxel/langgraph/__init__.py +4 -0
  105. blaxel/{models/langchain.py → langgraph/model.py} +8 -4
  106. blaxel/langgraph/py.typed +0 -0
  107. blaxel/{tools/langchain.py → langgraph/tools.py} +7 -3
  108. blaxel/livekit/__init__.py +4 -0
  109. blaxel/{models/livekit.py → livekit/model.py} +7 -1
  110. blaxel/livekit/py.typed +0 -0
  111. blaxel/{tools/livekit.py → livekit/tools.py} +8 -1
  112. blaxel/llamaindex/__init__.py +4 -0
  113. blaxel/{models/llamaindex.py → llamaindex/model.py} +6 -3
  114. blaxel/llamaindex/py.typed +0 -0
  115. blaxel/{tools/llamaindex.py → llamaindex/tools.py} +7 -4
  116. blaxel/openai/__init__.py +4 -0
  117. blaxel/{models/openai.py → openai/model.py} +4 -2
  118. blaxel/openai/py.typed +0 -0
  119. blaxel/{tools/openai.py → openai/tools.py} +7 -3
  120. blaxel/pydantic/__init__.py +4 -0
  121. blaxel/{models/custom/pydantic → pydantic/custom}/gemini.py +0 -1
  122. blaxel/{models/pydantic.py → pydantic/model.py} +6 -4
  123. blaxel/pydantic/py.typed +0 -0
  124. blaxel/{tools/pydantic.py → pydantic/tools.py} +6 -3
  125. blaxel/telemetry/__init__.py +6 -0
  126. blaxel/telemetry/instrumentation/blaxel_core.py +125 -0
  127. blaxel/telemetry/instrumentation/blaxel_langgraph.py +99 -0
  128. blaxel/telemetry/instrumentation/blaxel_langgraph_gemini.py +346 -0
  129. blaxel/telemetry/instrumentation/blaxel_llamaindex.py +85 -0
  130. blaxel/telemetry/instrumentation/map.py +62 -0
  131. blaxel/telemetry/instrumentation/utils.py +74 -0
  132. blaxel/{common → telemetry/log}/logger.py +6 -12
  133. blaxel/{instrumentation → telemetry}/manager.py +20 -12
  134. blaxel/telemetry/py.typed +0 -0
  135. blaxel/{instrumentation → telemetry}/span.py +12 -1
  136. blaxel-0.2.0.dist-info/METADATA +224 -0
  137. blaxel-0.2.0.dist-info/RECORD +408 -0
  138. blaxel/agents/__init__.py +0 -135
  139. blaxel/common/autoload.py +0 -9
  140. blaxel/instrumentation/map.py +0 -49
  141. blaxel/mcp/__init__.py +0 -3
  142. blaxel/models/__init__.py +0 -104
  143. blaxel/sandbox/base.py +0 -68
  144. blaxel/sandbox/client/models/process_kill_request.py +0 -60
  145. blaxel/sandbox/filesystem.py +0 -104
  146. blaxel/sandbox/process.py +0 -56
  147. blaxel/tools/crewai.py +0 -22
  148. blaxel/tools/googleadk.py +0 -66
  149. blaxel-0.1.21rc69.dist-info/METADATA +0 -169
  150. blaxel-0.1.21rc69.dist-info/RECORD +0 -370
  151. /blaxel/{authentication → core/authentication}/__init__.py +0 -0
  152. /blaxel/{authentication → core/authentication}/devicemode.py +0 -0
  153. /blaxel/{authentication → core/authentication}/oauth.py +0 -0
  154. /blaxel/{authentication → core/authentication}/types.py +0 -0
  155. /blaxel/{cache → core/cache}/__init__.py +0 -0
  156. /blaxel/{cache → core/cache}/cache.py +0 -0
  157. /blaxel/{client → core/client}/__init__.py +0 -0
  158. /blaxel/{client → core/client}/api/__init__.py +0 -0
  159. /blaxel/{client → core/client}/api/agents/__init__.py +0 -0
  160. /blaxel/{client → core/client}/api/agents/delete_agent.py +0 -0
  161. /blaxel/{client → core/client}/api/agents/get_agent.py +0 -0
  162. /blaxel/{client → core/client}/api/agents/list_agent_revisions.py +0 -0
  163. /blaxel/{client → core/client}/api/agents/list_agents.py +0 -0
  164. /blaxel/{client → core/client}/api/compute/__init__.py +0 -0
  165. /blaxel/{client → core/client}/api/compute/delete_sandbox.py +0 -0
  166. /blaxel/{client → core/client}/api/compute/delete_sandbox_preview.py +0 -0
  167. /blaxel/{client → core/client}/api/compute/delete_sandbox_preview_token.py +0 -0
  168. /blaxel/{client → core/client}/api/compute/get_sandbox.py +0 -0
  169. /blaxel/{client → core/client}/api/compute/get_sandbox_preview.py +0 -0
  170. /blaxel/{client → core/client}/api/compute/list_sandbox_preview_tokens.py +0 -0
  171. /blaxel/{client → core/client}/api/compute/list_sandbox_previews.py +0 -0
  172. /blaxel/{client → core/client}/api/compute/list_sandboxes.py +0 -0
  173. /blaxel/{client → core/client}/api/compute/start_sandbox.py +0 -0
  174. /blaxel/{client → core/client}/api/compute/stop_sandbox.py +0 -0
  175. /blaxel/{client → core/client}/api/configurations/__init__.py +0 -0
  176. /blaxel/{client → core/client}/api/configurations/get_configuration.py +0 -0
  177. /blaxel/{client → core/client}/api/default/__init__.py +0 -0
  178. /blaxel/{client → core/client}/api/default/get_template.py +0 -0
  179. /blaxel/{client → core/client}/api/default/list_mcp_hub_definitions.py +0 -0
  180. /blaxel/{client → core/client}/api/default/list_sandbox_hub_definitions.py +0 -0
  181. /blaxel/{client → core/client}/api/functions/__init__.py +0 -0
  182. /blaxel/{client → core/client}/api/functions/delete_function.py +0 -0
  183. /blaxel/{client → core/client}/api/functions/get_function.py +0 -0
  184. /blaxel/{client → core/client}/api/functions/list_function_revisions.py +0 -0
  185. /blaxel/{client → core/client}/api/functions/list_functions.py +0 -0
  186. /blaxel/{client → core/client}/api/integrations/__init__.py +0 -0
  187. /blaxel/{client → core/client}/api/integrations/delete_integration_connection.py +0 -0
  188. /blaxel/{client → core/client}/api/integrations/get_integration.py +0 -0
  189. /blaxel/{client → core/client}/api/integrations/get_integration_connection.py +0 -0
  190. /blaxel/{client → core/client}/api/integrations/get_integration_connection_model.py +0 -0
  191. /blaxel/{client → core/client}/api/integrations/get_integration_connection_model_endpoint_configurations.py +0 -0
  192. /blaxel/{client → core/client}/api/integrations/list_integration_connection_models.py +0 -0
  193. /blaxel/{client → core/client}/api/integrations/list_integration_connections.py +0 -0
  194. /blaxel/{client → core/client}/api/invitations/__init__.py +0 -0
  195. /blaxel/{client → core/client}/api/invitations/list_all_pending_invitations.py +0 -0
  196. /blaxel/{client → core/client}/api/jobs/__init__.py +0 -0
  197. /blaxel/{client → core/client}/api/jobs/delete_job.py +0 -0
  198. /blaxel/{client → core/client}/api/jobs/get_job.py +0 -0
  199. /blaxel/{client → core/client}/api/jobs/list_job_revisions.py +0 -0
  200. /blaxel/{client → core/client}/api/jobs/list_jobs.py +0 -0
  201. /blaxel/{client → core/client}/api/knowledgebases/__init__.py +0 -0
  202. /blaxel/{client → core/client}/api/knowledgebases/delete_knowledgebase.py +0 -0
  203. /blaxel/{client → core/client}/api/knowledgebases/get_knowledgebase.py +0 -0
  204. /blaxel/{client → core/client}/api/knowledgebases/list_knowledgebase_revisions.py +0 -0
  205. /blaxel/{client → core/client}/api/knowledgebases/list_knowledgebases.py +0 -0
  206. /blaxel/{client → core/client}/api/locations/__init__.py +0 -0
  207. /blaxel/{client → core/client}/api/locations/list_locations.py +0 -0
  208. /blaxel/{client → core/client}/api/models/__init__.py +0 -0
  209. /blaxel/{client → core/client}/api/models/delete_model.py +0 -0
  210. /blaxel/{client → core/client}/api/models/get_model.py +0 -0
  211. /blaxel/{client → core/client}/api/models/list_model_revisions.py +0 -0
  212. /blaxel/{client → core/client}/api/models/list_models.py +0 -0
  213. /blaxel/{client → core/client}/api/policies/__init__.py +0 -0
  214. /blaxel/{client → core/client}/api/policies/delete_policy.py +0 -0
  215. /blaxel/{client → core/client}/api/policies/get_policy.py +0 -0
  216. /blaxel/{client → core/client}/api/policies/list_policies.py +0 -0
  217. /blaxel/{client → core/client}/api/privateclusters/__init__.py +0 -0
  218. /blaxel/{client → core/client}/api/privateclusters/create_private_cluster.py +0 -0
  219. /blaxel/{client → core/client}/api/privateclusters/delete_private_cluster.py +0 -0
  220. /blaxel/{client → core/client}/api/privateclusters/get_private_cluster.py +0 -0
  221. /blaxel/{client → core/client}/api/privateclusters/get_private_cluster_health.py +0 -0
  222. /blaxel/{client → core/client}/api/privateclusters/list_private_clusters.py +0 -0
  223. /blaxel/{client → core/client}/api/privateclusters/update_private_cluster.py +0 -0
  224. /blaxel/{client → core/client}/api/privateclusters/update_private_cluster_health.py +0 -0
  225. /blaxel/{client → core/client}/api/service_accounts/__init__.py +0 -0
  226. /blaxel/{client → core/client}/api/service_accounts/delete_api_key_for_service_account.py +0 -0
  227. /blaxel/{client → core/client}/api/service_accounts/delete_workspace_service_account.py +0 -0
  228. /blaxel/{client → core/client}/api/service_accounts/get_workspace_service_accounts.py +0 -0
  229. /blaxel/{client → core/client}/api/service_accounts/list_api_keys_for_service_account.py +0 -0
  230. /blaxel/{client → core/client}/api/templates/__init__.py +0 -0
  231. /blaxel/{client → core/client}/api/templates/list_templates.py +0 -0
  232. /blaxel/{client → core/client}/api/workspaces/__init__.py +0 -0
  233. /blaxel/{client → core/client}/api/workspaces/accept_workspace_invitation.py +0 -0
  234. /blaxel/{client → core/client}/api/workspaces/decline_workspace_invitation.py +0 -0
  235. /blaxel/{client → core/client}/api/workspaces/delete_workspace.py +0 -0
  236. /blaxel/{client → core/client}/api/workspaces/get_workspace.py +0 -0
  237. /blaxel/{client → core/client}/api/workspaces/leave_workspace.py +0 -0
  238. /blaxel/{client → core/client}/api/workspaces/list_workspace_users.py +0 -0
  239. /blaxel/{client → core/client}/api/workspaces/list_workspaces.py +0 -0
  240. /blaxel/{client → core/client}/api/workspaces/remove_workspace_user.py +0 -0
  241. /blaxel/{client → core/client}/client.py +0 -0
  242. /blaxel/{client → core/client}/errors.py +0 -0
  243. /blaxel/{client → core/client}/models/acl.py +0 -0
  244. /blaxel/{client → core/client}/models/api_key.py +0 -0
  245. /blaxel/{client → core/client}/models/check_workspace_availability_body.py +0 -0
  246. /blaxel/{client → core/client}/models/configuration.py +0 -0
  247. /blaxel/{client → core/client}/models/continent.py +0 -0
  248. /blaxel/{client → core/client}/models/core_event.py +0 -0
  249. /blaxel/{client → core/client}/models/core_spec_configurations.py +0 -0
  250. /blaxel/{client → core/client}/models/country.py +0 -0
  251. /blaxel/{client → core/client}/models/create_api_key_for_service_account_body.py +0 -0
  252. /blaxel/{client → core/client}/models/create_workspace_service_account_body.py +0 -0
  253. /blaxel/{client → core/client}/models/create_workspace_service_account_response_200.py +0 -0
  254. /blaxel/{client → core/client}/models/delete_sandbox_preview_token_response_200.py +0 -0
  255. /blaxel/{client → core/client}/models/delete_workspace_service_account_response_200.py +0 -0
  256. /blaxel/{client → core/client}/models/entrypoint.py +0 -0
  257. /blaxel/{client → core/client}/models/entrypoint_env.py +0 -0
  258. /blaxel/{client → core/client}/models/flavor.py +0 -0
  259. /blaxel/{client → core/client}/models/form.py +0 -0
  260. /blaxel/{client → core/client}/models/form_config.py +0 -0
  261. /blaxel/{client → core/client}/models/form_oauth.py +0 -0
  262. /blaxel/{client → core/client}/models/form_secrets.py +0 -0
  263. /blaxel/{client → core/client}/models/function_kit.py +0 -0
  264. /blaxel/{client → core/client}/models/function_schema.py +0 -0
  265. /blaxel/{client → core/client}/models/function_schema_not.py +0 -0
  266. /blaxel/{client → core/client}/models/function_schema_or_bool.py +0 -0
  267. /blaxel/{client → core/client}/models/get_workspace_service_accounts_response_200_item.py +0 -0
  268. /blaxel/{client → core/client}/models/histogram_bucket.py +0 -0
  269. /blaxel/{client → core/client}/models/histogram_stats.py +0 -0
  270. /blaxel/{client → core/client}/models/integration_additional_infos.py +0 -0
  271. /blaxel/{client → core/client}/models/integration_connection.py +0 -0
  272. /blaxel/{client → core/client}/models/integration_connection_spec.py +0 -0
  273. /blaxel/{client → core/client}/models/integration_connection_spec_config.py +0 -0
  274. /blaxel/{client → core/client}/models/integration_connection_spec_secret.py +0 -0
  275. /blaxel/{client → core/client}/models/integration_endpoint.py +0 -0
  276. /blaxel/{client → core/client}/models/integration_endpoint_token.py +0 -0
  277. /blaxel/{client → core/client}/models/integration_headers.py +0 -0
  278. /blaxel/{client → core/client}/models/integration_model.py +0 -0
  279. /blaxel/{client → core/client}/models/integration_organization.py +0 -0
  280. /blaxel/{client → core/client}/models/integration_query_params.py +0 -0
  281. /blaxel/{client → core/client}/models/integration_repository.py +0 -0
  282. /blaxel/{client → core/client}/models/invite_workspace_user_body.py +0 -0
  283. /blaxel/{client → core/client}/models/job_execution_config.py +0 -0
  284. /blaxel/{client → core/client}/models/job_metrics.py +0 -0
  285. /blaxel/{client → core/client}/models/job_metrics_executions_chart.py +0 -0
  286. /blaxel/{client → core/client}/models/job_metrics_executions_total.py +0 -0
  287. /blaxel/{client → core/client}/models/job_metrics_tasks_chart.py +0 -0
  288. /blaxel/{client → core/client}/models/job_metrics_tasks_total.py +0 -0
  289. /blaxel/{client → core/client}/models/jobs_chart.py +0 -0
  290. /blaxel/{client → core/client}/models/jobs_executions.py +0 -0
  291. /blaxel/{client → core/client}/models/jobs_network_chart.py +0 -0
  292. /blaxel/{client → core/client}/models/jobs_success_failed_chart.py +0 -0
  293. /blaxel/{client → core/client}/models/jobs_tasks.py +0 -0
  294. /blaxel/{client → core/client}/models/jobs_total.py +0 -0
  295. /blaxel/{client → core/client}/models/knowledgebase_spec.py +0 -0
  296. /blaxel/{client → core/client}/models/knowledgebase_spec_options.py +0 -0
  297. /blaxel/{client → core/client}/models/last_n_requests_metric.py +0 -0
  298. /blaxel/{client → core/client}/models/latency_metric.py +0 -0
  299. /blaxel/{client → core/client}/models/mcp_definition.py +0 -0
  300. /blaxel/{client → core/client}/models/mcp_definition_entrypoint.py +0 -0
  301. /blaxel/{client → core/client}/models/mcp_definition_form.py +0 -0
  302. /blaxel/{client → core/client}/models/memory_allocation_metric.py +0 -0
  303. /blaxel/{client → core/client}/models/metadata_labels.py +0 -0
  304. /blaxel/{client → core/client}/models/metric.py +0 -0
  305. /blaxel/{client → core/client}/models/metrics.py +0 -0
  306. /blaxel/{client → core/client}/models/metrics_models.py +0 -0
  307. /blaxel/{client → core/client}/models/metrics_request_total_per_code.py +0 -0
  308. /blaxel/{client → core/client}/models/metrics_rps_per_code.py +0 -0
  309. /blaxel/{client → core/client}/models/model_private_cluster.py +0 -0
  310. /blaxel/{client → core/client}/models/o_auth.py +0 -0
  311. /blaxel/{client → core/client}/models/owner_fields.py +0 -0
  312. /blaxel/{client → core/client}/models/pending_invitation.py +0 -0
  313. /blaxel/{client → core/client}/models/pending_invitation_accept.py +0 -0
  314. /blaxel/{client → core/client}/models/pending_invitation_render.py +0 -0
  315. /blaxel/{client → core/client}/models/pending_invitation_render_invited_by.py +0 -0
  316. /blaxel/{client → core/client}/models/pending_invitation_render_workspace.py +0 -0
  317. /blaxel/{client → core/client}/models/pending_invitation_workspace_details.py +0 -0
  318. /blaxel/{client → core/client}/models/pod_template_spec.py +0 -0
  319. /blaxel/{client → core/client}/models/policy.py +0 -0
  320. /blaxel/{client → core/client}/models/policy_location.py +0 -0
  321. /blaxel/{client → core/client}/models/policy_max_tokens.py +0 -0
  322. /blaxel/{client → core/client}/models/port.py +0 -0
  323. /blaxel/{client → core/client}/models/preview.py +0 -0
  324. /blaxel/{client → core/client}/models/preview_metadata.py +0 -0
  325. /blaxel/{client → core/client}/models/preview_spec.py +0 -0
  326. /blaxel/{client → core/client}/models/preview_spec_request_headers.py +0 -0
  327. /blaxel/{client → core/client}/models/preview_spec_response_headers.py +0 -0
  328. /blaxel/{client → core/client}/models/preview_token.py +0 -0
  329. /blaxel/{client → core/client}/models/preview_token_metadata.py +0 -0
  330. /blaxel/{client → core/client}/models/preview_token_spec.py +0 -0
  331. /blaxel/{client → core/client}/models/private_cluster.py +0 -0
  332. /blaxel/{client → core/client}/models/private_location.py +0 -0
  333. /blaxel/{client → core/client}/models/repository.py +0 -0
  334. /blaxel/{client → core/client}/models/request_duration_over_time_metric.py +0 -0
  335. /blaxel/{client → core/client}/models/request_duration_over_time_metrics.py +0 -0
  336. /blaxel/{client → core/client}/models/request_total_by_origin_metric.py +0 -0
  337. /blaxel/{client → core/client}/models/request_total_by_origin_metric_request_total_by_origin.py +0 -0
  338. /blaxel/{client → core/client}/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +0 -0
  339. /blaxel/{client → core/client}/models/request_total_metric.py +0 -0
  340. /blaxel/{client → core/client}/models/request_total_metric_request_total_per_code.py +0 -0
  341. /blaxel/{client → core/client}/models/request_total_metric_rps_per_code.py +0 -0
  342. /blaxel/{client → core/client}/models/request_total_response_data.py +0 -0
  343. /blaxel/{client → core/client}/models/resource_log.py +0 -0
  344. /blaxel/{client → core/client}/models/resource_metrics_request_total_per_code.py +0 -0
  345. /blaxel/{client → core/client}/models/resource_metrics_request_total_per_code_previous.py +0 -0
  346. /blaxel/{client → core/client}/models/resource_metrics_rps_per_code.py +0 -0
  347. /blaxel/{client → core/client}/models/resource_metrics_rps_per_code_previous.py +0 -0
  348. /blaxel/{client → core/client}/models/revision_configuration.py +0 -0
  349. /blaxel/{client → core/client}/models/revision_metadata.py +0 -0
  350. /blaxel/{client → core/client}/models/runtime_configuration.py +0 -0
  351. /blaxel/{client → core/client}/models/runtime_startup_probe.py +0 -0
  352. /blaxel/{client → core/client}/models/serverless_config.py +0 -0
  353. /blaxel/{client → core/client}/models/serverless_config_configuration.py +0 -0
  354. /blaxel/{client → core/client}/models/spec_configuration.py +0 -0
  355. /blaxel/{client → core/client}/models/start_sandbox.py +0 -0
  356. /blaxel/{client → core/client}/models/stop_sandbox.py +0 -0
  357. /blaxel/{client → core/client}/models/store_agent_labels.py +0 -0
  358. /blaxel/{client → core/client}/models/store_configuration_option.py +0 -0
  359. /blaxel/{client → core/client}/models/template_variable.py +0 -0
  360. /blaxel/{client → core/client}/models/time_fields.py +0 -0
  361. /blaxel/{client → core/client}/models/time_to_first_token_over_time_metrics.py +0 -0
  362. /blaxel/{client → core/client}/models/token_rate_metric.py +0 -0
  363. /blaxel/{client → core/client}/models/token_rate_metrics.py +0 -0
  364. /blaxel/{client → core/client}/models/token_total_metric.py +0 -0
  365. /blaxel/{client → core/client}/models/trace_ids_response.py +0 -0
  366. /blaxel/{client → core/client}/models/trigger.py +0 -0
  367. /blaxel/{client → core/client}/models/trigger_configuration.py +0 -0
  368. /blaxel/{client → core/client}/models/update_workspace_service_account_body.py +0 -0
  369. /blaxel/{client → core/client}/models/update_workspace_service_account_response_200.py +0 -0
  370. /blaxel/{client → core/client}/models/update_workspace_user_role_body.py +0 -0
  371. /blaxel/{client → core/client}/models/websocket_channel.py +0 -0
  372. /blaxel/{client → core/client}/models/workspace.py +0 -0
  373. /blaxel/{client → core/client}/models/workspace_labels.py +0 -0
  374. /blaxel/{client → core/client}/models/workspace_runtime.py +0 -0
  375. /blaxel/{client → core/client}/models/workspace_user.py +0 -0
  376. /blaxel/{client → core/client}/py.typed +0 -0
  377. /blaxel/{client → core/client}/types.py +0 -0
  378. /blaxel/{common → core/common}/env.py +0 -0
  379. /blaxel/{common → core/common}/settings.py +0 -0
  380. /blaxel/{sandbox/client/api/filesystem/__init__.py → core/py.typed} +0 -0
  381. /blaxel/{sandbox → core/sandbox}/client/__init__.py +0 -0
  382. /blaxel/{sandbox → core/sandbox}/client/api/__init__.py +0 -0
  383. /blaxel/{sandbox/client/api/network → core/sandbox/client/api/filesystem}/__init__.py +0 -0
  384. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/delete_filesystem_path.py +0 -0
  385. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_filesystem_path.py +0 -0
  386. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_watch_filesystem_path.py +0 -0
  387. /blaxel/{sandbox → core/sandbox}/client/api/filesystem/get_ws_watch_filesystem_path.py +0 -0
  388. /blaxel/{sandbox/client/api/process → core/sandbox/client/api/network}/__init__.py +0 -0
  389. /blaxel/{sandbox → core/sandbox}/client/api/network/delete_network_process_pid_monitor.py +0 -0
  390. /blaxel/{sandbox → core/sandbox}/client/api/network/get_network_process_pid_ports.py +0 -0
  391. /blaxel/{sandbox → core/sandbox}/client/api/process/delete_process_identifier.py +0 -0
  392. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process.py +0 -0
  393. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier.py +0 -0
  394. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier_logs.py +0 -0
  395. /blaxel/{sandbox → core/sandbox}/client/api/process/get_process_identifier_logs_stream.py +0 -0
  396. /blaxel/{sandbox → core/sandbox}/client/api/process/get_ws_process_identifier_logs_stream.py +0 -0
  397. /blaxel/{sandbox → core/sandbox}/client/client.py +0 -0
  398. /blaxel/{sandbox → core/sandbox}/client/errors.py +0 -0
  399. /blaxel/{sandbox → core/sandbox}/client/models/delete_network_process_pid_monitor_response_200.py +0 -0
  400. /blaxel/{sandbox → core/sandbox}/client/models/error_response.py +0 -0
  401. /blaxel/{sandbox → core/sandbox}/client/models/file.py +0 -0
  402. /blaxel/{sandbox → core/sandbox}/client/models/file_request.py +0 -0
  403. /blaxel/{sandbox → core/sandbox}/client/models/file_with_content.py +0 -0
  404. /blaxel/{sandbox → core/sandbox}/client/models/get_network_process_pid_ports_response_200.py +0 -0
  405. /blaxel/{sandbox → core/sandbox}/client/models/port_monitor_request.py +0 -0
  406. /blaxel/{sandbox → core/sandbox}/client/models/post_network_process_pid_monitor_response_200.py +0 -0
  407. /blaxel/{sandbox → core/sandbox}/client/models/process_logs.py +0 -0
  408. /blaxel/{sandbox → core/sandbox}/client/models/process_response.py +0 -0
  409. /blaxel/{sandbox → core/sandbox}/client/models/process_response_status.py +0 -0
  410. /blaxel/{sandbox → core/sandbox}/client/models/subdirectory.py +0 -0
  411. /blaxel/{sandbox → core/sandbox}/client/models/success_response.py +0 -0
  412. /blaxel/{sandbox → core/sandbox}/client/py.typed +0 -0
  413. /blaxel/{sandbox → core/sandbox}/client/types.py +0 -0
  414. /blaxel/{tools → core/tools}/common.py +0 -0
  415. /blaxel/{tools → core/tools}/types.py +0 -0
  416. /blaxel/{models/custom/langchain → langgraph/custom}/gemini.py +0 -0
  417. /blaxel/{models/custom/llamaindex → llamaindex/custom}/cohere.py +0 -0
  418. /blaxel/{instrumentation → telemetry}/exporters.py +0 -0
  419. /blaxel/{instrumentation → telemetry/log}/log.py +0 -0
  420. {blaxel-0.1.21rc69.dist-info → blaxel-0.2.0.dist-info}/WHEEL +0 -0
  421. {blaxel-0.1.21rc69.dist-info → blaxel-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,133 @@
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="ResourceLogChart")
9
+
10
+
11
+ @_attrs_define
12
+ class ResourceLogChart:
13
+ """Chart for a resource log
14
+
15
+ Attributes:
16
+ count (Union[Unset, int]): Count of the log
17
+ debug (Union[Unset, int]): Debug count of the log
18
+ error (Union[Unset, int]): Error count of the log
19
+ fatal (Union[Unset, int]): Fatal count of the log
20
+ info (Union[Unset, int]): Info count of the log
21
+ timestamp (Union[Unset, str]): Timestamp of the log
22
+ trace (Union[Unset, int]): Trace count of the log
23
+ unknown (Union[Unset, int]): Unknown count of the log
24
+ warning (Union[Unset, int]): Warning count of the log
25
+ """
26
+
27
+ count: Union[Unset, int] = UNSET
28
+ debug: Union[Unset, int] = UNSET
29
+ error: Union[Unset, int] = UNSET
30
+ fatal: Union[Unset, int] = UNSET
31
+ info: Union[Unset, int] = UNSET
32
+ timestamp: Union[Unset, str] = UNSET
33
+ trace: Union[Unset, int] = UNSET
34
+ unknown: Union[Unset, int] = UNSET
35
+ warning: Union[Unset, int] = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+ def to_dict(self) -> dict[str, Any]:
39
+ count = self.count
40
+
41
+ debug = self.debug
42
+
43
+ error = self.error
44
+
45
+ fatal = self.fatal
46
+
47
+ info = self.info
48
+
49
+ timestamp = self.timestamp
50
+
51
+ trace = self.trace
52
+
53
+ unknown = self.unknown
54
+
55
+ warning = self.warning
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update({})
60
+ if count is not UNSET:
61
+ field_dict["count"] = count
62
+ if debug is not UNSET:
63
+ field_dict["debug"] = debug
64
+ if error is not UNSET:
65
+ field_dict["error"] = error
66
+ if fatal is not UNSET:
67
+ field_dict["fatal"] = fatal
68
+ if info is not UNSET:
69
+ field_dict["info"] = info
70
+ if timestamp is not UNSET:
71
+ field_dict["timestamp"] = timestamp
72
+ if trace is not UNSET:
73
+ field_dict["trace"] = trace
74
+ if unknown is not UNSET:
75
+ field_dict["unknown"] = unknown
76
+ if warning is not UNSET:
77
+ field_dict["warning"] = warning
78
+
79
+ return field_dict
80
+
81
+ @classmethod
82
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
83
+ if not src_dict:
84
+ return None
85
+ d = src_dict.copy()
86
+ count = d.pop("count", UNSET)
87
+
88
+ debug = d.pop("debug", UNSET)
89
+
90
+ error = d.pop("error", UNSET)
91
+
92
+ fatal = d.pop("fatal", UNSET)
93
+
94
+ info = d.pop("info", UNSET)
95
+
96
+ timestamp = d.pop("timestamp", UNSET)
97
+
98
+ trace = d.pop("trace", UNSET)
99
+
100
+ unknown = d.pop("unknown", UNSET)
101
+
102
+ warning = d.pop("warning", UNSET)
103
+
104
+ resource_log_chart = cls(
105
+ count=count,
106
+ debug=debug,
107
+ error=error,
108
+ fatal=fatal,
109
+ info=info,
110
+ timestamp=timestamp,
111
+ trace=trace,
112
+ unknown=unknown,
113
+ warning=warning,
114
+ )
115
+
116
+ resource_log_chart.additional_properties = d
117
+ return resource_log_chart
118
+
119
+ @property
120
+ def additional_keys(self) -> list[str]:
121
+ return list(self.additional_properties.keys())
122
+
123
+ def __getitem__(self, key: str) -> Any:
124
+ return self.additional_properties[key]
125
+
126
+ def __setitem__(self, key: str, value: Any) -> None:
127
+ self.additional_properties[key] = value
128
+
129
+ def __delitem__(self, key: str) -> None:
130
+ del self.additional_properties[key]
131
+
132
+ def __contains__(self, key: str) -> bool:
133
+ return key in self.additional_properties
@@ -0,0 +1,83 @@
1
+ from typing import Any, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="ResourceLogResponse")
9
+
10
+
11
+ @_attrs_define
12
+ class ResourceLogResponse:
13
+ """Response for a resource log
14
+
15
+ Attributes:
16
+ chart (Union[Unset, list[Any]]): Chart
17
+ logs (Union[Unset, list[Any]]): Logs
18
+ total_count (Union[Unset, int]): Total count of logs
19
+ """
20
+
21
+ chart: Union[Unset, list[Any]] = UNSET
22
+ logs: Union[Unset, list[Any]] = UNSET
23
+ total_count: Union[Unset, int] = UNSET
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ chart: Union[Unset, list[Any]] = UNSET
28
+ if not isinstance(self.chart, Unset):
29
+ chart = self.chart
30
+
31
+ logs: Union[Unset, list[Any]] = UNSET
32
+ if not isinstance(self.logs, Unset):
33
+ logs = self.logs
34
+
35
+ total_count = self.total_count
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update({})
40
+ if chart is not UNSET:
41
+ field_dict["chart"] = chart
42
+ if logs is not UNSET:
43
+ field_dict["logs"] = logs
44
+ if total_count is not UNSET:
45
+ field_dict["totalCount"] = total_count
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
51
+ if not src_dict:
52
+ return None
53
+ d = src_dict.copy()
54
+ chart = cast(list[Any], d.pop("chart", UNSET))
55
+
56
+ logs = cast(list[Any], d.pop("logs", UNSET))
57
+
58
+ total_count = d.pop("totalCount", UNSET)
59
+
60
+ resource_log_response = cls(
61
+ chart=chart,
62
+ logs=logs,
63
+ total_count=total_count,
64
+ )
65
+
66
+ resource_log_response.additional_properties = d
67
+ return resource_log_response
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -6,6 +6,7 @@ from attrs import field as _attrs_field
6
6
  from ..types import UNSET, Unset
7
7
 
8
8
  if TYPE_CHECKING:
9
+ from ..models.billable_time_metric import BillableTimeMetric
9
10
  from ..models.latency_metric import LatencyMetric
10
11
  from ..models.memory_allocation_metric import MemoryAllocationMetric
11
12
  from ..models.metric import Metric
@@ -30,6 +31,7 @@ class ResourceMetrics:
30
31
  """Metrics for a single resource deployment (eg. model deployment, function deployment)
31
32
 
32
33
  Attributes:
34
+ billable_time (Union[Unset, BillableTimeMetric]): Billable time metric
33
35
  inference_errors_global (Union[Unset, list['Metric']]): Array of metrics
34
36
  inference_global (Union[Unset, list['Metric']]): Array of metrics
35
37
  last_n_requests (Union[Unset, list['Metric']]): Array of metrics
@@ -59,6 +61,7 @@ class ResourceMetrics:
59
61
  token_total (Union[Unset, TokenTotalMetric]): Token total metric
60
62
  """
61
63
 
64
+ billable_time: Union[Unset, "BillableTimeMetric"] = UNSET
62
65
  inference_errors_global: Union[Unset, list["Metric"]] = UNSET
63
66
  inference_global: Union[Unset, list["Metric"]] = UNSET
64
67
  last_n_requests: Union[Unset, list["Metric"]] = UNSET
@@ -83,11 +86,21 @@ class ResourceMetrics:
83
86
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
84
87
 
85
88
  def to_dict(self) -> dict[str, Any]:
89
+ billable_time: Union[Unset, dict[str, Any]] = UNSET
90
+ if (
91
+ self.billable_time
92
+ and not isinstance(self.billable_time, Unset)
93
+ and not isinstance(self.billable_time, dict)
94
+ ):
95
+ billable_time = self.billable_time.to_dict()
96
+ elif self.billable_time and isinstance(self.billable_time, dict):
97
+ billable_time = self.billable_time
98
+
86
99
  inference_errors_global: Union[Unset, list[dict[str, Any]]] = UNSET
87
100
  if not isinstance(self.inference_errors_global, Unset):
88
101
  inference_errors_global = []
89
102
  for componentsschemas_array_metric_item_data in self.inference_errors_global:
90
- if type(componentsschemas_array_metric_item_data) == dict:
103
+ if type(componentsschemas_array_metric_item_data) is dict:
91
104
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data
92
105
  else:
93
106
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
@@ -97,7 +110,7 @@ class ResourceMetrics:
97
110
  if not isinstance(self.inference_global, Unset):
98
111
  inference_global = []
99
112
  for componentsschemas_array_metric_item_data in self.inference_global:
100
- if type(componentsschemas_array_metric_item_data) == dict:
113
+ if type(componentsschemas_array_metric_item_data) is dict:
101
114
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data
102
115
  else:
103
116
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
@@ -107,7 +120,7 @@ class ResourceMetrics:
107
120
  if not isinstance(self.last_n_requests, Unset):
108
121
  last_n_requests = []
109
122
  for componentsschemas_array_metric_item_data in self.last_n_requests:
110
- if type(componentsschemas_array_metric_item_data) == dict:
123
+ if type(componentsschemas_array_metric_item_data) is dict:
111
124
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data
112
125
  else:
113
126
  componentsschemas_array_metric_item = componentsschemas_array_metric_item_data.to_dict()
@@ -244,6 +257,8 @@ class ResourceMetrics:
244
257
  field_dict: dict[str, Any] = {}
245
258
  field_dict.update(self.additional_properties)
246
259
  field_dict.update({})
260
+ if billable_time is not UNSET:
261
+ field_dict["billableTime"] = billable_time
247
262
  if inference_errors_global is not UNSET:
248
263
  field_dict["inferenceErrorsGlobal"] = inference_errors_global
249
264
  if inference_global is not UNSET:
@@ -291,6 +306,7 @@ class ResourceMetrics:
291
306
 
292
307
  @classmethod
293
308
  def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
309
+ from ..models.billable_time_metric import BillableTimeMetric
294
310
  from ..models.latency_metric import LatencyMetric
295
311
  from ..models.memory_allocation_metric import MemoryAllocationMetric
296
312
  from ..models.metric import Metric
@@ -313,6 +329,13 @@ class ResourceMetrics:
313
329
  if not src_dict:
314
330
  return None
315
331
  d = src_dict.copy()
332
+ _billable_time = d.pop("billableTime", UNSET)
333
+ billable_time: Union[Unset, BillableTimeMetric]
334
+ if isinstance(_billable_time, Unset):
335
+ billable_time = UNSET
336
+ else:
337
+ billable_time = BillableTimeMetric.from_dict(_billable_time)
338
+
316
339
  inference_errors_global = []
317
340
  _inference_errors_global = d.pop("inferenceErrorsGlobal", UNSET)
318
341
  for componentsschemas_array_metric_item_data in _inference_errors_global or []:
@@ -443,6 +466,7 @@ class ResourceMetrics:
443
466
  token_total = TokenTotalMetric.from_dict(_token_total)
444
467
 
445
468
  resource_metrics = cls(
469
+ billable_time=billable_time,
446
470
  inference_errors_global=inference_errors_global,
447
471
  inference_global=inference_global,
448
472
  last_n_requests=last_n_requests,
@@ -0,0 +1,97 @@
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="ResourceTrace")
9
+
10
+
11
+ @_attrs_define
12
+ class ResourceTrace:
13
+ """Log for a resource deployment (eg. model deployment, function deployment)
14
+
15
+ Attributes:
16
+ duration (Union[Unset, int]): Duration in nanoseconds
17
+ has_error (Union[Unset, bool]): Has error
18
+ start_time (Union[Unset, str]): The timestamp of the log
19
+ status_code (Union[Unset, int]): Status code
20
+ trace_id (Union[Unset, str]): Trace ID of the log
21
+ """
22
+
23
+ duration: Union[Unset, int] = UNSET
24
+ has_error: Union[Unset, bool] = UNSET
25
+ start_time: Union[Unset, str] = UNSET
26
+ status_code: Union[Unset, int] = UNSET
27
+ trace_id: Union[Unset, str] = UNSET
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ duration = self.duration
32
+
33
+ has_error = self.has_error
34
+
35
+ start_time = self.start_time
36
+
37
+ status_code = self.status_code
38
+
39
+ trace_id = self.trace_id
40
+
41
+ field_dict: dict[str, Any] = {}
42
+ field_dict.update(self.additional_properties)
43
+ field_dict.update({})
44
+ if duration is not UNSET:
45
+ field_dict["duration"] = duration
46
+ if has_error is not UNSET:
47
+ field_dict["hasError"] = has_error
48
+ if start_time is not UNSET:
49
+ field_dict["startTime"] = start_time
50
+ if status_code is not UNSET:
51
+ field_dict["statusCode"] = status_code
52
+ if trace_id is not UNSET:
53
+ field_dict["traceID"] = trace_id
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
59
+ if not src_dict:
60
+ return None
61
+ d = src_dict.copy()
62
+ duration = d.pop("duration", UNSET)
63
+
64
+ has_error = d.pop("hasError", UNSET)
65
+
66
+ start_time = d.pop("startTime", UNSET)
67
+
68
+ status_code = d.pop("statusCode", UNSET)
69
+
70
+ trace_id = d.pop("traceID", UNSET)
71
+
72
+ resource_trace = cls(
73
+ duration=duration,
74
+ has_error=has_error,
75
+ start_time=start_time,
76
+ status_code=status_code,
77
+ trace_id=trace_id,
78
+ )
79
+
80
+ resource_trace.additional_properties = d
81
+ return resource_trace
82
+
83
+ @property
84
+ def additional_keys(self) -> list[str]:
85
+ return list(self.additional_properties.keys())
86
+
87
+ def __getitem__(self, key: str) -> Any:
88
+ return self.additional_properties[key]
89
+
90
+ def __setitem__(self, key: str, value: Any) -> None:
91
+ self.additional_properties[key] = value
92
+
93
+ def __delitem__(self, key: str) -> None:
94
+ del self.additional_properties[key]
95
+
96
+ def __contains__(self, key: str) -> bool:
97
+ return key in self.additional_properties
@@ -117,7 +117,7 @@ class Runtime:
117
117
  if not isinstance(self.ports, Unset):
118
118
  ports = []
119
119
  for componentsschemas_ports_item_data in self.ports:
120
- if type(componentsschemas_ports_item_data) == dict:
120
+ if type(componentsschemas_ports_item_data) is dict:
121
121
  componentsschemas_ports_item = componentsschemas_ports_item_data
122
122
  else:
123
123
  componentsschemas_ports_item = componentsschemas_ports_item_data.to_dict()
@@ -36,7 +36,7 @@ class Sandbox:
36
36
  if not isinstance(self.events, Unset):
37
37
  events = []
38
38
  for componentsschemas_core_events_item_data in self.events:
39
- if type(componentsschemas_core_events_item_data) == dict:
39
+ if type(componentsschemas_core_events_item_data) is dict:
40
40
  componentsschemas_core_events_item = componentsschemas_core_events_item_data
41
41
  else:
42
42
  componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
@@ -72,7 +72,7 @@ class SandboxDefinition:
72
72
  if not isinstance(self.ports, Unset):
73
73
  ports = []
74
74
  for componentsschemas_ports_item_data in self.ports:
75
- if type(componentsschemas_ports_item_data) == dict:
75
+ if type(componentsschemas_ports_item_data) is dict:
76
76
  componentsschemas_ports_item = componentsschemas_ports_item_data
77
77
  else:
78
78
  componentsschemas_ports_item = componentsschemas_ports_item_data.to_dict()
@@ -60,7 +60,7 @@ class SandboxSpec:
60
60
  if not isinstance(self.flavors, Unset):
61
61
  flavors = []
62
62
  for componentsschemas_flavors_item_data in self.flavors:
63
- if type(componentsschemas_flavors_item_data) == dict:
63
+ if type(componentsschemas_flavors_item_data) is dict:
64
64
  componentsschemas_flavors_item = componentsschemas_flavors_item_data
65
65
  else:
66
66
  componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
@@ -57,7 +57,7 @@ class StoreAgent:
57
57
  if not isinstance(self.configuration, Unset):
58
58
  configuration = []
59
59
  for configuration_item_data in self.configuration:
60
- if type(configuration_item_data) == dict:
60
+ if type(configuration_item_data) is dict:
61
61
  configuration_item = configuration_item_data
62
62
  else:
63
63
  configuration_item = configuration_item_data.to_dict()
@@ -56,7 +56,7 @@ class StoreConfiguration:
56
56
  if not isinstance(self.options, Unset):
57
57
  options = []
58
58
  for options_item_data in self.options:
59
- if type(options_item_data) == dict:
59
+ if type(options_item_data) is dict:
60
60
  options_item = options_item_data
61
61
  else:
62
62
  options_item = options_item_data.to_dict()
@@ -74,7 +74,7 @@ class Template:
74
74
  if not isinstance(self.variables, Unset):
75
75
  variables = []
76
76
  for variables_item_data in self.variables:
77
- if type(variables_item_data) == dict:
77
+ if type(variables_item_data) is dict:
78
78
  variables_item = variables_item_data
79
79
  else:
80
80
  variables_item = variables_item_data.to_dict()
@@ -0,0 +1,106 @@
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="WebsocketMessage")
9
+
10
+
11
+ @_attrs_define
12
+ class WebsocketMessage:
13
+ """WebSocket connection details
14
+
15
+ Attributes:
16
+ created_at (Union[Unset, str]): The date and time when the resource was created
17
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
18
+ id (Union[Unset, str]): Unique message ID
19
+ message (Union[Unset, str]): Message
20
+ ttl (Union[Unset, int]): TTL timestamp for automatic deletion
21
+ workspace (Union[Unset, str]): Workspace the connection belongs to
22
+ """
23
+
24
+ created_at: Union[Unset, str] = UNSET
25
+ updated_at: Union[Unset, str] = UNSET
26
+ id: Union[Unset, str] = UNSET
27
+ message: Union[Unset, str] = UNSET
28
+ ttl: Union[Unset, int] = UNSET
29
+ workspace: Union[Unset, str] = UNSET
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ created_at = self.created_at
34
+
35
+ updated_at = self.updated_at
36
+
37
+ id = self.id
38
+
39
+ message = self.message
40
+
41
+ ttl = self.ttl
42
+
43
+ workspace = self.workspace
44
+
45
+ field_dict: dict[str, Any] = {}
46
+ field_dict.update(self.additional_properties)
47
+ field_dict.update({})
48
+ if created_at is not UNSET:
49
+ field_dict["createdAt"] = created_at
50
+ if updated_at is not UNSET:
51
+ field_dict["updatedAt"] = updated_at
52
+ if id is not UNSET:
53
+ field_dict["id"] = id
54
+ if message is not UNSET:
55
+ field_dict["message"] = message
56
+ if ttl is not UNSET:
57
+ field_dict["ttl"] = ttl
58
+ if workspace is not UNSET:
59
+ field_dict["workspace"] = workspace
60
+
61
+ return field_dict
62
+
63
+ @classmethod
64
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
65
+ if not src_dict:
66
+ return None
67
+ d = src_dict.copy()
68
+ created_at = d.pop("createdAt", UNSET)
69
+
70
+ updated_at = d.pop("updatedAt", UNSET)
71
+
72
+ id = d.pop("id", UNSET)
73
+
74
+ message = d.pop("message", UNSET)
75
+
76
+ ttl = d.pop("ttl", UNSET)
77
+
78
+ workspace = d.pop("workspace", UNSET)
79
+
80
+ websocket_message = cls(
81
+ created_at=created_at,
82
+ updated_at=updated_at,
83
+ id=id,
84
+ message=message,
85
+ ttl=ttl,
86
+ workspace=workspace,
87
+ )
88
+
89
+ websocket_message.additional_properties = d
90
+ return websocket_message
91
+
92
+ @property
93
+ def additional_keys(self) -> list[str]:
94
+ return list(self.additional_properties.keys())
95
+
96
+ def __getitem__(self, key: str) -> Any:
97
+ return self.additional_properties[key]
98
+
99
+ def __setitem__(self, key: str, value: Any) -> None:
100
+ self.additional_properties[key] = value
101
+
102
+ def __delitem__(self, key: str) -> None:
103
+ del self.additional_properties[key]
104
+
105
+ def __contains__(self, key: str) -> bool:
106
+ return key in self.additional_properties
@@ -0,0 +1,6 @@
1
+ from .autoload import autoload
2
+ from .env import env
3
+ from .internal import get_alphanumeric_limited_hash, get_global_unique_hash
4
+ from .settings import Settings, settings
5
+
6
+ __all__ = ["autoload", "Settings", "settings", "env", "get_alphanumeric_limited_hash", "get_global_unique_hash"]
@@ -0,0 +1,21 @@
1
+ import logging
2
+
3
+ from ..client import client
4
+ from .settings import settings
5
+
6
+ logger = logging.getLogger(__name__)
7
+
8
+
9
+ def telemetry() -> None:
10
+ from blaxel.telemetry import telemetry_manager
11
+
12
+ telemetry_manager.initialize(settings)
13
+
14
+
15
+ def autoload() -> None:
16
+ client.with_base_url(settings.base_url)
17
+ client.with_auth(settings.auth)
18
+ try:
19
+ telemetry()
20
+ except Exception:
21
+ pass