@@ -70,9 +70,16 @@ const sandbox = await Sandbox.create({ timeoutMs: 60_000 })
7070// Retrieve sandbox information.
7171const info = await sandbox .getInfo ()
7272
73- // Retrieve sandbox expiration date.
74- const expirationDate = info .endAt
75- console .log (expirationDate)
73+ console .log (info)
74+
75+ // {
76+ // "sandboxId": "iiny0783cype8gmoawzmx-ce30bc46",
77+ // "templateId": "rki5dems9wqfm4r03t7g",
78+ // "name": "base",
79+ // "metadata": {},
80+ // "startedAt": "2025-03-24T15:37:58.076Z",
81+ // "endAt": "2025-03-24T15:42:58.076Z"
82+ // }
7683```
7784
7885``` python
@@ -81,9 +88,18 @@ from e2b_code_interpreter import Sandbox
8188# Create sandbox with and keep it running for 60 seconds.
8289sandbox = Sandbox(timeout = 60 )
8390
84- # Retrieve sandbox expiration date.
85- expiration_date = sandbox.get_info().end_at
86- print (expiration_date)
91+ # Retrieve sandbox information.
92+ info = sandbox.get_info()
93+
94+ print (info)
95+
96+ # SandboxInfo(sandbox_id='ig6f1yt6idvxkxl562scj-419ff533',
97+ # template_id='u7nqkmpn3jjf1tvftlsu',
98+ # name='base',
99+ # metadata={},
100+ # started_at=datetime.datetime(2025, 3, 24, 15, 42, 59, 255612, tzinfo=tzutc()),
101+ # end_at=datetime.datetime(2025, 3, 24, 15, 47, 59, 255612, tzinfo=tzutc())
102+ # )
87103```
88104</CodeGroup >
89105
0 commit comments