Execution
Represents the result of a cell execution.Constructors
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
results | Result[] | [] | List of result of the cell (interactively interpreted last line), display calls (e.g. matplotlib plots). |
logs | Logs | ... | Logs printed to stdout and stderr during execution. |
error? | ExecutionError | undefined | An Error object if an error occurred, null otherwise. |
executionCount? | number | undefined | Execution count of the cell. |
Returns
Execution
Properties
Accessors
text
Get Signature
Returns
undefined | string
Methods
toJSON()
Returns
object
| Name | Type |
|---|---|
error | undefined | ExecutionError |
logs | Logs |
results | Result[] |
ExecutionError
Represents an error that occurred during the execution of a cell. The error contains the name of the error, the value of the error, and the traceback.Constructors
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the error. |
value | string | Value of the error. |
traceback | string | The raw traceback of the error. |
Returns
ExecutionError
Properties
OutputMessage
Represents an output message from the sandbox code execution.Constructors
Parameters
| Parameter | Type | Description |
|---|---|---|
line | string | The output line. |
timestamp | number | Unix epoch in nanoseconds. |
error | boolean | Whether the output is an error. |
Returns
OutputMessage
Properties
Methods
toString()
Returns
string
Result
Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented as a string, and the result can contain multiple types of data. The display calls don’t have to have text representation, for the actual result the representation is always present for the result, the other representations are always optional.Constructors
Parameters
| Parameter | Type |
|---|---|
rawData | RawData |
isMainResult | boolean |
Returns
Result
Properties
Methods
formats()
Returns
string[]
Array of strings representing the formats available for the result.
toJSON()
Returns
object
| Name | Type |
|---|---|
extra? | any |
html | undefined | string |
javascript | undefined | string |
jpeg | undefined | string |
json | undefined | string |
latex | undefined | string |
markdown | undefined | string |
pdf | undefined | string |
png | undefined | string |
svg | undefined | string |
text | undefined | string |
Type Aliases
Logs
Type declaration
MIMEType
RawData
Functions
extractError()
Parameters
| Parameter | Type |
|---|---|
res | Response |
Returns
Promise<undefined | SandboxError>
parseOutput()
Parameters
| Parameter | Type |
|---|---|
execution | Execution |
line | string |
onStdout? | (output: OutputMessage) => any |
onStderr? | (output: OutputMessage) => any |
onResult? | (data: Result) => any |
onError? | (error: ExecutionError) => any |
Returns
Promise<void>