e2b 2.2.2__tar.gz → 2.2.4__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 (140) hide show
  1. {e2b-2.2.2 → e2b-2.2.4}/PKG-INFO +2 -1
  2. {e2b-2.2.2 → e2b-2.2.4}/e2b/__init__.py +28 -19
  3. {e2b-2.2.2 → e2b-2.2.4}/e2b/connection_config.py +1 -1
  4. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/main.py +13 -0
  5. e2b-2.2.4/e2b/sandbox/mcp.py +1263 -0
  6. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/main.py +51 -1
  7. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/main.py +52 -1
  8. e2b-2.2.4/e2b/template/logger.py +183 -0
  9. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/types.py +4 -19
  10. {e2b-2.2.2 → e2b-2.2.4}/e2b/template_async/build_api.py +2 -1
  11. e2b-2.2.4/e2b/template_async/main.py +191 -0
  12. {e2b-2.2.2 → e2b-2.2.4}/e2b/template_sync/build_api.py +2 -1
  13. e2b-2.2.4/e2b/template_sync/main.py +191 -0
  14. {e2b-2.2.2 → e2b-2.2.4}/pyproject.toml +4 -2
  15. e2b-2.2.2/e2b/template_async/main.py +0 -171
  16. e2b-2.2.2/e2b/template_sync/main.py +0 -171
  17. {e2b-2.2.2 → e2b-2.2.4}/LICENSE +0 -0
  18. {e2b-2.2.2 → e2b-2.2.4}/README.md +0 -0
  19. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/__init__.py +0 -0
  20. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/__init__.py +0 -0
  21. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/__init__.py +0 -0
  22. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/__init__.py +0 -0
  23. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +0 -0
  24. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_sandboxes.py +0 -0
  25. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py +0 -0
  26. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +0 -0
  27. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +0 -0
  28. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +0 -0
  29. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/get_v2_sandboxes.py +0 -0
  30. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/post_sandboxes.py +0 -0
  31. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +0 -0
  32. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +0 -0
  33. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +0 -0
  34. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +0 -0
  35. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/__init__.py +0 -0
  36. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/delete_templates_template_id.py +0 -0
  37. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/get_templates.py +0 -0
  38. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +0 -0
  39. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/get_templates_template_id_files_hash.py +0 -0
  40. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/patch_templates_template_id.py +0 -0
  41. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/post_templates.py +0 -0
  42. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/post_templates_template_id.py +0 -0
  43. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py +0 -0
  44. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/post_v2_templates.py +0 -0
  45. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +0 -0
  46. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/client.py +0 -0
  47. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/errors.py +0 -0
  48. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/__init__.py +0 -0
  49. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/aws_registry.py +0 -0
  50. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/aws_registry_type.py +0 -0
  51. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/build_log_entry.py +0 -0
  52. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/build_status_reason.py +0 -0
  53. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/created_access_token.py +0 -0
  54. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/created_team_api_key.py +0 -0
  55. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/disk_metrics.py +0 -0
  56. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/error.py +0 -0
  57. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/gcp_registry.py +0 -0
  58. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/gcp_registry_type.py +0 -0
  59. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/general_registry.py +0 -0
  60. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/general_registry_type.py +0 -0
  61. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/identifier_masking_details.py +0 -0
  62. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/listed_sandbox.py +0 -0
  63. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/log_level.py +0 -0
  64. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/new_access_token.py +0 -0
  65. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/new_sandbox.py +0 -0
  66. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/new_team_api_key.py +0 -0
  67. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/node.py +0 -0
  68. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/node_detail.py +0 -0
  69. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/node_metrics.py +0 -0
  70. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/node_status.py +0 -0
  71. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/node_status_change.py +0 -0
  72. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +0 -0
  73. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +0 -0
  74. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/resumed_sandbox.py +0 -0
  75. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox.py +0 -0
  76. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_detail.py +0 -0
  77. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_log.py +0 -0
  78. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_log_entry.py +0 -0
  79. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_log_entry_fields.py +0 -0
  80. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_logs.py +0 -0
  81. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_metric.py +0 -0
  82. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandbox_state.py +0 -0
  83. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/sandboxes_with_metrics.py +0 -0
  84. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/team.py +0 -0
  85. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/team_api_key.py +0 -0
  86. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/team_metric.py +0 -0
  87. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/team_user.py +0 -0
  88. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template.py +0 -0
  89. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build.py +0 -0
  90. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build_file_upload.py +0 -0
  91. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build_request.py +0 -0
  92. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build_request_v2.py +0 -0
  93. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build_start_v2.py +0 -0
  94. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_build_status.py +0 -0
  95. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_step.py +0 -0
  96. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/template_update_request.py +0 -0
  97. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/models/update_team_api_key.py +0 -0
  98. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/py.typed +0 -0
  99. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/client/types.py +0 -0
  100. {e2b-2.2.2 → e2b-2.2.4}/e2b/api/metadata.py +0 -0
  101. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/api.py +0 -0
  102. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/filesystem/filesystem_connect.py +0 -0
  103. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/filesystem/filesystem_pb2.py +0 -0
  104. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/filesystem/filesystem_pb2.pyi +0 -0
  105. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/process/process_connect.py +0 -0
  106. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/process/process_pb2.py +0 -0
  107. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/process/process_pb2.pyi +0 -0
  108. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/rpc.py +0 -0
  109. {e2b-2.2.2 → e2b-2.2.4}/e2b/envd/versions.py +0 -0
  110. {e2b-2.2.2 → e2b-2.2.4}/e2b/exceptions.py +0 -0
  111. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/commands/command_handle.py +0 -0
  112. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/commands/main.py +0 -0
  113. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/filesystem/filesystem.py +0 -0
  114. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/filesystem/watch_handle.py +0 -0
  115. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/sandbox_api.py +0 -0
  116. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/signature.py +0 -0
  117. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox/utils.py +0 -0
  118. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/commands/command.py +0 -0
  119. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/commands/command_handle.py +0 -0
  120. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/commands/pty.py +0 -0
  121. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/filesystem/filesystem.py +0 -0
  122. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/filesystem/watch_handle.py +0 -0
  123. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/paginator.py +0 -0
  124. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/sandbox_api.py +0 -0
  125. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_async/utils.py +0 -0
  126. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/commands/command.py +0 -0
  127. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/commands/command_handle.py +0 -0
  128. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/commands/pty.py +0 -0
  129. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/filesystem/filesystem.py +0 -0
  130. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/filesystem/watch_handle.py +0 -0
  131. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/paginator.py +0 -0
  132. {e2b-2.2.2 → e2b-2.2.4}/e2b/sandbox_sync/sandbox_api.py +0 -0
  133. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/consts.py +0 -0
  134. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/dockerfile_parser.py +0 -0
  135. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/exceptions.py +0 -0
  136. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/main.py +0 -0
  137. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/readycmd.py +0 -0
  138. {e2b-2.2.2 → e2b-2.2.4}/e2b/template/utils.py +0 -0
  139. {e2b-2.2.2 → e2b-2.2.4}/e2b_connect/__init__.py +0 -0
  140. {e2b-2.2.2 → e2b-2.2.4}/e2b_connect/client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e2b
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: E2B SDK that give agents cloud environments
5
5
  Home-page: https://e2b.dev/
