Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from e2b-dev:main #128

Merged
merged 6 commits into from
Mar 24, 2025
Merged
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
2 changes: 1 addition & 1 deletion apps/web/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# E2B Web App

This repository contains E2D Dashboard, documentation, and SDK references.
This repository contains E2B Dashboard, documentation, and SDK references.

## SDK References

9 changes: 3 additions & 6 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -36,14 +36,12 @@
"@supabase/supabase-auth-helpers": "^1.4.2",
"@supabase/supabase-js": "^2.36.0",
"@tailwindcss/typography": "0.5.9",
"@types/node": "20.6.3",
"@types/react-highlight-words": "^0.16.4",
"@vercel/analytics": "^1.0.2",
"acorn": "^8.8.1",
"autoprefixer": "^10.4.7",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"e2b": "^1.1.1",
"e2b": "^1.2.1",
"fast-glob": "^3.3.0",
"fast-xml-parser": "4.4.1",
"flexsearch": "^0.7.31",
@@ -64,24 +62,23 @@
"remark-mdx": "^2.3.0",
"shiki": "^0.11.1",
"simple-functional-loader": "^1.2.1",
"swr": "^2.2.4",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.1.6",
"unique-names-generator": "^4.7.1",
"unist-util-filter": "^4.0.1",
"unist-util-visit": "^4.1.1",
"usehooks-ts": "^2.16.0",
"uuid": "^9.0.1",
"zustand": "^4.3.2"
},
"devDependencies": {
"@nodelib/fs.walk": "^2.0.0",
"@stylistic/eslint-plugin-ts": "^1.6.2",
"@types/mdx": "^2.0.8",
"@types/node": "20.6.3",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@types/react-highlight-words": "^0.16.4",
"eslint-config-next": "14.2.21",
"knip": "^5.43.6",
"sharp": "^0.32.0",
31 changes: 31 additions & 0 deletions apps/web/src/app/(docs)/docs/sandbox/page.mdx
Original file line number Diff line number Diff line change
@@ -56,6 +56,37 @@ sandbox.set_timeout(30)
```
</CodeGroup>

## Retrieve sandbox information

You can retrieve sandbox information like sandbox id, template, metadata, started at/end at date by calling the `getInfo` method in JavaScript or `get_info` method in Python.

<CodeGroup>
```js
import { Sandbox } from '@e2b/code-interpreter'

// Create sandbox with and keep it running for 60 seconds.
const sandbox = await Sandbox.create({ timeoutMs: 60_000 })

// Retrieve sandbox information.
const info = await sandbox.getInfo()

// Retrieve sandbox expiration date.
const expirationDate = info.endAt
console.log(expirationDate)
```

```python
from e2b_code_interpreter import Sandbox

# Create sandbox with and keep it running for 60 seconds.
sandbox = Sandbox(timeout=60)

# Retrieve sandbox expiration date.
expiration_date = sandbox.get_info().end_at
print(expiration_date)
```
</CodeGroup>

## Shutdown sandbox

You can shutdown the sandbox any time even before the timeout is up by calling the `kill` method.
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.