jupyter-runtimes

1.1.0 • Public • Published

jupyter-runtimes

Watches jupyter runtime files for you.

NPM

var Runtimes = require('jupyter-runtimes')
var watcher = Runtimes(['/path/to/runtime/dir'])
 
watcher.on('data', function (runtimes) {
  // runtimes is a list of the contents of each runtime as a JSON object
  // e.g. [
  // {
  //   "filepath": "/path/to/runtimes/ajsdfhd-runtime.json",
  //   "data": {etc..}
  //  }
  // ]
  //
})
 
watcher.close()

API

Runtimes(dirs)

Returns a watcher

dirs: the directories to watch

watcher.close()

Closes the watcher -- stops watching the filesystem.

Events

There should be more, but right now it just emits one event -- that's when the kernel spec (kernel.json) has changed.

data

watcher.on('data', function (runtimes) {
  // list of runtimes
})

Readme

Keywords

Package Sidebar

Install

npm i jupyter-runtimes

Weekly Downloads

1

Version

1.1.0

License

BSD

Last publish

Collaborators

  • karissa