e2b 2.63.0__tar.gz → 2.64.0__tar.gz

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 (267) hide show
  1. {e2b-2.63.0 → e2b-2.64.0}/PKG-INFO +1 -1
  2. {e2b-2.63.0 → e2b-2.64.0}/e2b/__init__.py +6 -0
  3. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/__init__.py +20 -4
  4. e2b-2.64.0/e2b/api/client/api/sandboxes/get_unstable_sandboxes_sandbox_id_record.py +191 -0
  5. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/__init__.py +2 -0
  6. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/new_sandbox.py +9 -0
  7. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/new_sandbox_v2.py +9 -0
  8. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/resumed_sandbox.py +9 -0
  9. e2b-2.64.0/e2b/api/client/models/sandbox_record.py +180 -0
  10. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template.py +9 -0
  11. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build.py +9 -0
  12. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_request_v3.py +9 -0
  13. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_with_builds.py +9 -0
  14. e2b-2.64.0/e2b/sandbox/commands/main.py +62 -0
  15. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/sandbox_api.py +2 -2
  16. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/commands/command.py +28 -4
  17. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/main.py +6 -0
  18. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/sandbox_api.py +4 -15
  19. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/commands/command.py +18 -3
  20. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/main.py +6 -0
  21. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/sandbox_api.py +4 -15
  22. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/types.py +92 -0
  23. {e2b-2.63.0 → e2b-2.64.0}/e2b/template_async/build_api.py +30 -0
  24. {e2b-2.63.0 → e2b-2.64.0}/e2b/template_async/main.py +66 -0
  25. e2b-2.64.0/e2b/template_async/paginator.py +62 -0
  26. {e2b-2.63.0 → e2b-2.64.0}/e2b/template_sync/build_api.py +28 -0
  27. {e2b-2.63.0 → e2b-2.64.0}/e2b/template_sync/main.py +66 -0
  28. e2b-2.64.0/e2b/template_sync/paginator.py +62 -0
  29. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +4 -0
  30. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +4 -0
  31. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_file.py +4 -0
  32. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_path.py +4 -0
  33. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +15 -10
  34. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +4 -0
  35. {e2b-2.63.0 → e2b-2.64.0}/pyproject.toml +1 -1
  36. {e2b-2.63.0 → e2b-2.64.0}/pyproject.toml.orig +1 -1
  37. e2b-2.63.0/e2b/sandbox/commands/main.py +0 -39
  38. {e2b-2.63.0 → e2b-2.64.0}/README.md +0 -0
  39. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/__init__.py +0 -0
  40. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/__init__.py +0 -0
  41. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/__init__.py +0 -0
  42. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
  43. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
  44. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
  45. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
  46. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
  47. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
  48. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
  49. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +0 -0
  50. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
  51. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +0 -0
  52. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +0 -0
  53. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
  54. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
  55. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
  56. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +0 -0
  57. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
  58. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_v2_sandboxes.py +0 -0
  59. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/post_v_2_sandboxes_sandbox_id_connect.py +0 -0
  60. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +0 -0
  61. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/__init__.py +0 -0
  62. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/delete_secrets_secret_id.py +0 -0
  63. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/get_secrets.py +0 -0
  64. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/get_secrets_secret_id.py +0 -0
  65. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/post_secrets.py +0 -0
  66. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/secrets/post_secrets_secret_id.py +0 -0
  67. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/snapshots/__init__.py +0 -0
  68. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/snapshots/get_snapshots.py +0 -0
  69. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/__init__.py +0 -0
  70. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/delete_templates_tags.py +0 -0
  71. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/get_templates_template_id_tags.py +0 -0
  72. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/get_templates_template_id_tags_count.py +0 -0
  73. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/get_templates_template_id_tags_exists.py +0 -0
  74. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/get_templates_template_id_tags_groups.py +0 -0
  75. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/get_templates_template_id_tags_tag_assignments.py +0 -0
  76. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/tags/post_templates_tags.py +0 -0
  77. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/__init__.py +0 -0
  78. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
  79. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_default_templates.py +0 -0
  80. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates.py +0 -0
  81. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates_aliases_alias.py +0 -0
  82. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates_template_id.py +0 -0
  83. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +0 -0
  84. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
  85. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +0 -0
  86. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/get_v2_templates.py +0 -0
  87. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
  88. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/patch_v_2_templates_template_id.py +0 -0
  89. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/post_v3_templates.py +0 -0
  90. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
  91. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/volumes/__init__.py +0 -0
  92. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/volumes/delete_volumes_volume_id.py +0 -0
  93. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/volumes/get_volumes.py +0 -0
  94. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/volumes/get_volumes_volume_id.py +0 -0
  95. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/api/volumes/post_volumes.py +0 -0
  96. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/client.py +0 -0
  97. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/errors.py +0 -0
  98. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/assign_template_tags_request.py +0 -0
  99. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/assigned_template_tags.py +0 -0
  100. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/aws_registry.py +0 -0
  101. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/aws_registry_type.py +0 -0
  102. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/build_log_entry.py +0 -0
  103. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/build_status_reason.py +0 -0
  104. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/connect_sandbox.py +0 -0
  105. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/connect_sandbox_v2.py +0 -0
  106. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/delete_template_tags_request.py +0 -0
  107. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/error.py +0 -0
  108. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/gcp_registry.py +0 -0
  109. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/gcp_registry_type.py +0 -0
  110. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/general_registry.py +0 -0
  111. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/general_registry_type.py +0 -0
  112. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/get_templates_template_id_tags_groups_sort.py +0 -0
  113. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/listed_sandbox.py +0 -0
  114. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/log_level.py +0 -0
  115. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/logs_direction.py +0 -0
  116. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/logs_source.py +0 -0
  117. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/mcp_type_0.py +0 -0
  118. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/new_secret.py +0 -0
  119. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/new_volume.py +0 -0
  120. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/order_direction.py +0 -0
  121. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox.py +0 -0
  122. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_auto_resume_config.py +0 -0
  123. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_detail.py +0 -0
  124. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_egress_proxy_config_type_0.py +0 -0
  125. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_egress_proxy_tls_config_type_0.py +0 -0
  126. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_fork_request.py +0 -0
  127. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_fork_result.py +0 -0
  128. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_iam.py +0 -0
  129. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_iam_token.py +0 -0
  130. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_iam_tokens.py +0 -0
  131. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_lifecycle.py +0 -0
  132. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_log.py +0 -0
  133. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_log_entry.py +0 -0
  134. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
  135. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_logs.py +0 -0
  136. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_logs_v2_response.py +0 -0
  137. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_metric.py +0 -0
  138. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_config.py +0 -0
  139. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_config_rules.py +0 -0
  140. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_rule.py +0 -0
  141. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_transform.py +0 -0
  142. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_transform_headers.py +0 -0
  143. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_update_config.py +0 -0
  144. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_network_update_config_rules.py +0 -0
  145. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_on_timeout.py +0 -0
  146. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_pause_mode.py +0 -0
  147. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_pause_request.py +0 -0
  148. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_refresh_request.py +0 -0
  149. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_snapshot_request.py +0 -0
  150. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_state.py +0 -0
  151. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_timeout_request.py +0 -0
  152. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandbox_volume_mount.py +0 -0
  153. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
  154. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/secret.py +0 -0
  155. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/secret_metadata.py +0 -0
  156. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/secret_update.py +0 -0
  157. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/snapshot_info.py +0 -0
  158. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/team_user.py +0 -0
  159. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_alias_response.py +0 -0
  160. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_file_upload.py +0 -0
  161. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_file_upload_headers.py +0 -0
  162. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_info.py +0 -0
  163. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_logs_response.py +0 -0
  164. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_start_v2.py +0 -0
  165. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_build_status.py +0 -0
  166. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_request_response_v3.py +0 -0
  167. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_step.py +0 -0
  168. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag.py +0 -0
  169. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag_assignment.py +0 -0
  170. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag_assignments_response.py +0 -0
  171. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag_exists_response.py +0 -0
  172. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag_group.py +0 -0
  173. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tag_groups_response.py +0 -0
  174. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_tags_count_response.py +0 -0
  175. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_update_request.py +0 -0
  176. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/template_update_response.py +0 -0
  177. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/volume.py +0 -0
  178. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/models/volume_and_token.py +0 -0
  179. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/py.typed +0 -0
  180. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client/types.py +0 -0
  181. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client_async/__init__.py +0 -0
  182. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/client_sync/__init__.py +0 -0
  183. {e2b-2.63.0 → e2b-2.64.0}/e2b/api/metadata.py +0 -0
  184. {e2b-2.63.0 → e2b-2.64.0}/e2b/client.py +0 -0
  185. {e2b-2.63.0 → e2b-2.64.0}/e2b/connection_config.py +0 -0
  186. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/__init__.py +0 -0
  187. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/api.py +0 -0
  188. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/client_async/__init__.py +0 -0
  189. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/client_shared.py +0 -0
  190. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/client_sync/__init__.py +0 -0
  191. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/filesystem/__init__.py +0 -0
  192. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/filesystem/filesystem_connect.py +0 -0
  193. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/filesystem/filesystem_pb.py +0 -0
  194. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/interceptors.py +0 -0
  195. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/process/__init__.py +0 -0
  196. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/process/process_connect.py +0 -0
  197. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/process/process_pb.py +0 -0
  198. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/rpc.py +0 -0
  199. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/utils.py +0 -0
  200. {e2b-2.63.0 → e2b-2.64.0}/e2b/envd/versions.py +0 -0
  201. {e2b-2.63.0 → e2b-2.64.0}/e2b/exceptions.py +0 -0
  202. {e2b-2.63.0 → e2b-2.64.0}/e2b/io_utils.py +0 -0
  203. {e2b-2.63.0 → e2b-2.64.0}/e2b/paginator.py +0 -0
  204. {e2b-2.63.0 → e2b-2.64.0}/e2b/py.typed +0 -0
  205. {e2b-2.63.0 → e2b-2.64.0}/e2b/retry.py +0 -0
  206. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/__init__.py +0 -0
  207. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/args.py +0 -0
  208. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/auth.py +0 -0
  209. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/config.py +0 -0
  210. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/parse.py +0 -0
  211. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/_git/types.py +0 -0
  212. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/commands/command_handle.py +0 -0
  213. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/commands/stream_input.py +0 -0
  214. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/filesystem/filesystem.py +0 -0
  215. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/filesystem/watch_handle.py +0 -0
  216. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/iam.py +0 -0
  217. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/main.py +0 -0
  218. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/mcp.py +0 -0
  219. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/network.py +0 -0
  220. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/signature.py +0 -0
  221. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox/utils.py +0 -0
  222. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/commands/command_handle.py +0 -0
  223. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/commands/command_input_handle.py +0 -0
  224. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/commands/pty.py +0 -0
  225. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/filesystem/filesystem.py +0 -0
  226. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
  227. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/git.py +0 -0
  228. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/paginator.py +0 -0
  229. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_async/utils.py +0 -0
  230. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_domains.py +0 -0
  231. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/commands/command_handle.py +0 -0
  232. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/commands/pty.py +0 -0
  233. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
  234. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
  235. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/git.py +0 -0
  236. {e2b-2.63.0 → e2b-2.64.0}/e2b/sandbox_sync/paginator.py +0 -0
  237. {e2b-2.63.0 → e2b-2.64.0}/e2b/secret/__init__.py +0 -0
  238. {e2b-2.63.0 → e2b-2.64.0}/e2b/secret/base.py +0 -0
  239. {e2b-2.63.0 → e2b-2.64.0}/e2b/secret/secret_async.py +0 -0
  240. {e2b-2.63.0 → e2b-2.64.0}/e2b/secret/secret_sync.py +0 -0
  241. {e2b-2.63.0 → e2b-2.64.0}/e2b/secret/types.py +0 -0
  242. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/consts.py +0 -0
  243. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/dockerfile_parser.py +0 -0
  244. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/logger.py +0 -0
  245. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/main.py +0 -0
  246. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/readycmd.py +0 -0
  247. {e2b-2.63.0 → e2b-2.64.0}/e2b/template/utils.py +0 -0
  248. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/__init__.py +0 -0
  249. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/__init__.py +0 -0
  250. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/__init__.py +0 -0
  251. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/api/volumes/put_volumecontent_volume_id_file.py +0 -0
  252. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/client.py +0 -0
  253. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/errors.py +0 -0
  254. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/models/__init__.py +0 -0
  255. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/models/error.py +0 -0
  256. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/models/patch_volumecontent_volume_id_path_body.py +0 -0
  257. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/models/volume_entry_stat.py +0 -0
  258. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/models/volume_entry_stat_type.py +0 -0
  259. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/py.typed +0 -0
  260. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client/types.py +0 -0
  261. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client_async/__init__.py +0 -0
  262. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/client_sync/__init__.py +0 -0
  263. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/connection_config.py +0 -0
  264. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/types.py +0 -0
  265. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/utils.py +0 -0
  266. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/volume_async.py +0 -0
  267. {e2b-2.63.0 → e2b-2.64.0}/e2b/volume/volume_sync.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: e2b
