1.1.0 • Published 9 years ago

jupyter-runtimes v1.1.0

Weekly downloads
1
License
BSD
Repository
github
Last release
9 years ago

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
})
1.1.0

9 years ago

1.0.0

9 years ago