blaxel 0.2.29__py3-none-any.whl → 0.2.31__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 (185) hide show
  1. blaxel/__init__.py +3 -3
  2. blaxel/core/agents/__init__.py +13 -6
  3. blaxel/core/authentication/__init__.py +2 -1
  4. blaxel/core/authentication/devicemode.py +9 -1
  5. blaxel/core/authentication/oauth.py +13 -6
  6. blaxel/core/authentication/types.py +1 -0
  7. blaxel/core/cache/cache.py +10 -3
  8. blaxel/core/client/api/agents/list_agent_revisions.py +3 -1
  9. blaxel/core/client/api/compute/delete_sandbox_preview_token.py +6 -2
  10. blaxel/core/client/api/compute/start_sandbox.py +3 -1
  11. blaxel/core/client/api/compute/stop_sandbox.py +3 -1
  12. blaxel/core/client/api/default/list_sandbox_hub_definitions.py +6 -2
  13. blaxel/core/client/api/functions/list_function_revisions.py +3 -1
  14. blaxel/core/client/api/images/cleanup_images.py +3 -1
  15. blaxel/core/client/api/integrations/list_integration_connections.py +6 -2
  16. blaxel/core/client/api/invitations/list_all_pending_invitations.py +3 -1
  17. blaxel/core/client/api/jobs/create_job_execution.py +3 -1
  18. blaxel/core/client/api/jobs/delete_job_execution.py +3 -1
  19. blaxel/core/client/api/jobs/get_job_execution.py +3 -1
  20. blaxel/core/client/api/jobs/list_job_executions.py +6 -2
  21. blaxel/core/client/api/jobs/list_job_revisions.py +3 -1
  22. blaxel/core/client/api/locations/list_locations.py +3 -1
  23. blaxel/core/client/api/models/list_model_revisions.py +3 -1
  24. blaxel/core/client/api/service_accounts/create_workspace_service_account.py +6 -2
  25. blaxel/core/client/api/service_accounts/delete_workspace_service_account.py +6 -2
  26. blaxel/core/client/api/service_accounts/get_workspace_service_accounts.py +3 -1
  27. blaxel/core/client/api/service_accounts/update_workspace_service_account.py +6 -2
  28. blaxel/core/client/api/volume_templates/list_volume_templates.py +3 -1
  29. blaxel/core/client/api/workspaces/accept_workspace_invitation.py +6 -2
  30. blaxel/core/client/api/workspaces/invite_workspace_user.py +6 -2
  31. blaxel/core/client/api/workspaces/update_workspace_user_role.py +6 -2
  32. blaxel/core/client/client.py +3 -1
  33. blaxel/core/client/models/agent.py +11 -4
  34. blaxel/core/client/models/agent_spec.py +18 -5
  35. blaxel/core/client/models/billable_time_metric.py +0 -1
  36. blaxel/core/client/models/configuration.py +0 -1
  37. blaxel/core/client/models/core_spec.py +10 -3
  38. blaxel/core/client/models/core_spec_configurations.py +0 -1
  39. blaxel/core/client/models/create_job_execution_request.py +0 -1
  40. blaxel/core/client/models/create_job_execution_response.py +0 -1
  41. blaxel/core/client/models/custom_domain.py +5 -2
  42. blaxel/core/client/models/custom_domain_metadata.py +0 -1
  43. blaxel/core/client/models/custom_domain_spec.py +5 -2
  44. blaxel/core/client/models/delete_volume_template_version_response_200.py +5 -2
  45. blaxel/core/client/models/entrypoint.py +0 -1
  46. blaxel/core/client/models/form.py +5 -2
  47. blaxel/core/client/models/function.py +11 -4
  48. blaxel/core/client/models/function_spec.py +13 -4
  49. blaxel/core/client/models/image.py +5 -2
  50. blaxel/core/client/models/image_spec.py +0 -1
  51. blaxel/core/client/models/integration.py +10 -3
  52. blaxel/core/client/models/integration_connection.py +5 -2
  53. blaxel/core/client/models/integration_connection_spec.py +0 -1
  54. blaxel/core/client/models/integration_endpoint.py +5 -2
  55. blaxel/core/client/models/integration_endpoints.py +0 -2
  56. blaxel/core/client/models/job.py +11 -4
  57. blaxel/core/client/models/job_execution.py +5 -2
  58. blaxel/core/client/models/job_execution_spec.py +0 -1
  59. blaxel/core/client/models/job_execution_task.py +5 -2
  60. blaxel/core/client/models/job_metrics.py +5 -2
  61. blaxel/core/client/models/job_spec.py +13 -4
  62. blaxel/core/client/models/jobs_network_chart.py +0 -1
  63. blaxel/core/client/models/jobs_success_failed_chart.py +10 -3
  64. blaxel/core/client/models/latency_metric.py +5 -2
  65. blaxel/core/client/models/location_response.py +0 -1
  66. blaxel/core/client/models/mcp_definition.py +5 -2
  67. blaxel/core/client/models/metadata.py +0 -1
  68. blaxel/core/client/models/metrics.py +11 -4
  69. blaxel/core/client/models/model.py +11 -4
  70. blaxel/core/client/models/model_spec.py +10 -3
  71. blaxel/core/client/models/pending_invitation_accept.py +5 -2
  72. blaxel/core/client/models/pending_invitation_render.py +10 -3
  73. blaxel/core/client/models/policy.py +5 -2
  74. blaxel/core/client/models/policy_spec.py +11 -4
  75. blaxel/core/client/models/preview.py +5 -2
  76. blaxel/core/client/models/preview_spec.py +0 -1
  77. blaxel/core/client/models/preview_token.py +5 -2
  78. blaxel/core/client/models/public_ips.py +0 -1
  79. blaxel/core/client/models/request_duration_over_time_metrics.py +0 -1
  80. blaxel/core/client/models/request_total_by_origin_metric.py +16 -7
  81. blaxel/core/client/models/request_total_metric.py +8 -3
  82. blaxel/core/client/models/resource_metrics.py +58 -17
  83. blaxel/core/client/models/runtime.py +0 -1
  84. blaxel/core/client/models/sandbox.py +11 -4
  85. blaxel/core/client/models/sandbox_definition.py +0 -1
  86. blaxel/core/client/models/sandbox_lifecycle.py +0 -1
  87. blaxel/core/client/models/sandbox_spec.py +21 -6
  88. blaxel/core/client/models/serverless_config.py +0 -1
  89. blaxel/core/client/models/start_sandbox.py +5 -2
  90. blaxel/core/client/models/stop_sandbox.py +5 -2
  91. blaxel/core/client/models/store_agent.py +0 -1
  92. blaxel/core/client/models/store_configuration.py +0 -1
  93. blaxel/core/client/models/template.py +0 -1
  94. blaxel/core/client/models/time_to_first_token_over_time_metrics.py +3 -2
  95. blaxel/core/client/models/token_rate_metrics.py +0 -1
  96. blaxel/core/client/models/trigger.py +0 -1
  97. blaxel/core/client/models/trigger_configuration.py +0 -1
  98. blaxel/core/client/models/volume.py +11 -4
  99. blaxel/core/client/models/volume_template.py +5 -2
  100. blaxel/core/client/models/workspace.py +5 -2
  101. blaxel/core/client/response_interceptor.py +3 -1
  102. blaxel/core/common/autoload.py +35 -3
  103. blaxel/core/common/env.py +10 -8
  104. blaxel/core/common/settings.py +4 -2
  105. blaxel/core/common/webhook.py +0 -1
  106. blaxel/core/jobs/__init__.py +13 -3
  107. blaxel/core/mcp/client.py +8 -2
  108. blaxel/core/mcp/server.py +8 -2
  109. blaxel/core/models/__init__.py +6 -5
  110. blaxel/core/sandbox/__init__.py +1 -1
  111. blaxel/core/sandbox/client/api/codegen/get_codegen_reranking_path.py +6 -2
  112. blaxel/core/sandbox/client/api/fastapply/put_codegen_fastapply_path.py +6 -2
  113. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_multipart_upload_id_abort.py +6 -2
  114. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_path.py +6 -2
  115. blaxel/core/sandbox/client/api/filesystem/delete_filesystem_tree_path.py +192 -0
  116. blaxel/core/sandbox/client/api/filesystem/get_filesystem_content_search_path.py +252 -0
  117. blaxel/core/sandbox/client/api/filesystem/get_filesystem_find_path.py +252 -0
  118. blaxel/core/sandbox/client/api/filesystem/get_filesystem_search_path.py +241 -0
  119. blaxel/core/sandbox/client/api/filesystem/get_filesystem_tree_path.py +197 -0
  120. blaxel/core/sandbox/client/api/filesystem/get_watch_filesystem_path.py +6 -2
  121. blaxel/core/sandbox/client/api/filesystem/post_filesystem_multipart_upload_id_complete.py +6 -2
  122. blaxel/core/sandbox/client/api/filesystem/put_filesystem_path.py +6 -2
  123. blaxel/core/sandbox/client/api/filesystem/put_filesystem_tree_path.py +223 -0
  124. blaxel/core/sandbox/client/api/process/delete_process_identifier.py +6 -2
  125. blaxel/core/sandbox/client/api/process/delete_process_identifier_kill.py +6 -2
  126. blaxel/core/sandbox/client/api/process/get_process.py +3 -1
  127. blaxel/core/sandbox/client/api/process/get_process_identifier.py +6 -2
  128. blaxel/core/sandbox/client/api/process/get_process_identifier_logs.py +6 -2
  129. blaxel/core/sandbox/client/api/process/get_process_identifier_logs_stream.py +6 -2
  130. blaxel/core/sandbox/client/api/process/post_process.py +6 -2
  131. blaxel/core/sandbox/client/client.py +3 -1
  132. blaxel/core/sandbox/client/models/__init__.py +16 -0
  133. blaxel/core/sandbox/client/models/content_search_match.py +98 -0
  134. blaxel/core/sandbox/client/models/content_search_response.py +97 -0
  135. blaxel/core/sandbox/client/models/filesystem_multipart_upload_parts.py +3 -1
  136. blaxel/core/sandbox/client/models/find_match.py +69 -0
  137. blaxel/core/sandbox/client/models/find_response.py +88 -0
  138. blaxel/core/sandbox/client/models/fuzzy_search_match.py +78 -0
  139. blaxel/core/sandbox/client/models/fuzzy_search_response.py +88 -0
  140. blaxel/core/sandbox/client/models/tree_request.py +76 -0
  141. blaxel/core/sandbox/client/models/tree_request_files.py +49 -0
  142. blaxel/core/sandbox/default/__init__.py +0 -1
  143. blaxel/core/sandbox/default/action.py +13 -9
  144. blaxel/core/sandbox/default/codegen.py +2 -4
  145. blaxel/core/sandbox/default/filesystem.py +210 -64
  146. blaxel/core/sandbox/default/interpreter.py +75 -61
  147. blaxel/core/sandbox/default/preview.py +6 -2
  148. blaxel/core/sandbox/default/process.py +88 -50
  149. blaxel/core/sandbox/default/sandbox.py +7 -2
  150. blaxel/core/sandbox/sync/__init__.py +0 -2
  151. blaxel/core/sandbox/sync/action.py +2 -3
  152. blaxel/core/sandbox/sync/codegen.py +1 -5
  153. blaxel/core/sandbox/sync/filesystem.py +17 -6
  154. blaxel/core/sandbox/sync/interpreter.py +10 -6
  155. blaxel/core/sandbox/sync/network.py +0 -2
  156. blaxel/core/sandbox/sync/preview.py +21 -9
  157. blaxel/core/sandbox/sync/process.py +32 -8
  158. blaxel/core/sandbox/sync/sandbox.py +13 -6
  159. blaxel/core/sandbox/sync/session.py +6 -4
  160. blaxel/core/sandbox/types.py +2 -1
  161. blaxel/core/tools/__init__.py +30 -6
  162. blaxel/core/tools/common.py +1 -1
  163. blaxel/core/tools/types.py +2 -1
  164. blaxel/crewai/model.py +20 -5
  165. blaxel/googleadk/__init__.py +1 -1
  166. blaxel/googleadk/tools.py +3 -5
  167. blaxel/langgraph/custom/gemini.py +126 -133
  168. blaxel/langgraph/model.py +54 -50
  169. blaxel/langgraph/tools.py +9 -3
  170. blaxel/llamaindex/custom/cohere.py +25 -16
  171. blaxel/llamaindex/model.py +44 -57
  172. blaxel/llamaindex/tools.py +2 -3
  173. blaxel/pydantic/custom/gemini.py +3 -3
  174. blaxel/pydantic/tools.py +2 -4
  175. blaxel/telemetry/exporters.py +10 -3
  176. blaxel/telemetry/instrumentation/blaxel_langgraph.py +4 -2
  177. blaxel/telemetry/instrumentation/blaxel_langgraph_gemini.py +22 -5
  178. blaxel/telemetry/instrumentation/utils.py +3 -3
  179. blaxel/telemetry/log/log.py +2 -3
  180. blaxel/telemetry/log/logger.py +21 -15
  181. blaxel/telemetry/span.py +10 -6
  182. {blaxel-0.2.29.dist-info → blaxel-0.2.31.dist-info}/METADATA +2 -2
  183. {blaxel-0.2.29.dist-info → blaxel-0.2.31.dist-info}/RECORD +185 -171
  184. {blaxel-0.2.29.dist-info → blaxel-0.2.31.dist-info}/WHEEL +0 -0
  185. {blaxel-0.2.29.dist-info → blaxel-0.2.31.dist-info}/licenses/LICENSE +0 -0
