Package: jupyter-fs
A plugin for JupyterLab that lets you set up and use as many filebrowsers as you like, connected to whatever local and/or remote filesystem-like resources you want.The backend is built on top ofPyFilesystem, while the frontend is built on top ofJupyterLab Filetree.Installpipinstalljupyter-fsConfigureAdd the following to yourjupyter_server_config.json:{"ServerApp":{"contents_manager_class":"jupyterfs.metamanager.MetaManager","jpserver_extensions":{"jupyterfs.extension":true}}}Simple use (no auth/credentials)Add specifications for additional contents managers in your user settings (in theSettingsmenu underAdvanced Settings Editor->jupyter-fs). Here's an example config that sets up several new filebrowsers side-by-side:{"resources":[{"name":"root at test dir","url":"osfs:///Users/foo/test"},{"name":"s3 test bucket","url":"s3://test"},{"name":"s3 test key","url":"s3://test-2/prefix/","defaultWritable":false},{"name":"samba guest share","url":"smb://guest@127.0.0.1/test?name-port=3669"}]}You should see your new filebrowsers pop up in the left-hand sidebar instantly when you save your settings:Use with auth/credentialsAny stretch of a"url"that is enclosed in double-brackets{{VAR}}will be treated as a template, and will be handled by jupyter-fs's auth system. For example, you can pass a username/password to the"samba guest share"resource in theSimple useexample above by modifying its"url"like so:{"resources":[...{"name":"samba share","url":"smb://{{user}}:{{passwd}}@127.0.0.1/test?name-port=3669"}]}When you save the above"resouces"config, a dialog box will pop asking for theusernameandpasswdvalues:Once you enter those values and hit ok, the new filebrowsers will then immediately appear in the sidebar:The auth dialog will only appear when neededThe jupyter-fs auth dialog will only appear when:JupyterLab first loads, if any fs resources reqiure autha new fs resouce is added that requires auth, or its"url"field is modifiedSupported filesystemsThe type of resource each filebrowser will point to is determined by the protocol at the start of its url:osfs:osfilesystem. The will open a new view of your local filesystem, with the specified roots3: opens a filesystem pointing to an Amazon S3 bucketsmb: opens a filesystem pointing to a Samba sharejupyter-fs can open a filebrowser pointing to any of the diverseresources supported by PyFilesystem. Currently, we test only test the S3 and smb/samba backends as part of our CI, so your milleage may vary with the other PyFilesystem backends.The filesystem urlThe"url"field jupyter-fs config is based on the PyFilesystemopener urlstandard. For more info on how to write these urls, see the documentation of the relevant PyFilesystem plugin:S3:S3FS docssmb:fs.smbfs docsServer-side settingsIf you prefer to set up your filesystem resources in the server-side config, you can do so. For example, you can set up a local filesystem by adding the following to yourjupyter_server_config.pyfile:c.JupyterFs.resources=[{"name":"local_test","url":"osfs:///Users/foo/test"},]ALternatively, you can add resource specifications alongside the basic jupyter-fs config in yourjupyter_server_config.jsonfile:{"ServerApp":{"contents_manager_class":"jupyterfs.metamanager.MetaManager","jpserver_extensions":{"jupyterfs.extension":true}},"JupyterFs":{"resources":[{"name":"local_test","url":"osfs:///Users/foo/test"}]}}Any filesystem resources specified in any server-side config file will be merged with the resources given in a user's settings.DevelopmentSeeCONTRIBUTING.mdfor guidelines.LicenseThis software is licensed under the Apache 2.0 license. See theLICENSEandAUTHORSfiles for details.