jupyter-session
Broken out of Hydrogen.
This API is not finalized.
Usage
var Session = require('jupyter-session');
pythonSession = new Session(
{
version: 5,
signature_scheme: 'sha256',
key: '<the signing key>',
transport: 'tcp',
ip: '127.0.0.1',
hb_port: 60868,
control_port: 60869,
shell_port: 60870,
stdin_port: 60871,
iopub_port: 60872
},
<'handle to kernel process, if available'>
);
pythonSession.on('shell.*', function(message) {
});
pythonSession.execute(code, function(results) {
});
pythonSession.complete(code, function(results) {
});
Session is an EventEmitter, so you can use any of these methods: https://github.com/asyncly/EventEmitter2