blaxel/__init__.py CHANGED
@@ -4,9 +4,9 @@ from .core.common.autoload import autoload
4
4
  from .core.common.env import env
5
5
  from .core.common.settings import settings
6
6
 
7
- __version__ = "0.2.29"
8
- __commit__ = "c29748cf62e4297aac41c1a3de70f608fbc919eb"
7
+ __version__ = "0.2.31"
8
+ __commit__ = "43ad41354e2f27bae2471030eeaf702cf8e811ba"
9
9
  __sentry_dsn__ = "https://9711de13cd02b285ca4378c01de8dc30@o4508714045276160.ingest.us.sentry.io/4510461121462272"
10
10
  __all__ = ["autoload", "settings", "env"]
11
11
 
12
- autoload()
12
+ autoload()
@@ -51,11 +51,13 @@ class BlAgent:
51
51
  body = json.dumps(body)
52
52
 
53
53
  # Merge settings headers with provided headers
54
- merged_headers = {**settings.headers, "Content-Type": "application/json", **headers}
54
+ merged_headers = {
55
+ **settings.headers,
56
+ "Content-Type": "application/json",
57
+ **headers,
58
+ }
55
59
 
56
- return client.get_httpx_client().post(
57
- url, headers=merged_headers, data=body, params=params
58
- )
60
+ return client.get_httpx_client().post(url, headers=merged_headers, data=body, params=params)
59
61
 
