# jupyter-paths

> Node wrapping of jupyter/jupyter_core to resolve paths across Jupyter installations.

Latest version **2.0.4** (published 2021-06-12) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install jupyter-paths
pnpm add jupyter-paths
yarn add jupyter-paths
bun add jupyter-paths
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2021-06-12 |
| First published | 2015-06-08 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Kyle Kelley |
| Maintainers | benabel, alexandercbooth, benrussert, mpacer, theengineear, yuvipanda, rgbkrk, lgeiger, ivanov, captainsafia, peggyrayzis, jdetle, hasch, willingc, stormpython, crystalline-cat, emeeks, minrk, jdfreder, wfwhitney |
| Keywords | jupyter, paths, ipython |

## Links

- npm: https://www.npmjs.com/package/jupyter-paths
- Repository: https://github.com/nteract/jupyter-paths
- Issues: https://github.com/nteract/jupyter-paths/issues
- npm.io page: https://npm.io/package/jupyter-paths

## Dependencies (1)

- [home-dir](https://npm.io/package/home-dir.md) ^1.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.4 (latest) — 2021-06-12
- 2.0.3 — 2020-04-23
- 2.0.2 — 2020-04-15
- 2.0.1 — 2020-03-22
- 2.0.0 — 2017-07-19
- 1.1.0 — 2016-12-11
- 1.0.2 — 2016-04-24
- 1.0.1 — 2016-04-24
- 1.0.0 — 2016-01-21
- 0.3.5 — 2015-12-24
- 0.3.4 — 2015-12-24
- 0.3.3 — 2015-06-26
- 0.3.2 — 2015-06-25
- 0.3.1 — 2015-06-25
- 0.3.0 — 2015-06-25
- … 4 more at https://npm.io/package/jupyter-paths/versions

## README

# jupyter-paths

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

[![Travis for Jupyter Paths](https://travis-ci.org/nteract/jupyter-paths.svg)](https://travis-ci.org/nteract/jupyter-paths)
[![Build status](https://ci.appveyor.com/api/projects/status/qkqb19u817f13bbr/branch/master?svg=true)](https://ci.appveyor.com/project/nteract/jupyter-paths/branch/master)
[![Greenkeeper badge](https://badges.greenkeeper.io/nteract/jupyter-paths.svg)](https://greenkeeper.io/)


Pure JavaScript implementation of `jupyter-paths`.

```
npm install jupyter-paths
```

## Usage

```JavaScript
$ node
> var jp = require('jupyter-paths')
```

### `runtimeDir()`

Returns immediately with the path to running kernels

```JavaScript
> jp.runtimeDir()
'/Users/rgbkrk/Library/Jupyter/runtime'
```

### `dataDirs()`

```JavaScript
> jp.dataDirs()
[ '/Users/rgbkrk/Library/Jupyter',
  '/usr/share/jupyter',
  '/usr/local/share/jupyter' ]
```

If you want the paths to include the `sys.prefix` paths (for Anaconda installs),
an optional `opts` parameter is accepted with key `withSysPrefix`. This changes
the return to a promise for you instead.

```JavaScript
> jp.dataDirs({ withSysPrefix: true })
Promise { <pending> }
> jp.dataDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/Library/Jupyter',
  '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/share/jupyter',
  '/usr/share/jupyter',
  '/usr/local/share/jupyter' ]
```

### `configDirs()`

Like `dataDirs`, an optional `opts` parameter is accepted with key
`withSysPrefix` as an argument.

```JavaScript
> jp.configDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/.jupyter',
  '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/etc/jupyter',
  '/usr/local/etc/jupyter',
  '/etc/jupyter' ]
```

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