e2b 2.66.0__tar.gz → 2.67.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 (273) hide show
  1. {e2b-2.66.0 → e2b-2.67.0}/PKG-INFO +1 -1
  2. e2b-2.67.0/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_paused_retention.py +215 -0
  3. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/__init__.py +2 -0
  4. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/listed_sandbox.py +44 -1
  5. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/new_sandbox_v2.py +24 -0
  6. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_detail.py +43 -0
  7. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_config.py +27 -0
  8. e2b-2.67.0/e2b/api/client/models/sandbox_paused_retention_request.py +70 -0
  9. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/sandbox_api.py +79 -1
  10. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/main.py +93 -0
  11. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/sandbox_api.py +36 -0
  12. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/main.py +93 -0
  13. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/sandbox_api.py +36 -0
  14. {e2b-2.66.0 → e2b-2.67.0}/pyproject.toml +1 -1
  15. {e2b-2.66.0 → e2b-2.67.0}/pyproject.toml.orig +1 -1
  16. {e2b-2.66.0 → e2b-2.67.0}/README.md +0 -0
  17. {e2b-2.66.0 → e2b-2.67.0}/e2b/__init__.py +0 -0
  18. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/__init__.py +0 -0
  19. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/__init__.py +0 -0
  20. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/__init__.py +0 -0
  21. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/__init__.py +0 -0
  22. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
  23. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
  24. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
  25. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
  26. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
  27. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
  28. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_unstable_sandboxes_sandbox_id_record.py +0 -0
  29. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
  30. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +0 -0
  31. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
  32. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +0 -0
  33. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_fork.py +0 -0
  34. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
  35. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
  36. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
  37. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +0 -0
  38. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
  39. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_v2_sandboxes.py +0 -0
  40. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/post_v_2_sandboxes_sandbox_id_connect.py +0 -0
  41. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +0 -0
  42. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/__init__.py +0 -0
  43. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/delete_secrets_secret_id.py +0 -0
  44. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/get_secrets.py +0 -0
  45. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/get_secrets_secret_id.py +0 -0
  46. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/post_secrets.py +0 -0
  47. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/secrets/post_secrets_secret_id.py +0 -0
  48. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/snapshots/__init__.py +0 -0
  49. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/snapshots/get_snapshots.py +0 -0
  50. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/__init__.py +0 -0
  51. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/delete_templates_tags.py +0 -0
  52. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/get_templates_template_id_tags.py +0 -0
  53. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/get_templates_template_id_tags_count.py +0 -0
  54. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/get_templates_template_id_tags_exists.py +0 -0
  55. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/get_templates_template_id_tags_groups.py +0 -0
  56. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/get_templates_template_id_tags_tag_assignments.py +0 -0
  57. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/tags/post_templates_tags.py +0 -0
  58. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/__init__.py +0 -0
  59. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
  60. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_default_templates.py +0 -0
  61. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates.py +0 -0
  62. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_aliases_alias.py +0 -0
  63. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_template_id.py +0 -0
  64. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_template_id_builds.py +0 -0
  65. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +0 -0
  66. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
  67. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +0 -0
  68. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_v2_templates.py +0 -0
  69. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/get_v_2_templates_template_id.py +0 -0
  70. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
  71. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/patch_v_2_templates_template_id.py +0 -0
  72. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/post_v3_templates.py +0 -0
  73. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
  74. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/volumes/__init__.py +0 -0
  75. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/volumes/delete_volumes_volume_id.py +0 -0
  76. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/volumes/get_volumes.py +0 -0
  77. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/volumes/get_volumes_volume_id.py +0 -0
  78. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/api/volumes/post_volumes.py +0 -0
  79. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/client.py +0 -0
  80. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/errors.py +0 -0
  81. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/assign_template_tags_request.py +0 -0
  82. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/assigned_template_tags.py +0 -0
  83. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/aws_registry.py +0 -0
  84. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/aws_registry_type.py +0 -0
  85. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/build_log_entry.py +0 -0
  86. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/build_status_reason.py +0 -0
  87. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/connect_sandbox.py +0 -0
  88. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/connect_sandbox_v2.py +0 -0
  89. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/delete_template_tags_request.py +0 -0
  90. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/error.py +0 -0
  91. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/gcp_registry.py +0 -0
  92. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/gcp_registry_type.py +0 -0
  93. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/general_registry.py +0 -0
  94. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/general_registry_type.py +0 -0
  95. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/get_templates_template_id_tags_groups_sort.py +0 -0
  96. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/log_level.py +0 -0
  97. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/logs_direction.py +0 -0
  98. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/logs_source.py +0 -0
  99. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/mcp_type_0.py +0 -0
  100. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/new_sandbox.py +0 -0
  101. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/new_secret.py +0 -0
  102. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/new_volume.py +0 -0
  103. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/order_direction.py +0 -0
  104. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/resumed_sandbox.py +0 -0
  105. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox.py +0 -0
  106. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_auto_resume_config.py +0 -0
  107. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_egress_proxy_config_type_0.py +0 -0
  108. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_egress_proxy_tls_config_type_0.py +0 -0
  109. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_fork_request.py +0 -0
  110. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_fork_result.py +0 -0
  111. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_iam.py +0 -0
  112. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_iam_token.py +0 -0
  113. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_iam_tokens.py +0 -0
  114. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_lifecycle.py +0 -0
  115. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_log.py +0 -0
  116. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_log_entry.py +0 -0
  117. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
  118. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_logs.py +0 -0
  119. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_logs_v2_response.py +0 -0
  120. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_metric.py +0 -0
  121. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_config_rules.py +0 -0
  122. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_rule.py +0 -0
  123. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_transform.py +0 -0
  124. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_transform_headers.py +0 -0
  125. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_update_config.py +0 -0
  126. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_network_update_config_rules.py +0 -0
  127. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_on_timeout.py +0 -0
  128. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_pause_mode.py +0 -0
  129. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_pause_request.py +0 -0
  130. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_record.py +0 -0
  131. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_refresh_request.py +0 -0
  132. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_snapshot_request.py +0 -0
  133. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_state.py +0 -0
  134. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_timeout_request.py +0 -0
  135. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandbox_volume_mount.py +0 -0
  136. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
  137. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/secret.py +0 -0
  138. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/secret_metadata.py +0 -0
  139. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/secret_update.py +0 -0
  140. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/snapshot_info.py +0 -0
  141. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/team_user.py +0 -0
  142. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template.py +0 -0
  143. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_alias_response.py +0 -0
  144. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build.py +0 -0
  145. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_file_upload.py +0 -0
  146. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_file_upload_headers.py +0 -0
  147. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_info.py +0 -0
  148. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_logs_response.py +0 -0
  149. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_request_v3.py +0 -0
  150. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_start_v2.py +0 -0
  151. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_status.py +0 -0
  152. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_build_with_tags.py +0 -0
  153. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_request_response_v3.py +0 -0
  154. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_step.py +0 -0
  155. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag.py +0 -0
  156. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag_assignment.py +0 -0
  157. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag_assignments_response.py +0 -0
  158. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag_exists_response.py +0 -0
  159. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag_group.py +0 -0
  160. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tag_groups_response.py +0 -0
  161. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_tags_count_response.py +0 -0
  162. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_update_request.py +0 -0
  163. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_update_response.py +0 -0
  164. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_v2.py +0 -0
  165. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/template_with_builds.py +0 -0
  166. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/volume.py +0 -0
  167. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/models/volume_and_token.py +0 -0
  168. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/py.typed +0 -0
  169. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client/types.py +0 -0
  170. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client_async/__init__.py +0 -0
  171. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/client_sync/__init__.py +0 -0
  172. {e2b-2.66.0 → e2b-2.67.0}/e2b/api/metadata.py +0 -0
  173. {e2b-2.66.0 → e2b-2.67.0}/e2b/client.py +0 -0
  174. {e2b-2.66.0 → e2b-2.67.0}/e2b/connection_config.py +0 -0
  175. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/__init__.py +0 -0
  176. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/api.py +0 -0
  177. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/client_async/__init__.py +0 -0
  178. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/client_shared.py +0 -0
  179. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/client_sync/__init__.py +0 -0
  180. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/filesystem/__init__.py +0 -0
  181. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/filesystem/filesystem_connect.py +0 -0
  182. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/filesystem/filesystem_pb.py +0 -0
  183. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/interceptors.py +0 -0
  184. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/process/__init__.py +0 -0
  185. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/process/process_connect.py +0 -0
  186. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/process/process_pb.py +0 -0
  187. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/rpc.py +0 -0
  188. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/utils.py +0 -0
  189. {e2b-2.66.0 → e2b-2.67.0}/e2b/envd/versions.py +0 -0
  190. {e2b-2.66.0 → e2b-2.67.0}/e2b/exceptions.py +0 -0
  191. {e2b-2.66.0 → e2b-2.67.0}/e2b/io_utils.py +0 -0
  192. {e2b-2.66.0 → e2b-2.67.0}/e2b/paginator.py +0 -0
  193. {e2b-2.66.0 → e2b-2.67.0}/e2b/py.typed +0 -0
  194. {e2b-2.66.0 → e2b-2.67.0}/e2b/retry.py +0 -0
  195. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/__init__.py +0 -0
  196. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/args.py +0 -0
  197. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/auth.py +0 -0
  198. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/config.py +0 -0
  199. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/parse.py +0 -0
  200. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/_git/types.py +0 -0
  201. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/commands/command_handle.py +0 -0
  202. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/commands/main.py +0 -0
  203. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/commands/stream_input.py +0 -0
  204. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/filesystem/filesystem.py +0 -0
  205. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/filesystem/watch_handle.py +0 -0
  206. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/iam.py +0 -0
  207. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/main.py +0 -0
  208. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/mcp.py +0 -0
  209. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/network.py +0 -0
  210. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/signature.py +0 -0
  211. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox/utils.py +0 -0
  212. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/commands/command.py +0 -0
  213. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/commands/command_handle.py +0 -0
  214. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/commands/command_input_handle.py +0 -0
  215. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/commands/pty.py +0 -0
  216. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/filesystem/filesystem.py +0 -0
  217. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
  218. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/git.py +0 -0
  219. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/paginator.py +0 -0
  220. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_async/utils.py +0 -0
  221. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_domains.py +0 -0
  222. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/commands/command.py +0 -0
  223. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/commands/command_handle.py +0 -0
  224. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/commands/pty.py +0 -0
  225. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
  226. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
  227. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/git.py +0 -0
  228. {e2b-2.66.0 → e2b-2.67.0}/e2b/sandbox_sync/paginator.py +0 -0
  229. {e2b-2.66.0 → e2b-2.67.0}/e2b/secret/__init__.py +0 -0
  230. {e2b-2.66.0 → e2b-2.67.0}/e2b/secret/base.py +0 -0
  231. {e2b-2.66.0 → e2b-2.67.0}/e2b/secret/secret_async.py +0 -0
  232. {e2b-2.66.0 → e2b-2.67.0}/e2b/secret/secret_sync.py +0 -0
  233. {e2b-2.66.0 → e2b-2.67.0}/e2b/secret/types.py +0 -0
  234. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/consts.py +0 -0
  235. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/dockerfile_parser.py +0 -0
  236. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/logger.py +0 -0
  237. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/main.py +0 -0
  238. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/paginator.py +0 -0
  239. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/readycmd.py +0 -0
  240. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/types.py +0 -0
  241. {e2b-2.66.0 → e2b-2.67.0}/e2b/template/utils.py +0 -0
  242. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_async/build_api.py +0 -0
  243. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_async/main.py +0 -0
  244. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_async/paginator.py +0 -0
  245. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_sync/build_api.py +0 -0
  246. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_sync/main.py +0 -0
  247. {e2b-2.66.0 → e2b-2.67.0}/e2b/template_sync/paginator.py +0 -0
  248. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/__init__.py +0 -0
  249. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/__init__.py +0 -0
  250. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/__init__.py +0 -0
  251. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +0 -0
  252. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +0 -0
  253. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_file.py +0 -0
  254. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/get_volumecontent_volume_id_path.py +0 -0
  255. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +0 -0
  256. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +0 -0
  257. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/api/volumes/put_volumecontent_volume_id_file.py +0 -0
  258. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/client.py +0 -0
  259. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/errors.py +0 -0
  260. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/models/__init__.py +0 -0
  261. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/models/error.py +0 -0
  262. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/models/patch_volumecontent_volume_id_path_body.py +0 -0
  263. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/models/volume_entry_stat.py +0 -0
  264. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/models/volume_entry_stat_type.py +0 -0
  265. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/py.typed +0 -0
  266. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client/types.py +0 -0
  267. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client_async/__init__.py +0 -0
  268. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/client_sync/__init__.py +0 -0
  269. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/connection_config.py +0 -0
  270. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/types.py +0 -0
  271. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/utils.py +0 -0
  272. {e2b-2.66.0 → e2b-2.67.0}/e2b/volume/volume_async.py +0 -0
  273. {e2b-2.66.0 → e2b-2.67.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.66.0
3
+ Version: 2.67.0
4
4
  Summary: E2B SDK that give agents cloud environments
5
5
  Author: e2b
6
6
  Author-email: e2b <hello@e2b.dev>
@@ -0,0 +1,215 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
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_paused_retention_request import SandboxPausedRetentionRequest
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ sandbox_id: str,
15
+ *,
16
+ body: SandboxPausedRetentionRequest,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "put",
22
+ "url": f"/sandboxes/{sandbox_id}/paused-retention",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
35
+ ) -> Optional[Union[Any, Error]]:
36
+ if response.status_code == 204:
37
+ response_204 = cast(Any, None)
38
+ return response_204
39
+ if response.status_code == 400:
40
+ response_400 = Error.from_dict(response.json())
41
+
42
+ return response_400
43
+ if response.status_code == 401:
44
+ response_401 = Error.from_dict(response.json())
45
+
46
+ return response_401
47
+ if response.status_code == 404:
48
+ response_404 = Error.from_dict(response.json())
49
+
50
+ return response_404
51
+ if response.status_code == 409:
52
+ response_409 = Error.from_dict(response.json())
53
+
54
+ return response_409
55
+ if response.status_code == 429:
56
+ response_429 = Error.from_dict(response.json())
57
+
58
+ return response_429
59
+ if response.status_code == 500:
60
+ response_500 = Error.from_dict(response.json())
61
+
62
+ return response_500
63
+ if client.raise_on_unexpected_status:
64
+ raise errors.UnexpectedStatus(response.status_code, response.content)
65
+ else:
66
+ return None
67
+
68
+
69
+ def _build_response(
70
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
71
+ ) -> Response[Union[Any, Error]]:
72
+ return Response(
73
+ status_code=HTTPStatus(response.status_code),
74
+ content=response.content,
75
+ headers=response.headers,
76
+ parsed=_parse_response(client=client, response=response),
77
+ )
78
+
79
+
80
+ def sync_detailed(
81
+ sandbox_id: str,
82
+ *,
83
+ client: AuthenticatedClient,
84
+ body: SandboxPausedRetentionRequest,
85
+ ) -> Response[Union[Any, Error]]:
86
+ """Set the paused sandbox retention
87
+
88
+ Replace the sandbox's paused retention (pausedRetentionSeconds); null removes it. For a paused
89
+ sandbox the clock restarts: expiresAt becomes the time of the request plus the new retention, or
90
+ null when the retention is removed. A running sandbox keeps the new retention for when its current
91
+ run ends.
92
+
93
+ Args:
94
+ sandbox_id (str):
95
+ body (SandboxPausedRetentionRequest):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Union[Any, Error]]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ sandbox_id=sandbox_id,
107
+ body=body,
108
+ )
109
+
110
+ response = client.get_httpx_client().request(
111
+ **kwargs,
112
+ )
113
+
114
+ return _build_response(client=client, response=response)
115
+
116
+
117
+ def sync(
118
+ sandbox_id: str,
119
+ *,
120
+ client: AuthenticatedClient,
121
+ body: SandboxPausedRetentionRequest,
122
+ ) -> Optional[Union[Any, Error]]:
123
+ """Set the paused sandbox retention
124
+
125
+ Replace the sandbox's paused retention (pausedRetentionSeconds); null removes it. For a paused
126
+ sandbox the clock restarts: expiresAt becomes the time of the request plus the new retention, or
127
+ null when the retention is removed. A running sandbox keeps the new retention for when its current
128
+ run ends.
129
+
130
+ Args:
131
+ sandbox_id (str):
132
+ body (SandboxPausedRetentionRequest):
133
+
134
+ Raises:
135
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
136
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
137
+
138
+ Returns:
139
+ Union[Any, Error]
140
+ """
141
+
142
+ return sync_detailed(
143
+ sandbox_id=sandbox_id,
144
+ client=client,
145
+ body=body,
146
+ ).parsed
147
+
148
+
149
+ async def asyncio_detailed(
150
+ sandbox_id: str,
151
+ *,
152
+ client: AuthenticatedClient,
153
+ body: SandboxPausedRetentionRequest,
154
+ ) -> Response[Union[Any, Error]]:
155
+ """Set the paused sandbox retention
156
+
157
+ Replace the sandbox's paused retention (pausedRetentionSeconds); null removes it. For a paused
158
+ sandbox the clock restarts: expiresAt becomes the time of the request plus the new retention, or
159
+ null when the retention is removed. A running sandbox keeps the new retention for when its current
160
+ run ends.
161
+
162
+ Args:
163
+ sandbox_id (str):
164
+ body (SandboxPausedRetentionRequest):
165
+
166
+ Raises:
167
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
168
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
169
+
170
+ Returns:
171
+ Response[Union[Any, Error]]
172
+ """
173
+
174
+ kwargs = _get_kwargs(
175
+ sandbox_id=sandbox_id,
176
+ body=body,
177
+ )
178
+
179
+ response = await client.get_async_httpx_client().request(**kwargs)
180
+
181
+ return _build_response(client=client, response=response)
182
+
183
+
184
+ async def asyncio(
185
+ sandbox_id: str,
186
+ *,
187
+ client: AuthenticatedClient,
188
+ body: SandboxPausedRetentionRequest,
189
+ ) -> Optional[Union[Any, Error]]:
190
+ """Set the paused sandbox retention
191
+
192
+ Replace the sandbox's paused retention (pausedRetentionSeconds); null removes it. For a paused
193
+ sandbox the clock restarts: expiresAt becomes the time of the request plus the new retention, or
194
+ null when the retention is removed. A running sandbox keeps the new retention for when its current
195
+ run ends.
196
+
197
+ Args:
198
+ sandbox_id (str):
199
+ body (SandboxPausedRetentionRequest):
200
+
201
+ Raises:
202
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
203
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
204
+
205
+ Returns:
206
+ Union[Any, Error]
207
+ """
208
+
209
+ return (
210
+ await asyncio_detailed(
211
+ sandbox_id=sandbox_id,
212
+ client=client,
213
+ body=body,
214
+ )
215
+ ).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_paused_retention_request import SandboxPausedRetentionRequest
58
59
  from .sandbox_record import SandboxRecord
59
60
  from .sandbox_refresh_request import SandboxRefreshRequest
60
61
  from .sandbox_snapshot_request import SandboxSnapshotRequest
@@ -147,6 +148,7 @@ __all__ = (
147
148
  "SandboxNetworkUpdateConfig",
148
149
  "SandboxNetworkUpdateConfigRules",
149
150
  "SandboxOnTimeout",
151
+ "SandboxPausedRetentionRequest",
150
152
  "SandboxPauseMode",
151
153
  "SandboxPauseRequest",
152
154
  "SandboxRecord",
@@ -1,6 +1,6 @@
1
1
  import datetime
2
2
  from collections.abc import Mapping
3
- from typing import TYPE_CHECKING, Any, TypeVar, Union
3
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
4
4
 
5
5
  from attrs import define as _attrs_define
6
6
  from attrs import field as _attrs_field
@@ -30,6 +30,10 @@ class ListedSandbox:
30
30
  disk_size_mb (int): Disk size for the sandbox in MiB
31
31
  state (SandboxState): State of the sandbox
32
32
  envd_version (str): Version of the envd running in the sandbox
33
+ paused_retention_seconds (Union[None, int]): Seconds the sandbox may stay paused and unused before it is
34
+ deleted. Null when no retention is set.
35
+ expires_at (Union[None, datetime.datetime]): When the paused sandbox will be deleted. Null while the sandbox is
36
+ running or pausing, and when no retention is set.
33
37
  alias (Union[Unset, str]): Alias of the template
34
38
  metadata (Union[Unset, Any]):
35
39
  envd_unresponsive_at_pause (Union[Unset, bool]): True when the snapshot a paused sandbox would resume from was
@@ -50,6 +54,8 @@ class ListedSandbox:
50
54
  disk_size_mb: int
51
55
  state: SandboxState
52
56
  envd_version: str
57
+ paused_retention_seconds: Union[None, int]
58
+ expires_at: Union[None, datetime.datetime]
53
59
  alias: Union[Unset, str] = UNSET
54
60
  metadata: Union[Unset, Any] = UNSET
55
61
  envd_unresponsive_at_pause: Union[Unset, bool] = UNSET
@@ -77,6 +83,15 @@ class ListedSandbox:
77
83
 
78
84
  envd_version = self.envd_version
79
85
 
86
+ paused_retention_seconds: Union[None, int]
87
+ paused_retention_seconds = self.paused_retention_seconds
88
+
89
+ expires_at: Union[None, str]
90
+ if isinstance(self.expires_at, datetime.datetime):
91
+ expires_at = self.expires_at.isoformat()
92
+ else:
93
+ expires_at = self.expires_at
94
+
80
95
  alias = self.alias
81
96
 
82
97
  metadata = self.metadata
@@ -104,6 +119,8 @@ class ListedSandbox:
104
119
  "diskSizeMB": disk_size_mb,
105
120
  "state": state,
106
121
  "envdVersion": envd_version,
122
+ "pausedRetentionSeconds": paused_retention_seconds,
123
+ "expiresAt": expires_at,
107
124
  }
108
125
  )
109
126
  if alias is not UNSET:
@@ -142,6 +159,30 @@ class ListedSandbox:
142
159
 
143
160
  envd_version = d.pop("envdVersion")
144
161
 
162
+ def _parse_paused_retention_seconds(data: object) -> Union[None, int]:
163
+ if data is None:
164
+ return data
165
+ return cast(Union[None, int], data)
166
+
167
+ paused_retention_seconds = _parse_paused_retention_seconds(
168
+ d.pop("pausedRetentionSeconds")
169
+ )
170
+
171
+ def _parse_expires_at(data: object) -> Union[None, datetime.datetime]:
172
+ if data is None:
173
+ return data
174
+ try:
175
+ if not isinstance(data, str):
176
+ raise TypeError()
177
+ expires_at_type_0 = isoparse(data)
178
+
179
+ return expires_at_type_0
180
+ except: # noqa: E722
181
+ pass
182
+ return cast(Union[None, datetime.datetime], data)
183
+
184
+ expires_at = _parse_expires_at(d.pop("expiresAt"))
185
+
145
186
  alias = d.pop("alias", UNSET)
146
187
 
147
188
  metadata = d.pop("metadata", UNSET)
@@ -166,6 +207,8 @@ class ListedSandbox:
166
207
  disk_size_mb=disk_size_mb,
167
208
  state=state,
168
209
  envd_version=envd_version,
210
+ paused_retention_seconds=paused_retention_seconds,
211
+ expires_at=expires_at,
169
212
  alias=alias,
170
213
  metadata=metadata,
171
214
  envd_unresponsive_at_pause=envd_unresponsive_at_pause,
@@ -34,6 +34,9 @@ class NewSandboxV2:
34
34
  snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with
35
35
  autoResume. Defaults to true (full memory snapshot). Default: True.
36
36
  auto_resume (Union[Unset, SandboxAutoResumeConfig]): Auto-resume configuration for paused sandboxes.
37
+ paused_retention_seconds (Union[None, Unset, int]): Seconds a paused sandbox may stay unused before it is
38
+ deleted, from 1 hour to 100 years. The clock restarts every time a run of the sandbox ends, by pause or by kill.
39
+ Null means the sandbox is never deleted automatically.
37
40
  allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
38
41
  the same as specifying denyOut to 0.0.0.0/0 in the network config.
39
42
  network (Union[Unset, SandboxNetworkConfig]):
@@ -52,6 +55,7 @@ class NewSandboxV2:
52
55
  auto_pause: Union[Unset, bool] = False
53
56
  auto_pause_memory: Union[Unset, bool] = True
54
57
  auto_resume: Union[Unset, "SandboxAutoResumeConfig"] = UNSET
58
+ paused_retention_seconds: Union[None, Unset, int] = UNSET
55
59
  allow_internet_access: Union[Unset, bool] = UNSET
56
60
  network: Union[Unset, "SandboxNetworkConfig"] = UNSET
57
61
  metadata: Union[Unset, Any] = UNSET
@@ -80,6 +84,12 @@ class NewSandboxV2:
80
84
  if not isinstance(self.auto_resume, Unset):
81
85
  auto_resume = self.auto_resume.to_dict()
82
86
 
87
+ paused_retention_seconds: Union[None, Unset, int]
88
+ if isinstance(self.paused_retention_seconds, Unset):
89
+ paused_retention_seconds = UNSET
90
+ else:
91
+ paused_retention_seconds = self.paused_retention_seconds
92
+
83
93
  allow_internet_access = self.allow_internet_access
84
94
 
85
95
  network: Union[Unset, dict[str, Any]] = UNSET
@@ -128,6 +138,8 @@ class NewSandboxV2:
128
138
  field_dict["autoPauseMemory"] = auto_pause_memory
129
139
  if auto_resume is not UNSET:
130
140
  field_dict["autoResume"] = auto_resume
141
+ if paused_retention_seconds is not UNSET:
142
+ field_dict["pausedRetentionSeconds"] = paused_retention_seconds
131
143
  if allow_internet_access is not UNSET:
132
144
  field_dict["allow_internet_access"] = allow_internet_access
133
145
  if network is not UNSET:
@@ -173,6 +185,17 @@ class NewSandboxV2:
173
185
  else:
174
186
  auto_resume = SandboxAutoResumeConfig.from_dict(_auto_resume)
175
187
 
188
+ def _parse_paused_retention_seconds(data: object) -> Union[None, Unset, int]:
189
+ if data is None:
190
+ return data
191
+ if isinstance(data, Unset):
192
+ return data
193
+ return cast(Union[None, Unset, int], data)
194
+
195
+ paused_retention_seconds = _parse_paused_retention_seconds(
196
+ d.pop("pausedRetentionSeconds", UNSET)
197
+ )
198
+
176
199
  allow_internet_access = d.pop("allow_internet_access", UNSET)
177
200
 
178
201
  _network = d.pop("network", UNSET)
@@ -225,6 +248,7 @@ class NewSandboxV2:
225
248
  auto_pause=auto_pause,
226
249
  auto_pause_memory=auto_pause_memory,
227
250
  auto_resume=auto_resume,
251
+ paused_retention_seconds=paused_retention_seconds,
228
252
  allow_internet_access=allow_internet_access,
229
253
  network=network,
230
254
  metadata=metadata,
@@ -33,6 +33,10 @@ class SandboxDetail:
33
33
  memory_mb (int): Memory for the sandbox in MiB
34
34
  disk_size_mb (int): Disk size for the sandbox in MiB
35
35
  state (SandboxState): State of the sandbox
36
+ paused_retention_seconds (Union[None, int]): Seconds the sandbox may stay paused and unused before it is
37
+ deleted. Null when no retention is set.
38
+ expires_at (Union[None, datetime.datetime]): When the paused sandbox will be deleted. Null while the sandbox is
39
+ running or pausing, and when no retention is set.
36
40
  alias (Union[Unset, str]): Alias of the template
37
41
  envd_unresponsive_at_pause (Union[Unset, bool]): True when the snapshot a paused sandbox would resume from was
38
42
  taken while the sandbox guest agent was not responding. A plain resume of it is refused with 409 and error_code
@@ -63,6 +67,8 @@ class SandboxDetail:
63
67
  memory_mb: int
64
68
  disk_size_mb: int
65
69
  state: SandboxState
70
+ paused_retention_seconds: Union[None, int]
71
+ expires_at: Union[None, datetime.datetime]
66
72
  alias: Union[Unset, str] = UNSET
67
73
  envd_unresponsive_at_pause: Union[Unset, bool] = UNSET
68
74
  envd_access_token: Union[Unset, str] = UNSET
@@ -96,6 +102,15 @@ class SandboxDetail:
96
102
 
97
103
  state = self.state.value
98
104
 
105
+ paused_retention_seconds: Union[None, int]
106
+ paused_retention_seconds = self.paused_retention_seconds
107
+
108
+ expires_at: Union[None, str]
109
+ if isinstance(self.expires_at, datetime.datetime):
110
+ expires_at = self.expires_at.isoformat()
111
+ else:
112
+ expires_at = self.expires_at
113
+
99
114
  alias = self.alias
100
115
 
101
116
  envd_unresponsive_at_pause = self.envd_unresponsive_at_pause
@@ -149,6 +164,8 @@ class SandboxDetail:
149
164
  "memoryMB": memory_mb,
150
165
  "diskSizeMB": disk_size_mb,
151
166
  "state": state,
167
+ "pausedRetentionSeconds": paused_retention_seconds,
168
+ "expiresAt": expires_at,
152
169
  }
153
170
  )
154
171
  if alias is not UNSET:
@@ -201,6 +218,30 @@ class SandboxDetail:
201
218
 
202
219
  state = SandboxState(d.pop("state"))
203
220
 
221
+ def _parse_paused_retention_seconds(data: object) -> Union[None, int]:
222
+ if data is None:
223
+ return data
224
+ return cast(Union[None, int], data)
225
+
226
+ paused_retention_seconds = _parse_paused_retention_seconds(
227
+ d.pop("pausedRetentionSeconds")
228
+ )
229
+
230
+ def _parse_expires_at(data: object) -> Union[None, datetime.datetime]:
231
+ if data is None:
232
+ return data
233
+ try:
234
+ if not isinstance(data, str):
235
+ raise TypeError()
236
+ expires_at_type_0 = isoparse(data)
237
+
238
+ return expires_at_type_0
239
+ except: # noqa: E722
240
+ pass
241
+ return cast(Union[None, datetime.datetime], data)
242
+
243
+ expires_at = _parse_expires_at(d.pop("expiresAt"))
244
+
204
245
  alias = d.pop("alias", UNSET)
205
246
 
206
247
  envd_unresponsive_at_pause = d.pop("envdUnresponsiveAtPause", UNSET)
@@ -268,6 +309,8 @@ class SandboxDetail:
268
309
  memory_mb=memory_mb,
269
310
  disk_size_mb=disk_size_mb,
270
311
  state=state,
312
+ paused_retention_seconds=paused_retention_seconds,
313
+ expires_at=expires_at,
271
314
  alias=alias,
272
315
  envd_unresponsive_at_pause=envd_unresponsive_at_pause,
273
316
  envd_access_token=envd_access_token,
@@ -23,6 +23,12 @@ class SandboxNetworkConfig:
23
23
  allow_public_traffic (Union[None, Unset, bool]): Whether sandbox URLs accept traffic without the sandbox's
24
24
  traffic access token. When omitted or null on create, the project's default applies, which is true unless the
25
25
  project changed it.
26
+ expose_localhost_ports (Union[None, Unset, bool]): Whether services listening only on loopback (127.0.0.1,
27
+ localhost, ::1) inside the sandbox are reachable through sandbox URLs. Services listening on all interfaces are
28
+ reachable either way. When omitted or null on create, the project's default applies, which is true unless the
29
+ project changed it. A sandbox keeps the value it was created with through pause and resume. Setting it to false
30
+ needs a template built with a recent envd: for an older template the create is refused until the template is
31
+ rebuilt, and a project default of false does not apply, so its sandboxes keep exposing them.
26
32
  allow_out (Union[Unset, list[str]]): List of allowed destinations for egress traffic. Each entry can be a CIDR
27
33
  block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com",
28
34
  "*.example.com"). Allowed entries always take precedence over denied entries. When allowOut contains a domain,
@@ -49,6 +55,7 @@ class SandboxNetworkConfig:
49
55
  """
