A Filesystem-like mult-contents manager backend for Jupyter
Project description
Jupyter-FS
A filesystem-like ContentsManager
backend for Jupyter. This library allows you to hook up multiple file backends to Jupyter and interact with their contents using JupyterLab Filetree.
Install
pip install jupyter-fs
jupyter labextension install jupyter-fs
jupyter serverextension enable --py jupyter-fs
Configure
Add the following to your jupyter_notebook_config.json
:
{
"NotebookApp": {
"contents_manager_class": "jupyterfs.meta_contents_manager.MetaContentsManager",
"nbserver_extensions": {
"jupyterfs": true
}
}
}
Register additional contents managers in your jupyter_notebook_config.py
. As an example, an S3Contents manager is added as follows:
from s3contents import S3ContentsManager
c.JupyterFS.contents_managers = \
{
's3': S3ContentsManager
}
c.S3ContentsManager.bucket = '<your bucket>'
## SECRET
c.S3ContentsManager.access_key_id = '<your access key>'
c.S3ContentsManager.secret_access_key = '<your secret key>'
During application startup, you should see something like this in the logs:
JupyterFS active with 2 managers
Installing JupyterFS handler on path /multicontents
And in the UI, you will see your contents managers available:
We can add additional contents managers:
c.MultiContentsManager.contents_managers = \
{
's3': S3ContentsManager,
'file2': AbsolutePathFileManager(root_dir=os.path.expanduser("~/Downloads"))
}
Here I utilize an AbsolutePathFileManager
to grab another folder on my system for use. Remember, remote filesystems are still remote, and locally you may need to move around the filesystem with a os.chdir
command (or equivalent in other languages).
Here, I have the above s3
and AbsolutePathFileManager
, along with the original contents manager, for a total of 3 seperate spaces.
Development
See CONTRIBUTING.md for guidelines.
License
This software is licensed under the Apache 2.0 license. See the LICENSE and AUTHORS files for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jupyter_fs-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7858abca5a74d2a0ecaf6df435c7483c066b75281e071b5cec974458640c0dc8 |
|
MD5 | 85ba5f9d4eb6050481232a028f8011e5 |
|
BLAKE2b-256 | 9082efbeca74fed9c0b702c1e9772c3442e0b059001a0d1b0ed3eb9b84545b5a |