3
- Version: 2.63.0
3
+ Version: 2.64.0
4
4
  Summary: E2B SDK that give agents cloud environments
5
5
  Author: e2b
6
6
  Author-email: e2b <hello@e2b.dev>
@@ -160,11 +160,14 @@ from .template.types import (
160
160
  CopyItem,
161
161
  TemplateBuildStatus,
162
162
  TemplateBuildStatusResponse,
163
+ TemplateInfo,
163
164
  TemplateTag,
164
165
  TemplateTagInfo,
165
166
  )
166
167
  from .template_async.main import AsyncTemplate
168
+ from .template_async.paginator import AsyncTemplatePaginator
167
169
  from .template_sync.main import Template
170
+ from .template_sync.paginator import TemplatePaginator
168
171
 
169
172
  from .volume.volume_sync import Volume
170
173
  from .volume.volume_async import AsyncVolume
@@ -302,6 +305,9 @@ __all__ = [
302
305
  "BuildStatusReason",
303
306
  "TemplateBuildStatus",
304
307
  "TemplateBuildStatusResponse",
308
+ "TemplateInfo",
309
+ "TemplatePaginator",
310
+ "AsyncTemplatePaginator",
305
311
  "TemplateTag",
306
312
  "TemplateTagInfo",
307
313
  "ReadyCmd",
@@ -246,15 +246,31 @@ class ApiClient(AuthenticatedClient):
246
246
  ):