60
62
  async def acall(self, url, input_data, headers: dict = {}, params: dict = {}):
61
63
  logger.debug(f"Agent Calling: {self.name}")
@@ -64,7 +66,11 @@ class BlAgent:
64
66
  body = json.dumps(body)
65
67
 
66
68
  # Merge settings headers with provided headers
67
- merged_headers = {**settings.headers, "Content-Type": "application/json", **headers}
69
+ merged_headers = {
70
+ **settings.headers,
71
+ "Content-Type": "application/json",
72
+ **headers,
73
+ }
68
74
 
69
75
  return await client.get_async_httpx_client().post(
70
76
  url, headers=merged_headers, data=body, params=params
@@ -120,4 +126,5 @@ async def get_agent_metadata(name):
120
126
  except Exception:
121
127
  return None
122
128
 
123
- __all__ = ["BlAgent", "bl_agent", "get_agent_metadata"]
129
+
130
+ __all__ = ["BlAgent", "bl_agent", "get_agent_metadata"]
@@ -34,7 +34,8 @@ def get_credentials() -> CredentialsType | None:
34
34
 
35
35
  if os.environ.get("BL_CLIENT_CREDENTIALS"):
36
36
  return CredentialsType(
37
- client_credentials=os.environ.get("BL_CLIENT_CREDENTIALS"), workspace=get_workspace()
37
+ client_credentials=os.environ.get("BL_CLIENT_CREDENTIALS"),
38
+ workspace=get_workspace(),
38
39
  )
39
40
 
40
41
  try:
@@ -24,6 +24,7 @@ class DeviceLogin:
24
24
  client_id (str): The client ID for the device.
25
25
  scope (str): The scope of the authentication.
26
26
  """
27
+
27
28
  client_id: str
28
29
  scope: str
29
30
 
@@ -42,6 +43,7 @@ class DeviceLoginResponse:
42
43
  verification_uri (str): URI for user to verify device login.
43
44
  verification_uri_complete (str): Complete URI including the user code for verification.
44
45
  """
46
+
45
47
  client_id: str
46
48
  device_code: str
47
49
  user_code: str
@@ -61,6 +63,7 @@ class DeviceLoginFinalizeRequest:
61
63
  client_id (str): The client ID for finalizing the device login.
62
64
  device_code (str): The device code to finalize login.
63
65
  """
66
+
64
67
  grant_type: str
65
68
  client_id: str
66
69
  device_code: str
@@ -78,6 +81,7 @@ class DeviceMode(BlaxelAuth):
78
81
  """
79
82
  DeviceMode auth that authenticates requests using a device code.
80
83
  """
84
+
81
85
  def get_headers(self) -> Dict[str, str]:
82
86
  """
83
87
  Retrieves the authentication headers containing the Bearer token and workspace information.
@@ -161,7 +165,11 @@ class DeviceMode(BlaxelAuth):
161
165
  }