50
56
 
51
57
  allow_public_traffic: Union[None, Unset, bool] = UNSET
58
+ expose_localhost_ports: Union[None, Unset, bool] = UNSET
52
59
  allow_out: Union[Unset, list[str]] = UNSET
53
60
  deny_out: Union[Unset, list[str]] = UNSET
54
61
  dns_servers: Union[Unset, list[str]] = UNSET
@@ -69,6 +76,12 @@ class SandboxNetworkConfig:
69
76
  else:
70
77
  allow_public_traffic = self.allow_public_traffic
71
78
 
79
+ expose_localhost_ports: Union[None, Unset, bool]
80
+ if isinstance(self.expose_localhost_ports, Unset):
81
+ expose_localhost_ports = UNSET
82
+ else:
83
+ expose_localhost_ports = self.expose_localhost_ports
84
+
72
85
  allow_out: Union[Unset, list[str]] = UNSET
73
86
  if not isinstance(self.allow_out, Unset):
74
87
  allow_out = self.allow_out
@@ -104,6 +117,8 @@ class SandboxNetworkConfig:
104
117
  field_dict.update({})
105
118
  if allow_public_traffic is not UNSET:
106
119
  field_dict["allowPublicTraffic"] = allow_public_traffic
120
+ if expose_localhost_ports is not UNSET:
121
+ field_dict["exposeLocalhostPorts"] = expose_localhost_ports
107
122
  if allow_out is not UNSET:
108
123
  field_dict["allowOut"] = allow_out
109
124
  if deny_out is not UNSET:
@@ -141,6 +156,17 @@ class SandboxNetworkConfig:
141
156
  d.pop("allowPublicTraffic", UNSET)
142
157
  )
143
158
 
159
+ def _parse_expose_localhost_ports(data: object) -> Union[None, Unset, bool]:
160
+ if data is None:
161
+ return data
162
+ if isinstance(data, Unset):
163
+ return data
164
+ return cast(Union[None, Unset, bool], data)
165
+
166
+ expose_localhost_ports = _parse_expose_localhost_ports(
167
+ d.pop("exposeLocalhostPorts", UNSET)
168
+ )
169
+
144
170
  allow_out = cast(list[str], d.pop("allowOut", UNSET))
145
171
 
146
172
  deny_out = cast(list[str], d.pop("denyOut", UNSET))
@@ -181,6 +207,7 @@ class SandboxNetworkConfig:
181
207
 
182
208
  sandbox_network_config = cls(
183
209
  allow_public_traffic=allow_public_traffic,
210
+ expose_localhost_ports=expose_localhost_ports,
184
211
  allow_out=allow_out,
185
212
  deny_out=deny_out,
186
213
  dns_servers=dns_servers,
@@ -0,0 +1,70 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="SandboxPausedRetentionRequest")
8
+
9
+
10
+ @_attrs_define
11
+ class SandboxPausedRetentionRequest:
12
+ """
13
+ Attributes:
14
+ paused_retention_seconds (Union[None, int]): Seconds a paused sandbox may stay unused before it is deleted, from
15
+ 1 hour to 100 years. The clock restarts every time a run of the sandbox ends, by pause or by kill. Null means
16
+ the sandbox is never deleted automatically.
17
+ """
18
+
19
+ paused_retention_seconds: Union[None, int]
20
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ paused_retention_seconds: Union[None, int]
24
+ paused_retention_seconds = self.paused_retention_seconds
25
+
26
+ field_dict: dict[str, Any] = {}
27
+ field_dict.update(self.additional_properties)
28
+ field_dict.update(
29
+ {
30
+ "pausedRetentionSeconds": paused_retention_seconds,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
38
+ d = dict(src_dict)
39
+
40
+ def _parse_paused_retention_seconds(data: object) -> Union[None, int]:
41
+ if data is None:
42
+ return data
43
+ return cast(Union[None, int], data)
44
+
45
+ paused_retention_seconds = _parse_paused_retention_seconds(
46
+ d.pop("pausedRetentionSeconds")
47
+ )
48
+
49
+ sandbox_paused_retention_request = cls(
50
+ paused_retention_seconds=paused_retention_seconds,
51
+ )
52
+
53
+ sandbox_paused_retention_request.additional_properties = d
54
+ return sandbox_paused_retention_request
55
+
56
+ @property
57
+ def additional_keys(self) -> list[str]:
58
+ return list(self.additional_properties.keys())
59
+
60
+ def __getitem__(self, key: str) -> Any:
61
+ return self.additional_properties[key]
62
+
63
+ def __setitem__(self, key: str, value: Any) -> None:
64
+ self.additional_properties[key] = value
65
+
66
+ def __delitem__(self, key: str) -> None:
67
+ del self.additional_properties[key]
68
+
69
+ def __contains__(self, key: str) -> bool:
70
+ return key in self.additional_properties