247
247
  self._proxy = config.proxy
248
248
 
249
- if config.api_key is None:
249
+ # An `Authorization` header (e.g. an OAuth access token passed through
250
+ # `api_headers`) authenticates the request in place of an API key.
251
+ authorization = next(
252
+ (
253
+ (name, value)
254
+ for name, value in (config.headers or {}).items()
255
+ if name.lower() == "authorization"
256
+ ),
257
+ None,
258
+ )
259
+
260
+ # Like the JS SDK, an empty E2B_API_KEY counts as unset.
261
+ if config.api_key:
262
+ token = config.api_key
263
+ auth_header_name = "X-API-KEY"
264
+ elif authorization is not None:
265
+ # The generated client always writes `token` to `auth_header_name`;
266
+ # point it at the caller's own header so it isn't sent twice.
267
+ auth_header_name, token = authorization
268
+ else:
250
269
  raise AuthenticationException(
251
270
  "API key is required, please visit the API Keys tab at https://e2b.dev/dashboard?tab=keys to get your API key. "
252
271
  "You can either set the environment variable `E2B_API_KEY` "
253
272
  'or you can pass it directly to the method like api_key="e2b_..."',
254
273
  )
255
-
256
- token = config.api_key
257
- auth_header_name = "X-API-KEY"
258
274
  prefix = ""
