Method Signature
Parameters
The code to execute
Execution options
Returns
The execution result
Example
Example with Streaming
Notes
- Automatically creates a default context if none is provided
- Supports multiple result formats: text, HTML, images (PNG/JPEG/SVG), charts, JSON
- Chart detection works with matplotlib, plotly, altair, and seaborn
- Results are structured for easy rendering in UIs
- Use callbacks for real-time output processing
- Context state persists between executions
See Also
- runCodeStream - Stream code execution
- createCodeContext - Create a context
- Execution type - Result type reference