6
6
  License: MIT
@@ -19,6 +19,7 @@ Requires-Dist: httpx (>=0.27.0,<1.0.0)
19
19
  Requires-Dist: packaging (>=24.1)
20
20
  Requires-Dist: protobuf (>=4.21.0)
21
21
  Requires-Dist: python-dateutil (>=2.8.2)
22
+ Requires-Dist: rich (>=14.0.0)
22
23
  Requires-Dist: typing-extensions (>=4.1.0)
23
24
  Project-URL: Bug Tracker, https://github.com/e2b-dev/e2b/issues
24
25
  Project-URL: Repository, https://github.com/e2b-dev/e2b/tree/main/packages/python-sdk
@@ -42,8 +42,6 @@ from .exceptions import (
42
42
  NotEnoughSpaceException,
43
43
  TemplateException,
44
44
  )
45
- from .sandbox.sandbox_api import SandboxInfo, SandboxQuery, SandboxState, SandboxMetrics
46
- from .sandbox.commands.main import ProcessInfo
47
45
  from .sandbox.commands.command_handle import (
48
46
  CommandResult,
49
47
  Stderr,
@@ -52,31 +50,32 @@ from .sandbox.commands.command_handle import (
52
50
  PtyOutput,
53
51
  PtySize,
54
52
  )
53
+ from .sandbox.commands.main import ProcessInfo
54
+ from .sandbox.filesystem.filesystem import EntryInfo, WriteInfo, FileType
55
55
  from .sandbox.filesystem.watch_handle import (
56
56
  FilesystemEvent,
57
57
  FilesystemEventType,
58
58
  )
59
- from .sandbox.filesystem.filesystem import EntryInfo, WriteInfo, FileType
60
-
61
- from .sandbox_sync.main import Sandbox
62
- from .sandbox_sync.filesystem.watch_handle import WatchHandle
63
- from .sandbox_sync.commands.command_handle import CommandHandle
59
+ from .sandbox.mcp import McpServer
60
+ from .sandbox.sandbox_api import SandboxInfo, SandboxQuery, SandboxState, SandboxMetrics
61
+ from .sandbox_async.commands.command_handle import AsyncCommandHandle
62
+ from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
63
+ from .sandbox_async.main import AsyncSandbox
64
64
  from .sandbox_async.paginator import AsyncSandboxPaginator
65
-
66
65
  from .sandbox_async.utils import OutputHandler
67
- from .sandbox_async.main import AsyncSandbox
68
- from .sandbox_async.filesystem.watch_handle import AsyncWatchHandle
69
- from .sandbox_async.commands.command_handle import AsyncCommandHandle
66
+ from .sandbox_sync.commands.command_handle import CommandHandle
67
+ from .sandbox_sync.filesystem.watch_handle import WatchHandle
68
+ from .sandbox_sync.main import Sandbox
70
69
  from .sandbox_sync.paginator import SandboxPaginator
71
-
72
- from .template.main import TemplateBase, TemplateClass
73
-
74
- from .template.types import CopyItem
75
-
76
- from .template_sync.main import Template
77
- from .template_async.main import AsyncTemplate
78
-
79
70
  from .template.exceptions import BuildException, FileUploadException
71
+ from .template.logger import (
72
+ LogEntry,
73
+ LogEntryLevel,
74
+ LogEntryStart,
75
+ LogEntryEnd,
76
+ default_build_logger,
77
+ )
78
+ from .template.main import TemplateBase, TemplateClass
80
79
  from .template.readycmd import (
81
80
  wait_for_file,
82
81
  wait_for_url,
@@ -84,6 +83,9 @@ from .template.readycmd import (
84
83
  wait_for_process,
85
84
  wait_for_timeout,
86
85
  )
86
+ from .template.types import CopyItem
87
+ from .template_async.main import AsyncTemplate
88
+ from .template_sync.main import Template
87
89
 
88
90
  __all__ = [
89
91
  # API
@@ -144,4 +146,11 @@ __all__ = [
144
146
  "wait_for_port",
145
147
  "wait_for_process",
146
148
  "wait_for_timeout",
149
+ "LogEntry",
150
+ "LogEntryStart",
151
+ "LogEntryEnd",
152
+ "LogEntryLevel",
153
+ "default_build_logger",
154
+ # MCP
155
+ "McpServer",
147
156
  ]
@@ -151,7 +151,7 @@ class ConnectionConfig:
151
151
  @property
152
152
  def sandbox_headers(self):
153
153
  """
154
- # We need this separate as we use the same header for E2B access token to API and envd access token to sandbox.
154
+ We need this separate as we use the same header for E2B access token to API and envd access token to sandbox.
155
155
  """
156
156
  return {
157
157
  **self.headers,
@@ -25,9 +25,12 @@ class SandboxBase:
25
25
  )
26
26
 
27
27
  envd_port = 49983
28
+ mcp_port = 50005
28
29
 
29
30
  default_sandbox_timeout = 300
31
+
30
32
  default_template = "base"
33
+ default_mcp_template = "mcp-gateway-v0"
31
34
 
32
35
  def __init__(
33
36
  self,
@@ -168,3 +171,13 @@ class SandboxBase:
168
171
  return f"localhost:{port}"
169
172
 
170
173
  return f"{port}-{self.sandbox_id}.{self.sandbox_domain}"
174
+
175
+ def beta_get_mcp_url(self) -> str:
176
+ """
177
+ [BETA] This feature is in beta and may change in the future.
178
+
179
+ Get the MCP URL for the sandbox.
180
+
181
+ :returns MCP URL for the sandbox.
182
+ """
183
+ return f"https://{self.get_host(self.mcp_port)}/mcp"