259
275
 
260
276
  self._logger = config.logger
@@ -0,0 +1,191 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.error import Error
9
+ from ...models.sandbox_record import SandboxRecord
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ sandbox_id: str,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "get",
18
+ "url": f"/unstable/sandboxes/{sandbox_id}/record",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(
25
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
26
+ ) -> Optional[Union[Error, SandboxRecord]]:
27
+ if response.status_code == 200:
28
+ response_200 = SandboxRecord.from_dict(response.json())
29
+
30
+ return response_200
31
+ if response.status_code == 400:
32
+ response_400 = Error.from_dict(response.json())
33
+
34
+ return response_400
35
+ if response.status_code == 401:
36
+ response_401 = Error.from_dict(response.json())
37
+
38
+ return response_401
39
+ if response.status_code == 403:
40
+ response_403 = Error.from_dict(response.json())
41
+
42
+ return response_403
43
+ if response.status_code == 404:
44
+ response_404 = Error.from_dict(response.json())
45
+
46
+ return response_404
47
+ if response.status_code == 429:
48
+ response_429 = Error.from_dict(response.json())
49
+
50
+ return response_429
51
+ if response.status_code == 500:
52
+ response_500 = Error.from_dict(response.json())
53
+
54
+ return response_500
55
+ if client.raise_on_unexpected_status:
56
+ raise errors.UnexpectedStatus(response.status_code, response.content)
57
+ else:
58
+ return None
59
+
60
+
61
+ def _build_response(
62
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
63
+ ) -> Response[Union[Error, SandboxRecord]]:
64
+ return Response(
65
+ status_code=HTTPStatus(response.status_code),
66
+ content=response.content,
67
+ headers=response.headers,
68
+ parsed=_parse_response(client=client, response=response),
69
+ )
70
+
71
+
72
+ def sync_detailed(
73
+ sandbox_id: str,
74
+ *,
75
+ client: AuthenticatedClient,
76
+ ) -> Response[Union[Error, SandboxRecord]]:
77
+ """Sandbox record
78
+
79
+ Returns the team's latest recorded run of the sandbox, including runs that have already ended, and
80
+ whether its monitoring, logs and events data are still retained. Returns 404 when the team has no
81
+ recorded run of the sandbox.
82
+
83
+ Args:
84
+ sandbox_id (str):
85
+
86
+ Raises:
87
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
89
+
90
+ Returns:
91
+ Response[Union[Error, SandboxRecord]]
92
+ """
93
+
94
+ kwargs = _get_kwargs(
95
+ sandbox_id=sandbox_id,
96
+ )
97
+
98
+ response = client.get_httpx_client().request(
99
+ **kwargs,
100
+ )
101
+
102
+ return _build_response(client=client, response=response)
103
+
104
+
105
+ def sync(
106
+ sandbox_id: str,
107
+ *,
108
+ client: AuthenticatedClient,
109
+ ) -> Optional[Union[Error, SandboxRecord]]:
110
+ """Sandbox record
111
+
112
+ Returns the team's latest recorded run of the sandbox, including runs that have already ended, and
113
+ whether its monitoring, logs and events data are still retained. Returns 404 when the team has no
114
+ recorded run of the sandbox.
115
+
116
+ Args:
117
+ sandbox_id (str):
118
+
119
+ Raises:
120
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
121
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
122
+
123
+ Returns:
124
+ Union[Error, SandboxRecord]
125
+ """
126
+
127
+ return sync_detailed(
128
+ sandbox_id=sandbox_id,
129
+ client=client,
130
+ ).parsed
131
+
132
+
133
+ async def asyncio_detailed(
134
+ sandbox_id: str,
135
+ *,
136
+ client: AuthenticatedClient,
137
+ ) -> Response[Union[Error, SandboxRecord]]:
138
+ """Sandbox record
139
+
140
+ Returns the team's latest recorded run of the sandbox, including runs that have already ended, and
141
+ whether its monitoring, logs and events data are still retained. Returns 404 when the team has no
142
+ recorded run of the sandbox.
143
+
144
+ Args:
145
+ sandbox_id (str):
146
+
147
+ Raises:
148
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
149
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
150
+
151
+ Returns:
152
+ Response[Union[Error, SandboxRecord]]
153
+ """
154
+
155
+ kwargs = _get_kwargs(
156
+ sandbox_id=sandbox_id,
157
+ )
158
+
159
+ response = await client.get_async_httpx_client().request(**kwargs)
160
+
161
+ return _build_response(client=client, response=response)
162
+
163
+
164
+ async def asyncio(
165
+ sandbox_id: str,
166
+ *,
167
+ client: AuthenticatedClient,
168
+ ) -> Optional[Union[Error, SandboxRecord]]:
169
+ """Sandbox record
170
+
171
+ Returns the team's latest recorded run of the sandbox, including runs that have already ended, and
172
+ whether its monitoring, logs and events data are still retained. Returns 404 when the team has no
173
+ recorded run of the sandbox.
174
+
175
+ Args:
176
+ sandbox_id (str):
177
+
178
+ Raises:
179
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
180
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
181
+
182
+ Returns:
183
+ Union[Error, SandboxRecord]
184
+ """
185
+
186
+ return (
187
+ await asyncio_detailed(
188
+ sandbox_id=sandbox_id,
189
+ client=client,
190
+ )
191
+ ).parsed
@@ -55,6 +55,7 @@ from .sandbox_network_update_config_rules import SandboxNetworkUpdateConfigRules
55
55
  from .sandbox_on_timeout import SandboxOnTimeout
