# jupyter-kernel-watch

> watch a jupyter kernel

Latest version **2.0.2** (published 2015-06-18) · BSD license · 0 weekly downloads

## Install

```sh
npm install jupyter-kernel-watch
pnpm add jupyter-kernel-watch
yarn add jupyter-kernel-watch
bun add jupyter-kernel-watch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2015-06-18 |
| First published | 2015-06-17 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Karissa McKelvey |
| Maintainers | karissa |
| Keywords | watch, kernel, jupyter |

## Links

- npm: https://www.npmjs.com/package/jupyter-kernel-watch
- Repository: https://github.com/karissa/jupyter-kernel-watch
- Issues: https://github.com/karissa/jupyter-kernel-watch/issues
- npm.io page: https://npm.io/package/jupyter-kernel-watch

## Dependencies (1)

- [gaze-collect](https://npm.io/package/gaze-collect.md) ^1.1.0

## Recent versions

- 2.0.2 (latest) — 2015-06-18
- 2.0.1 — 2015-06-18
- 2.0.0 — 2015-06-18
- 1.1.0 — 2015-06-18
- 1.0.0 — 2015-06-17

## README

# jupyter-kernel-watch

Watches jupyter kernel directories for you.

[![NPM](https://nodei.co/npm/jupyter-kernel-watch.png)](https://nodei.co/npm/jupyter-kernel-watch/)

| [![Travis](http://img.shields.io/travis/karissa/jupyter-kernel-watch.svg?style=flat)](https://travis-ci.org/karissa/jupyter-kernel-watch)



```js
var KernelWatch = require('jupyter-kernel-watch')
var watcher = KernelWatch(['/path/to/kernels', '/another/path/to/.jupyter/kernels'])

watcher.on('data', function (kernelSpecs) {
  // kernelSpecs is a list of the contents of the kernel.json as a JSON object
  // e.g. [
  // {
  //   "filepath": "/path/to/kernels/python/kernel.json",
  //   "data": { "display_name": "Python 2", "language": "python", "argv": [ etc...]}
  //  }
  // ]
  //
})

watcher.close()
```

## API

### KernelWatch(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.

### kernelspecs

```js
watcher.on('data', function (kernelSpecs) {
  // list of kernelspecs
})
```

---
_Source: https://npm.io/package/jupyter-kernel-watch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