162
166
 
163
167
  try:
164
- response = post(url, json=refresh_data, headers={"Content-Type": "application/json"})
168
+ response = post(
169
+ url,
170
+ json=refresh_data,
171
+ headers={"Content-Type": "application/json"},
172
+ )
165
173
  response.raise_for_status()
166
174
  finalize_response = DeviceLoginFinalizeResponse(**response.json())
167
175
 
@@ -11,6 +11,7 @@ class OauthTokenData:
11
11
  headers: dict[str, str] = field(default_factory=dict)
12
12
  authenticated: bool | None = False
13
13
 
14
+
14
15
  @dataclass
15
16
  class OauthTokenResponse:
16
17
  access_token: str
@@ -18,14 +19,16 @@ class OauthTokenResponse:
18
19
  expires_in: int
19
20
  token_type: str
20
21
 
22
+
21
23
  @dataclass
22
24
  class OauthTokenError:
23
25
  error: str
24
26
 
27
+
25
28
  async def oauth_token(
26
29
  options: OauthTokenData,
27
30
  client: Client | None = None,
28
- throw_on_error: bool = False
31
+ throw_on_error: bool = False,
29
32
  ) -> Union[OauthTokenResponse, OauthTokenError]:
30
33
  """
31
34
  Get a new OAuth token.
@@ -38,13 +41,17 @@ async def oauth_token(
38
41
  Returns:
39
42
  The OAuth token response or error
40
43
  """
