Versions in this module Expand all Collapse all v1 v1.9.1 May 11, 2026 v1.9.0 May 8, 2026 Changes in this version + const DefaultDomain + const DefaultRequestTimeout + const DefaultSandboxTimeout + const DefaultTemplate + const DefaultTimeout + const JupyterPort + type AuthenticationError struct + Message string + func (e *AuthenticationError) Error() string + type BarChart struct + Bars []BarData + type BarData struct + Group string + Label string + Value string + type BaseChart struct + Elements []any + Title string + Type ChartType + func (c *BaseChart) ChartTitle() string + func (c *BaseChart) ChartType() ChartType + func (c *BaseChart) ToJSON() map[string]any + type BoxAndWhiskerChart struct + Boxes []BoxAndWhiskerData + type BoxAndWhiskerData struct + FirstQuartile float64 + Label string + Max float64 + Median float64 + Min float64 + Outliers []float64 + ThirdQuartile float64 + type Chart interface + ChartTitle func() string + ChartType func() ChartType + ToJSON func() map[string]any + type Chart2D struct + XLabel string + XUnit string + YLabel string + YUnit string + type ChartType string + const ChartTypeBar + const ChartTypeBoxAndWhisker + const ChartTypeLine + const ChartTypePie + const ChartTypeScatter + const ChartTypeSuperChart + const ChartTypeUnknown + type ConnectionConfig struct + APIKey string + AccessToken string + Debug bool + Domain string + HTTPClient *http.Client + Headers map[string]string + RequestTimeout time.Duration + TrafficAccessToken string + func (c *ConnectionConfig) APIBase() string + type Context struct + Cwd string + ID string + Language string + type CreateCodeContextOpts struct + Cwd string + Language RunCodeLanguage + RequestTimeout time.Duration + type Execution struct + Error *ExecutionError + ExecutionCount int + Logs Logs + Results []*Result + func NewExecution() *Execution + func (e *Execution) Text() string + func (e *Execution) ToJSON() (string, error) + type ExecutionError struct + Name string + Traceback string + Value string + func (e *ExecutionError) Error() string + func (e *ExecutionError) ToJSON() string + type InvalidArgumentError struct + Message string + func (e *InvalidArgumentError) Error() string + type LineChart struct + type Logs struct + Stderr []string + Stdout []string + type MIMEType = string + type NotFoundError struct + Message string + func (e *NotFoundError) Error() string + type OnErrorFunc func(err *ExecutionError) + type OnResultFunc func(result *Result) + type OnStderrFunc func(msg OutputMessage) + type OnStdoutFunc func(msg OutputMessage) + type OutputMessage struct + Error bool + Line string + Timestamp int64 + func (o OutputMessage) String() string + type PieChart struct + Slices []PieData + type PieData struct + Angle float64 + Label string + Radius float64 + type PointChart struct + Points []PointData + XScale ScaleType + XTickLabels []string + XTicks []any + YScale ScaleType + YTickLabels []string + YTicks []any + type PointData struct + Label string + Points [][2]any + type RateLimitError struct + Message string + func (e *RateLimitError) Error() string + type Result struct + Chart Chart + Data map[string]any + Extra map[string]any + HTML string + IsMainResult bool + JPEG string + JSON map[string]any + JavaScript string + LaTeX string + Markdown string + PDF string + PNG string + Raw map[string]any + SVG string + Text string + func (r *Result) Formats() []string + func (r *Result) String() string + type RunCodeLanguage string + const LanguageBash + const LanguageJava + const LanguageJavaScript + const LanguagePython + const LanguageR + const LanguageTypeScript + type RunCodeOpts struct + Context *Context + Envs map[string]string + Language RunCodeLanguage + OnError OnErrorFunc + OnResult OnResultFunc + OnStderr OnStderrFunc + OnStdout OnStdoutFunc + RequestTimeout time.Duration + Timeout time.Duration + type Sandbox struct + func Connect(ctx context.Context, sandboxID string, opts *SandboxOpts) (*Sandbox, error) + func Create(ctx context.Context, opts *SandboxOpts) (*Sandbox, error) + func (s *Sandbox) ClientID() string + func (s *Sandbox) CreateCodeContext(ctx context.Context, opts *CreateCodeContextOpts) (*Context, error) + func (s *Sandbox) GetHost(port int) string + func (s *Sandbox) GetInfo(ctx context.Context) (*SandboxInfo, error) + func (s *Sandbox) IsRunning(ctx context.Context) (bool, error) + func (s *Sandbox) Kill(ctx context.Context) error + func (s *Sandbox) ListCodeContexts(ctx context.Context) ([]*Context, error) + func (s *Sandbox) RemoveCodeContext(ctx context.Context, c any) error + func (s *Sandbox) RestartCodeContext(ctx context.Context, c any) error + func (s *Sandbox) RunCode(ctx context.Context, code string, opts *RunCodeOpts) (*Execution, error) + func (s *Sandbox) SandboxID() string + func (s *Sandbox) SetTimeout(ctx context.Context, timeout time.Duration) error + type SandboxError struct + Message string + StatusCode int + func (e *SandboxError) Error() string + type SandboxInfo struct + Alias string + ClientID string + EndAt string + Metadata map[string]string + SandboxID string + StartedAt string + State string + TemplateID string + func List(ctx context.Context, opts *SandboxOpts) ([]SandboxInfo, error) + type SandboxOpts struct + APIKey string + AccessToken string + Debug bool + Domain string + EnvVars map[string]string + HTTPClient *http.Client + Headers map[string]string + Metadata map[string]string + RequestTimeout time.Duration + Template string + Timeout time.Duration + type ScaleType string + const ScaleTypeAsinh + const ScaleTypeCategorical + const ScaleTypeDatetime + const ScaleTypeFunction + const ScaleTypeFunctionLog + const ScaleTypeLinear + const ScaleTypeLog + const ScaleTypeLogit + const ScaleTypeSymlog + const ScaleTypeUnknown + type ScatterChart struct + type SuperChart struct + Charts []Chart + type TimeoutError struct + Message string + func (e *TimeoutError) Error() string + type UnknownChart struct