Socket
Socket
Sign inDemoInstall

jupyter-paths

Package Overview
Dependencies
1
Maintainers
20
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jupyter-paths

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


Version published
Maintainers
20
Install size
21.5 kB
Created

Readme

Source

jupyter-paths

NPM

Travis for Jupyter Paths Build status Greenkeeper badge

Pure JavaScript implementation of jupyter-paths.

npm install jupyter-paths

Usage

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

runtimeDir()

Returns immediately with the path to running kernels

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

dataDirs()

> 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.

> 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.

> 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' ]

Keywords

FAQs

Last updated on 12 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc