Skip to main content
E2B Code Interpreter SDK allows you to stream the output, and results when executing code in the sandbox.

Stream stdout and stderr

When using the runCode() method in JavaScript or run_code() in Python you can pass onStdout/on_stdout and onStderr/on_stderr callbacks to handle the output.
The code above will print the following:

Stream results

When using the runCode() method in JavaScript or run_code() in Python you can pass onResults/on_results callback to receive results from the sandbox like charts, tables, text, and more.