Creates a JupyterConnectionInfo object for a kernel given an array of comm channel ports
array of comm channel ports to use for the connection, [hb_port, control_port, shell_port, stdin_port, iopub_port]
JupyterConnectionInfo object
dataDirs returns all the expected static directories for this OS. The user of this function should make sure to make sure the directories exist.
When withSysPrefix is set, this returns a promise of directories
All the Jupyter Data Dirs
find a kernel by name
the kernel to locate
kernelResource object
Get an array of kernelResources objects for the host environment This matches the Jupyter notebook API for kernelspecs exactly
Promise for an array of kernelResources objects
Launch a kernel by name
Launch a kernel for a given kernelSpec
describes a specific kernel
Launch a kernel for a given kernelSpec and connection info
describes a specific kernel, see the npm package
kernelspecs
connection config
path to the config file
spawnResults
where the userland data directory resides includes things like the runtime files
directory for data
Write a connection file
configResults
Generated using TypeDoc
@nteract/fs-kernels
This package contains functions for launching a Jupyter kernel, getting stats on it, and shutting it down.
Installation
$ yarn add @nteract/fs-kernels
$ npm install --save @nteract/fs-kernels
Usage
The example below shows how we can use this package to:
new Kernel(kernelName)
)kernel.launch()
)kernel.getUsage()
)kernel.shutdown()
).import Kernel from "@nteract/fs-kernels";
export default async () => { const kernelName = "python3"; const kernel = new Kernel(kernelName); await kernel.launch(); console.log(kernel.getUsage()); await kernel.shutdown(); };
Documentation
You can view the reference documentation for
@nteract/fs-kernels
in the package docs.Support
If you experience an issue while using this package or have a feature request, please file an issue on the issue board and, if possible, add the
pkg:fs-kernels
label.License
BSD-3-Clause