41
- response = await (client or default_client).get_async_httpx_client().post(
42
- url="/oauth/token",
43
- json=options.body or {},
44
- headers=options.headers or {},
44
+ response = (
45
+ await (client or default_client)
46
+ .get_async_httpx_client()
47
+ .post(
48
+ url="/oauth/token",
49
+ json=options.body or {},
50
+ headers=options.headers or {},
51
+ )
45
52
  )
46
53
  if response.status_code >= 400:
47
54
  if throw_on_error:
48
55
  raise Exception(f"Failed to get OAuth token: {response.text}")
49
56
  return OauthTokenError(error=response.text)
50
- return OauthTokenResponse(**response.json())
57
+ return OauthTokenResponse(**response.json())
@@ -17,6 +17,7 @@ class CredentialsType(BaseModel):
17
17
  expires_in: int | None = Field(default=None, description="The expiration time")
18
18
  workspace: str | None = Field(default=None, description="The workspace")
19
19
 
20
+
20
21
  class BlaxelAuth(Auth):
21
22
  def __init__(self, credentials: CredentialsType, workspace_name: str, base_url: str):
22
23
  """
@@ -14,19 +14,26 @@ def _load_cache() -> None:
14
14
  Load cache data from .cache.yaml file if it exists.
15
15
  """
16
16
  try:
17
- if os.path.exists('.cache.yaml'):
18
- with open('.cache.yaml', encoding='utf-8') as file:
17
+ if os.path.exists(".cache.yaml"):
18
+ with open(".cache.yaml", encoding="utf-8") as file:
19
19
  cache_string = file.read()
20
20
  cache_data = yaml.safe_load_all(cache_string)
21
21
 
22
22
  for doc in cache_data:
23
- if doc and isinstance(doc, dict) and 'kind' in doc and 'metadata' in doc and 'name' in doc['metadata']:
23
+ if (
24
+ doc
25
+ and isinstance(doc, dict)
26
+ and "kind" in doc
27
+ and "metadata" in doc
28
+ and "name" in doc["metadata"]
29
+ ):
24
30
  cache_key = f"{doc['kind']}/{doc['metadata']['name']}"
25
31
  _cache[cache_key] = doc
26
32
  except Exception:
27
33
  # Silently fail if cache file doesn't exist or is invalid
28
34
  pass
29
35
 
36
+
30
37
  # Initialize cache on module import
31
38
  _load_cache()
32
39
 
@@ -36,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Revisi
36
36
  return None
37
37
 
38
38
 
39
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["RevisionMetadata"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["RevisionMetadata"]]:
40
42
  return Response(
41
43
  status_code=HTTPStatus(response.status_code),
42
44
  content=response.content,
@@ -22,7 +22,9 @@ def _get_kwargs(
22
22
  return _kwargs
23
23
 
24
24
 
25
- def _parse_response(*, client: Client, response: httpx.Response) -> DeleteSandboxPreviewTokenResponse200 | None:
25
+ def _parse_response(
26
+ *, client: Client, response: httpx.Response
27
+ ) -> DeleteSandboxPreviewTokenResponse200 | None:
26
28
  if response.status_code == 200:
27
29
  response_200 = DeleteSandboxPreviewTokenResponse200.from_dict(response.json())
28
30
 
@@ -33,7 +35,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> DeleteSandbo
33
35
  return None
34
36
 
35
37
 
36
- def _build_response(*, client: Client, response: httpx.Response) -> Response[DeleteSandboxPreviewTokenResponse200]:
38
+ def _build_response(
39
+ *, client: Client, response: httpx.Response
40
+ ) -> Response[DeleteSandboxPreviewTokenResponse200]:
37
41
  return Response(
38
42
  status_code=HTTPStatus(response.status_code),
39
43
  content=response.content,
@@ -34,7 +34,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, S
34
34
  return None
35
35
 
36
36
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, StartSandbox]]:
37
+ def _build_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Response[Union[Any, StartSandbox]]:
38
40
  return Response(
39
41
  status_code=HTTPStatus(response.status_code),
40
42
  content=response.content,
@@ -34,7 +34,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, S
34
34
  return None
35
35
 
36
36
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, StopSandbox]]:
37
+ def _build_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Response[Union[Any, StopSandbox]]:
38
40
  return Response(
39
41
  status_code=HTTPStatus(response.status_code),
40
42
  content=response.content,
@@ -18,7 +18,9 @@ def _get_kwargs() -> dict[str, Any]:
18
18
  return _kwargs
19
19
 
20
20
 
21
- def _parse_response(*, client: Client, response: httpx.Response) -> list["SandboxDefinition"] | None:
21
+ def _parse_response(
22
+ *, client: Client, response: httpx.Response
23
+ ) -> list["SandboxDefinition"] | None:
22
24
  if response.status_code == 200:
23
25
  response_200 = []
24
26
  _response_200 = response.json()
@@ -34,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Sandbo
34
36
  return None
35
37
 
36
38
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["SandboxDefinition"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["SandboxDefinition"]]:
38
42
  return Response(
39
43
  status_code=HTTPStatus(response.status_code),
40
44
  content=response.content,
@@ -36,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Revisi
36
36
  return None
37
37
 
38
38
 
39
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["RevisionMetadata"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["RevisionMetadata"]]:
40
42
  return Response(
41
43
  status_code=HTTPStatus(response.status_code),
42
44
  content=response.content,
@@ -29,7 +29,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> CleanupImage
29
29
  return None
30
30
 
31
31
 
32
- def _build_response(*, client: Client, response: httpx.Response) -> Response[CleanupImagesResponse200]:
32
+ def _build_response(
33
+ *, client: Client, response: httpx.Response
34
+ ) -> Response[CleanupImagesResponse200]:
33
35
  return Response(
34
36
  status_code=HTTPStatus(response.status_code),
35
37
  content=response.content,
@@ -18,7 +18,9 @@ def _get_kwargs() -> dict[str, Any]:
18
18
  return _kwargs
19
19
 
20
20
 
21
- def _parse_response(*, client: Client, response: httpx.Response) -> list["IntegrationConnection"] | None:
21
+ def _parse_response(
22
+ *, client: Client, response: httpx.Response
23
+ ) -> list["IntegrationConnection"] | None:
22
24
  if response.status_code == 200:
23
25
  response_200 = []
24
26
  _response_200 = response.json()
@@ -34,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Integr
34
36
  return None
35
37
 
36
38
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["IntegrationConnection"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["IntegrationConnection"]]:
38
42
  return Response(
39
43
  status_code=HTTPStatus(response.status_code),
40
44
  content=response.content,
@@ -18,7 +18,9 @@ def _get_kwargs() -> dict[str, Any]:
18
18
  return _kwargs
19
19
 
20
20
 
21
- def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, list["PendingInvitationRender"]] | None:
21
+ def _parse_response(
22
+ *, client: Client, response: httpx.Response
23
+ ) -> Union[Any, list["PendingInvitationRender"]] | None:
22
24
  if response.status_code == 200:
23
25
  response_200 = []
24
26
  _response_200 = response.json()
@@ -51,7 +51,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, J
51
51
  return None
52
52
 
53
53
 
54
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, JobExecution]]:
54
+ def _build_response(
55
+ *, client: Client, response: httpx.Response
56
+ ) -> Response[Union[Any, JobExecution]]:
55
57
  return Response(
56
58
  status_code=HTTPStatus(response.status_code),
57
59
  content=response.content,
@@ -41,7 +41,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, J
41
41
  return None
42
42
 
43
43
 
44
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, JobExecution]]:
44
+ def _build_response(
45
+ *, client: Client, response: httpx.Response
46
+ ) -> Response[Union[Any, JobExecution]]:
45
47
  return Response(
46
48
  status_code=HTTPStatus(response.status_code),
47
49
  content=response.content,
@@ -41,7 +41,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, J
41
41
  return None
42
42
 
43
43
 
44
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, JobExecution]]:
44
+ def _build_response(
45
+ *, client: Client, response: httpx.Response
46
+ ) -> Response[Union[Any, JobExecution]]:
45
47
  return Response(
46
48
  status_code=HTTPStatus(response.status_code),
47
49
  content=response.content,
@@ -32,7 +32,9 @@ def _get_kwargs(
32
32
  return _kwargs
33
33
 
34
34
 
35
- def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, list["JobExecution"]] | None:
35
+ def _parse_response(
36
+ *, client: Client, response: httpx.Response
37
+ ) -> Union[Any, list["JobExecution"]] | None:
36
38
  if response.status_code == 200:
37
39
  response_200 = []
38
40
  _response_200 = response.json()
@@ -54,7 +56,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, l
54
56
  return None
55
57
 
56
58
 
57
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, list["JobExecution"]]]:
59
+ def _build_response(
60
+ *, client: Client, response: httpx.Response
61
+ ) -> Response[Union[Any, list["JobExecution"]]]:
58
62
  return Response(
59
63
  status_code=HTTPStatus(response.status_code),
60
64
  content=response.content,
@@ -36,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Revisi
36
36
  return None
37
37
 
38
38
 
39
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["RevisionMetadata"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["RevisionMetadata"]]:
40
42
  return Response(
41
43
  status_code=HTTPStatus(response.status_code),
42
44
  content=response.content,
@@ -34,7 +34,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Locati
34
34
  return None
35
35
 
36
36
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["LocationResponse"]]:
37
+ def _build_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Response[list["LocationResponse"]]:
38
40
  return Response(
39
41
  status_code=HTTPStatus(response.status_code),
40
42
  content=response.content,
@@ -36,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Revisi
36
36
  return None
37
37
 
38
38
 
39
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["RevisionMetadata"]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[list["RevisionMetadata"]]:
40
42
  return Response(
41
43
  status_code=HTTPStatus(response.status_code),
42
44
  content=response.content,
@@ -35,7 +35,9 @@ def _get_kwargs(
35
35
  return _kwargs
36
36
 
37
37
 
38
- def _parse_response(*, client: Client, response: httpx.Response) -> CreateWorkspaceServiceAccountResponse200 | None:
38
+ def _parse_response(
39
+ *, client: Client, response: httpx.Response
40
+ ) -> CreateWorkspaceServiceAccountResponse200 | None:
39
41
  if response.status_code == 200:
40
42
  response_200 = CreateWorkspaceServiceAccountResponse200.from_dict(response.json())
41
43
 
@@ -46,7 +48,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> CreateWorksp
46
48
  return None
47
49
 
48
50
 
49
- def _build_response(*, client: Client, response: httpx.Response) -> Response[CreateWorkspaceServiceAccountResponse200]:
51
+ def _build_response(
52
+ *, client: Client, response: httpx.Response
53
+ ) -> Response[CreateWorkspaceServiceAccountResponse200]:
50
54
  return Response(
51
55
  status_code=HTTPStatus(response.status_code),
52
56
  content=response.content,
@@ -22,7 +22,9 @@ def _get_kwargs(
22
22
  return _kwargs
23
23
 
24
24
 
25
- def _parse_response(*, client: Client, response: httpx.Response) -> DeleteWorkspaceServiceAccountResponse200 | None:
25
+ def _parse_response(
26
+ *, client: Client, response: httpx.Response
27
+ ) -> DeleteWorkspaceServiceAccountResponse200 | None:
26
28
  if response.status_code == 200:
27
29
  response_200 = DeleteWorkspaceServiceAccountResponse200.from_dict(response.json())
28
30
 
@@ -33,7 +35,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> DeleteWorksp
33
35
  return None
34
36
 
35
37
 
36
- def _build_response(*, client: Client, response: httpx.Response) -> Response[DeleteWorkspaceServiceAccountResponse200]:
38
+ def _build_response(
39
+ *, client: Client, response: httpx.Response
40
+ ) -> Response[DeleteWorkspaceServiceAccountResponse200]:
37
41
  return Response(
38
42
  status_code=HTTPStatus(response.status_code),
39
43
  content=response.content,
@@ -27,7 +27,9 @@ def _parse_response(
27
27
  response_200 = []
28
28
  _response_200 = response.json()
29
29
  for response_200_item_data in _response_200:
30
- response_200_item = GetWorkspaceServiceAccountsResponse200Item.from_dict(response_200_item_data)
30
+ response_200_item = GetWorkspaceServiceAccountsResponse200Item.from_dict(
31
+ response_200_item_data
32
+ )
31
33
 
32
34
  response_200.append(response_200_item)
33
35
 
@@ -36,7 +36,9 @@ def _get_kwargs(
36
36
  return _kwargs
37
37
 
38
38
 
39
- def _parse_response(*, client: Client, response: httpx.Response) -> UpdateWorkspaceServiceAccountResponse200 | None:
39
+ def _parse_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> UpdateWorkspaceServiceAccountResponse200 | None:
40
42
  if response.status_code == 200:
41
43
  response_200 = UpdateWorkspaceServiceAccountResponse200.from_dict(response.json())
42
44
 
@@ -47,7 +49,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> UpdateWorksp
47
49
  return None
48
50
 
49
51
 
50
- def _build_response(*, client: Client, response: httpx.Response) -> Response[UpdateWorkspaceServiceAccountResponse200]:
52
+ def _build_response(
53
+ *, client: Client, response: httpx.Response
54
+ ) -> Response[UpdateWorkspaceServiceAccountResponse200]:
51
55
  return Response(
52
56
  status_code=HTTPStatus(response.status_code),
53
57
  content=response.content,
@@ -34,7 +34,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> list["Volume
34
34
  return None
35
35
 
36
36
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[list["VolumeTemplate"]]:
37
+ def _build_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Response[list["VolumeTemplate"]]:
38
40
  return Response(
39
41
  status_code=HTTPStatus(response.status_code),
40
42
  content=response.content,
@@ -20,7 +20,9 @@ def _get_kwargs(
20
20
  return _kwargs
21
21
 
22
22
 
23
- def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, PendingInvitationAccept] | None:
23
+ def _parse_response(
24
+ *, client: Client, response: httpx.Response
25
+ ) -> Union[Any, PendingInvitationAccept] | None:
24
26
  if response.status_code == 200:
25
27
  response_200 = PendingInvitationAccept.from_dict(response.json())
26
28
 
@@ -34,7 +36,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, P
34
36
  return None
35
37
 
36
38
 
37
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, PendingInvitationAccept]]:
39
+ def _build_response(
40
+ *, client: Client, response: httpx.Response
41
+ ) -> Response[Union[Any, PendingInvitationAccept]]:
38
42
  return Response(
39
43
  status_code=HTTPStatus(response.status_code),
40
44
  content=response.content,
@@ -33,7 +33,9 @@ def _get_kwargs(
33
33
  return _kwargs
34
34
 
35
35
 
36
- def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, PendingInvitation] | None:
36
+ def _parse_response(
37
+ *, client: Client, response: httpx.Response
38
+ ) -> Union[Any, PendingInvitation] | None:
37
39
  if response.status_code == 200:
38
40
  response_200 = PendingInvitation.from_dict(response.json())
39
41
 
@@ -50,7 +52,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, P
50
52
  return None
51
53
 
52
54
 
53
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, PendingInvitation]]:
55
+ def _build_response(
56
+ *, client: Client, response: httpx.Response
57
+ ) -> Response[Union[Any, PendingInvitation]]:
54
58
  return Response(
55
59
  status_code=HTTPStatus(response.status_code),
56
60
  content=response.content,
@@ -34,7 +34,9 @@ def _get_kwargs(
34
34
  return _kwargs
35
35
 
36
36
 
37
- def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, WorkspaceUser] | None:
37
+ def _parse_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Union[Any, WorkspaceUser] | None:
38
40
  if response.status_code == 200:
39
41
  response_200 = WorkspaceUser.from_dict(response.json())
40
42
 
@@ -51,7 +53,9 @@ def _parse_response(*, client: Client, response: httpx.Response) -> Union[Any, W
51
53
  return None
52
54
 
53
55
 
54
- def _build_response(*, client: Client, response: httpx.Response) -> Response[Union[Any, WorkspaceUser]]:
56
+ def _build_response(
57
+ *, client: Client, response: httpx.Response
58
+ ) -> Response[Union[Any, WorkspaceUser]]:
55
59
  return Response(
56
60
  status_code=HTTPStatus(response.status_code),
57
61
  content=response.content,
@@ -43,7 +43,9 @@ class Client:
43
43
  _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
44
44
  _auth: httpx.Auth = field(default=None, alias="auth")
45
45
  _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout")
46
- _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl")
46
+ _verify_ssl: Union[str, bool, ssl.SSLContext] = field(
47
+ default=True, kw_only=True, alias="verify_ssl"
48
+ )
47
49
  _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
48
50
  _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
49
51
  _client: httpx.Client | None = field(default=None, init=False)
@@ -32,7 +32,6 @@ class Agent:
32
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
33
 
34
34
  def to_dict(self) -> dict[str, Any]:
35
-
36
35
  events: Union[Unset, list[dict[str, Any]]] = UNSET
37
36
  if not isinstance(self.events, Unset):
38
37
  events = []
@@ -40,11 +39,17 @@ class Agent:
40
39
  if type(componentsschemas_core_events_item_data) is dict:
41
40
  componentsschemas_core_events_item = componentsschemas_core_events_item_data
42
41
  else:
43
- componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
42
+ componentsschemas_core_events_item = (
43
+ componentsschemas_core_events_item_data.to_dict()
44
+ )
44
45
  events.append(componentsschemas_core_events_item)
45
46
 
46
47
  metadata: Union[Unset, dict[str, Any]] = UNSET
47
- if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
48
+ if (
49
+ self.metadata
50
+ and not isinstance(self.metadata, Unset)
51
+ and not isinstance(self.metadata, dict)
52
+ ):
48
53
  metadata = self.metadata.to_dict()
49
54
  elif self.metadata and isinstance(self.metadata, dict):
50
55
  metadata = self.metadata
@@ -83,7 +88,9 @@ class Agent:
83
88
  events = []
84
89
  _events = d.pop("events", UNSET)
85
90
  for componentsschemas_core_events_item_data in _events or []:
86
- componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
91
+ componentsschemas_core_events_item = CoreEvent.from_dict(
92
+ componentsschemas_core_events_item_data
93
+ )
87
94
 
88
95
  events.append(componentsschemas_core_events_item)
89
96