56
56
  from .sandbox_pause_mode import SandboxPauseMode
57
57
  from .sandbox_pause_request import SandboxPauseRequest
58
+ from .sandbox_record import SandboxRecord
58
59
  from .sandbox_refresh_request import SandboxRefreshRequest
59
60
  from .sandbox_snapshot_request import SandboxSnapshotRequest
60
61
  from .sandbox_state import SandboxState
@@ -146,6 +147,7 @@ __all__ = (
146
147
  "SandboxOnTimeout",
147
148
  "SandboxPauseMode",
148
149
  "SandboxPauseRequest",
150
+ "SandboxRecord",
149
151
  "SandboxRefreshRequest",
150
152
  "SandboxSnapshotRequest",
151
153
  "SandboxState",
@@ -23,6 +23,7 @@ class NewSandbox:
23
23
  Attributes:
24
24
  template_id (str): Identifier of the required template
25
25
  timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
26
+ cpu_count (Union[Unset, int]): CPU cores for the sandbox
26
27
  auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout Default: False.
27
28
  auto_pause_memory (Union[Unset, bool]): Controls the snapshot kind taken when the sandbox auto-pauses on timeout
28
29
  (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only
@@ -45,6 +46,7 @@ class NewSandbox:
45
46
 
46
47
  template_id: str
47
48
  timeout: Union[Unset, int] = 15
49
+ cpu_count: Union[Unset, int] = UNSET
48
50
  auto_pause: Union[Unset, bool] = False
49
51
  auto_pause_memory: Union[Unset, bool] = True
50
52
  auto_resume: Union[Unset, "SandboxAutoResumeConfig"] = UNSET
@@ -65,6 +67,8 @@ class NewSandbox:
65
67
 
66
68
  timeout = self.timeout
67
69
 
70
+ cpu_count = self.cpu_count
71
+
68
72
  auto_pause = self.auto_pause
69
73
 
70
74
  auto_pause_memory = self.auto_pause_memory
@@ -113,6 +117,8 @@ class NewSandbox:
113
117
  )
114
118
  if timeout is not UNSET:
115
119
  field_dict["timeout"] = timeout
120
+ if cpu_count is not UNSET:
121
+ field_dict["cpuCount"] = cpu_count
116
122
  if auto_pause is not UNSET:
117
123
  field_dict["autoPause"] = auto_pause
118
124
  if auto_pause_memory is not UNSET:
@@ -151,6 +157,8 @@ class NewSandbox:
151
157
 
152
158
  timeout = d.pop("timeout", UNSET)
153
159
 
160
+ cpu_count = d.pop("cpuCount", UNSET)
161
+
154
162
  auto_pause = d.pop("autoPause", UNSET)
155
163
 
156
164
  auto_pause_memory = d.pop("autoPauseMemory", UNSET)
@@ -211,6 +219,7 @@ class NewSandbox:
211
219
  new_sandbox = cls(
212
220
  template_id=template_id,
213
221
  timeout=timeout,
222
+ cpu_count=cpu_count,
214
223
  auto_pause=auto_pause,
215
224
  auto_pause_memory=auto_pause_memory,
216
225
  auto_resume=auto_resume,
@@ -25,6 +25,7 @@ class NewSandboxV2:
25
25
  Attributes:
26
26
  template_id (str): Identifier of the required template
27
27
  timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 300.
28
+ cpu_count (Union[Unset, int]): CPU cores for the sandbox
28
29
  auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout Default: False.
29
30
  auto_pause_memory (Union[Unset, bool]): Controls the snapshot kind taken when the sandbox auto-pauses on timeout
30
31
  (only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only
@@ -45,6 +46,7 @@ class NewSandboxV2:
45
46
 
46
47
  template_id: str
47
48
  timeout: Union[Unset, int] = 300
49
+ cpu_count: Union[Unset, int] = UNSET
48
50
  auto_pause: Union[Unset, bool] = False
49
51
  auto_pause_memory: Union[Unset, bool] = True
50
52
  auto_resume: Union[Unset, "SandboxAutoResumeConfig"] = UNSET
@@ -64,6 +66,8 @@ class NewSandboxV2:
64
66
 
65
67
  timeout = self.timeout
66
68
 
69
+ cpu_count = self.cpu_count
70
+
67
71
  auto_pause = self.auto_pause
68
72
 
69
73
  auto_pause_memory = self.auto_pause_memory
@@ -110,6 +114,8 @@ class NewSandboxV2:
110
114
  )
111
115
  if timeout is not UNSET:
112
116
  field_dict["timeout"] = timeout
117
+ if cpu_count is not UNSET:
118
+ field_dict["cpuCount"] = cpu_count
113
119
  if auto_pause is not UNSET:
114
120
  field_dict["autoPause"] = auto_pause
115
121
  if auto_pause_memory is not UNSET:
@@ -146,6 +152,8 @@ class NewSandboxV2:
146
152
 
147
153
  timeout = d.pop("timeout", UNSET)
148
154
 
155
+ cpu_count = d.pop("cpuCount", UNSET)
156
+
149
157
  auto_pause = d.pop("autoPause", UNSET)
150
158
 
151
159
  auto_pause_memory = d.pop("autoPauseMemory", UNSET)
@@ -204,6 +212,7 @@ class NewSandboxV2:
204
212
  new_sandbox_v2 = cls(
205
213
  template_id=template_id,
206
214
  timeout=timeout,
215
+ cpu_count=cpu_count,
207
216
  auto_pause=auto_pause,
208
217
  auto_pause_memory=auto_pause_memory,
209
218
  auto_resume=auto_resume,
@@ -14,6 +14,7 @@ class ResumedSandbox:
14
14
  """
15
15
  Attributes:
16
16
  timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
17
+ cpu_count (Union[Unset, int]): CPU cores for the sandbox
17
18
  auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
18
19
  memory (Union[Unset, bool]): Defaults to true. When false, resume from disk state only: the sandbox cold-boots
19
20
  fresh and any memory in the snapshot is ignored, never modified or deleted. Disk state has crash-recovery
@@ -24,6 +25,7 @@ class ResumedSandbox:
24
25
  """
25
26
 
26
27
  timeout: Union[Unset, int] = 15
28
+ cpu_count: Union[Unset, int] = UNSET
27
29
  auto_pause: Union[Unset, bool] = UNSET
28
30
  memory: Union[Unset, bool] = UNSET
29
31
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -31,6 +33,8 @@ class ResumedSandbox:
31
33
  def to_dict(self) -> dict[str, Any]:
32
34
  timeout = self.timeout
33
35
 
36
+ cpu_count = self.cpu_count
37
+
34
38
  auto_pause = self.auto_pause
35
39
 
36
40
  memory = self.memory
@@ -40,6 +44,8 @@ class ResumedSandbox:
40
44
  field_dict.update({})
41
45
  if timeout is not UNSET:
42
46
  field_dict["timeout"] = timeout
47
+ if cpu_count is not UNSET:
48
+ field_dict["cpuCount"] = cpu_count
43
49
  if auto_pause is not UNSET:
44
50
  field_dict["autoPause"] = auto_pause
45
51
  if memory is not UNSET:
@@ -52,12 +58,15 @@ class ResumedSandbox:
52
58
  d = dict(src_dict)
53
59
  timeout = d.pop("timeout", UNSET)
54
60
 
61
+ cpu_count = d.pop("cpuCount", UNSET)
62
+
55
63
  auto_pause = d.pop("autoPause", UNSET)
56
64
 
57
65
  memory = d.pop("memory", UNSET)
58
66
 
59
67
  resumed_sandbox = cls(
60
68
  timeout=timeout,
69
+ cpu_count=cpu_count,
61
70
  auto_pause=auto_pause,
62
71
  memory=memory,
63
72
  )
@@ -0,0 +1,180 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar, Union, cast
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+ from dateutil.parser import isoparse
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ T = TypeVar("T", bound="SandboxRecord")
12
+
13
+
14
+ @_attrs_define
15
+ class SandboxRecord:
16
+ """
17
+ Attributes:
18
+ template_id (str): Identifier of the template from which is the sandbox created
19
+ sandbox_id (str): Identifier of the sandbox
20
+ started_at (datetime.datetime): Time when the sandbox was started
21
+ cpu_count (int): CPU cores for the sandbox
22
+ memory_mb (int): Memory for the sandbox in MiB
23
+ disk_size_mb (int): Disk size for the sandbox in MiB
24
+ retention_expired (bool): Whether the sandbox ended more than the fixed retention window ago, so its monitoring
25
+ and logs data is no longer available
26
+ events_retention_expired (bool): Whether the sandbox ended more than the team's events retention window ago, so
27
+ its events data is no longer available
28
+ alias (Union[Unset, str]): Alias of the template
29
+ stopped_at (Union[None, Unset, datetime.datetime]): Time when the sandbox was stopped
30
+ domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
31
+ """
32
+
33
+ template_id: str
34
+ sandbox_id: str
35
+ started_at: datetime.datetime
36
+ cpu_count: int
37
+ memory_mb: int
38
+ disk_size_mb: int
39
+ retention_expired: bool
40
+ events_retention_expired: bool
41
+ alias: Union[Unset, str] = UNSET
42
+ stopped_at: Union[None, Unset, datetime.datetime] = UNSET
43
+ domain: Union[None, Unset, str] = UNSET
44
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
45
+
46
+ def to_dict(self) -> dict[str, Any]:
47
+ template_id = self.template_id
48
+
49
+ sandbox_id = self.sandbox_id
50
+
51
+ started_at = self.started_at.isoformat()
52
+
53
+ cpu_count = self.cpu_count
54
+
55
+ memory_mb = self.memory_mb
56
+
57
+ disk_size_mb = self.disk_size_mb
58
+
59
+ retention_expired = self.retention_expired
60
+
61
+ events_retention_expired = self.events_retention_expired
62
+
63
+ alias = self.alias
64
+
65
+ stopped_at: Union[None, Unset, str]
66
+ if isinstance(self.stopped_at, Unset):
67
+ stopped_at = UNSET
68
+ elif isinstance(self.stopped_at, datetime.datetime):
69
+ stopped_at = self.stopped_at.isoformat()
70
+ else:
71
+ stopped_at = self.stopped_at
72
+
73
+ domain: Union[None, Unset, str]
74
+ if isinstance(self.domain, Unset):
75
+ domain = UNSET
76
+ else:
77
+ domain = self.domain
78
+
79
+ field_dict: dict[str, Any] = {}
80
+ field_dict.update(self.additional_properties)
81
+ field_dict.update(
82
+ {
83
+ "templateID": template_id,
84
+ "sandboxID": sandbox_id,
85
+ "startedAt": started_at,
86
+ "cpuCount": cpu_count,
87
+ "memoryMB": memory_mb,
88
+ "diskSizeMB": disk_size_mb,
89
+ "retentionExpired": retention_expired,
90
+ "eventsRetentionExpired": events_retention_expired,
91
+ }
92
+ )
93
+ if alias is not UNSET:
94
+ field_dict["alias"] = alias
95
+ if stopped_at is not UNSET:
96
+ field_dict["stoppedAt"] = stopped_at
97
+ if domain is not UNSET:
98
+ field_dict["domain"] = domain
99
+
100
+ return field_dict
101
+
102
+ @classmethod
103
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
104
+ d = dict(src_dict)
105
+ template_id = d.pop("templateID")
106
+
107
+ sandbox_id = d.pop("sandboxID")
108
+
109
+ started_at = isoparse(d.pop("startedAt"))
110
+
111
+ cpu_count = d.pop("cpuCount")
112
+
113
+ memory_mb = d.pop("memoryMB")
114
+
115
+ disk_size_mb = d.pop("diskSizeMB")
116
+
117
+ retention_expired = d.pop("retentionExpired")
118
+
119
+ events_retention_expired = d.pop("eventsRetentionExpired")
120
+
121
+ alias = d.pop("alias", UNSET)
122
+
123
+ def _parse_stopped_at(data: object) -> Union[None, Unset, datetime.datetime]:
124
+ if data is None:
125
+ return data
126
+ if isinstance(data, Unset):
127
+ return data
128
+ try:
129
+ if not isinstance(data, str):
130
+ raise TypeError()
131
+ stopped_at_type_0 = isoparse(data)
132
+
133
+ return stopped_at_type_0
134
+ except: # noqa: E722
135
+ pass
136
+ return cast(Union[None, Unset, datetime.datetime], data)
137
+
138
+ stopped_at = _parse_stopped_at(d.pop("stoppedAt", UNSET))
139
+
140
+ def _parse_domain(data: object) -> Union[None, Unset, str]:
141
+ if data is None:
142
+ return data
143
+ if isinstance(data, Unset):
144
+ return data
145
+ return cast(Union[None, Unset, str], data)
146
+
147
+ domain = _parse_domain(d.pop("domain", UNSET))
148
+
149
+ sandbox_record = cls(
150
+ template_id=template_id,
151
+ sandbox_id=sandbox_id,
152
+ started_at=started_at,
153
+ cpu_count=cpu_count,
154
+ memory_mb=memory_mb,
155
+ disk_size_mb=disk_size_mb,
156
+ retention_expired=retention_expired,
157
+ events_retention_expired=events_retention_expired,
158
+ alias=alias,
159
+ stopped_at=stopped_at,
160
+ domain=domain,
161
+ )
162
+
163
+ sandbox_record.additional_properties = d
164
+ return sandbox_record
165
+
166
+ @property
167
+ def additional_keys(self) -> list[str]:
168
+ return list(self.additional_properties.keys())
169
+
170
+ def __getitem__(self, key: str) -> Any:
171
+ return self.additional_properties[key]
172
+
173
+ def __setitem__(self, key: str, value: Any) -> None:
174
+ self.additional_properties[key] = value
175
+
176
+ def __delitem__(self, key: str) -> None:
177
+ del self.additional_properties[key]
178
+
179
+ def __contains__(self, key: str) -> bool:
180
+ return key in self.additional_properties
@@ -36,6 +36,7 @@ class Template:
36
36
  build_count (int): Number of times the template was built
37
37
  envd_version (str): Version of the envd running in the sandbox
38
38
  build_status (TemplateBuildStatus): Status of the template build
39
+ max_cpu_count (Union[Unset, int]): CPU cores for the sandbox
39
40
  is_default (Union[Unset, bool]): Whether the template is one of the platform's default templates. A default
40
41
  template owned by another team carries zero or null usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`,
41
42
  `createdBy`).
@@ -58,6 +59,7 @@ class Template:
58
59
  build_count: int
59
60
  envd_version: str
60
61
  build_status: TemplateBuildStatus
62
+ max_cpu_count: Union[Unset, int] = UNSET
61
63
  is_default: Union[Unset, bool] = UNSET
62
64
  description: Union[Unset, str] = UNSET
63
65
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -105,6 +107,8 @@ class Template:
105
107
 
106
108
  build_status = self.build_status.value
107
109
 
110
+ max_cpu_count = self.max_cpu_count
111
+
108
112
  is_default = self.is_default
109
113
 
110
114
  description = self.description
@@ -131,6 +135,8 @@ class Template:
131
135
  "buildStatus": build_status,
132
136
  }
133
137
  )
138
+ if max_cpu_count is not UNSET:
139
+ field_dict["maxCpuCount"] = max_cpu_count
134
140
  if is_default is not UNSET:
135
141
  field_dict["isDefault"] = is_default
136
142
  if description is not UNSET:
@@ -201,6 +207,8 @@ class Template:
201
207
 
202
208
  build_status = TemplateBuildStatus(d.pop("buildStatus"))
203
209
 
210
+ max_cpu_count = d.pop("maxCpuCount", UNSET)
211
+
204
212
  is_default = d.pop("isDefault", UNSET)
205
213
 
206
214
  description = d.pop("description", UNSET)
@@ -222,6 +230,7 @@ class Template:
222
230
  build_count=build_count,
223
231
  envd_version=envd_version,
224
232
  build_status=build_status,
233
+ max_cpu_count=max_cpu_count,
225
234
  is_default=is_default,
226
235
  description=description,
227
236
  )