Skip to content

Add an RPC for executing code #62

@jmcphers

Description

@jmcphers

Currently, the only way to execute code and get the results is to use the web socket to send a Jupyter execute_request and listen for the resulting iopub and execute_reply messages on the web socket.

However, this requires a websocket library and a bit of boilerplate to filter out all the messages on the stream.

It would be very helpful for external use (especially with a Quarto engine) to have an RPC usable over regular HTTP that performed an execution and returned the results.

The RPC's status would mirror that of the execution; it would not return until the execution is finished, and would succeed (200) or fail (non 200) as the execution does. The resultant return value in JSON would aggregate all of the data returned during execution, perhaps as a literal accumulation of all messages from the streams with the same parent ID as the execution, or perhaps as a summary of stdout, stderr, and structured result.

These executions would have the same queuing behaviors (and share a queue with) executions requested via execute_request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions