Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/breezy-seals-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@e2b/cli': patch
---

Update text in toml for sync Python
2 changes: 1 addition & 1 deletion packages/cli/src/commands/template/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ async function waitForBuildFinish(
const pythonExample = asPython(`from e2b import Sandbox, AsyncSandbox

# Create sync sandbox
sandbox = Sandbox("${aliases?.length ? aliases[0] : template.templateID}")
sandbox = Sandbox.create("${aliases?.length ? aliases[0] : template.templateID}")

# Create async sandbox
sandbox = await AsyncSandbox.create("${
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function getConfigHeader(config: E2BConfig) {

# Python SDK
# from e2b import Sandbox, AsyncSandbox
# sandbox = Sandbox("${config.template_name || config.template_id}") # Sync sandbox
# sandbox = Sandbox.create("${config.template_name || config.template_id}") # Sync sandbox
# sandbox = await AsyncSandbox.create("${config.template_name || config.template_id}") # Async sandbox

# JS SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ async def test_snapshot(async_sandbox: AsyncSandbox):

resumed_sandbox = await async_sandbox.connect()
assert await async_sandbox.is_running()
assert resumed_sandbox.is_running()
assert await resumed_sandbox.is_running()
assert resumed_sandbox.sandbox_id == async_sandbox.sandbox_id