Closed jakubno closed 4 months ago
Latest commit: 5719c9efbd2c9e226ecb66e9b6a140a311d4f49e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
We closed this PR because our new SDK that is in beta incorporates most stateless ideas.
Experimental stateless JavaScript SDK for E2B
The stateless version of our SDK allows you to spin up a sandbox from a client without managing the sandbox lifecycle on the client. The sandbox stays stateful though.
Installation
Usage
There are three methods on
stateless
module:create
- creates a sandbox for a specified time inms
, returnsid
of the sandbox, you can specify template or the sandbox will be created with thebase
templateexec
- executes the command in specified sandboxdownloadFile
- downloads a file from the sandbox as a byte arrayuploadFile
- uploads a file to a sandboxkill
- destroys the sandbox immediately