Skip to main content

Multi ContentsManager

A meta ContentsManager for installing multiple backends using JupyterLab Filetree

Build Status GitHub issues Coverage PyPI PyPI npm

Install

pip install multicontentsmanager
jupyter labextension install multicontentsmanager
jupyter serverextension enable --py multicontentsmanager

Configure

Add the following to your jupyter_notebook_config.json:

{
  "NotebookApp": {
    "contents_manager_class": "multicontentsmanager.metacontentsmanager.MetaContentsManager",
    "nbserver_extensions": {
      "multicontentsmanager": 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.MultiContentsManager.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:

MultiContentsManager active with 2 managers
Installing multicontentsmanager 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.

Metadata

Release files for multicontentsmanager 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multicontentsmanager 0.0.1
File Size Uploaded
multicontentsmanager-0.0.1.tar.gz 286.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multicontentsmanager 0.0.1
File Interpreter ABI Platform
multicontentsmanager-0.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 316.5 kB

Release files / multicontentsmanager-0.0.1.tar.gz

Download URL multicontentsmanager-0.0.1.tar.gz
Size 286.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b3f997d3fdd160a023cfd4de9d5ec1b14470e1f46179820235e490e77a7186a1
BLAKE2b-256 checksum
How to use checksums
0930f9dacf1f41fe6673caa76180dd926fa40c8665baefdb94f2ef7baa68c873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/0.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5

Release files / multicontentsmanager-0.0.1-py2.py3-none-any.whl

Download URL multicontentsmanager-0.0.1-py2.py3-none-any.whl
Size 29.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ca7481d3a6330104a6fc8787d7ea8c5e2c29ded878e239430058bd1c1587c381
BLAKE2b-256 checksum
How to use checksums
713b0c67efab7843fc6e466b0df36eea0ce1a6718804e339cd525124724ee283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/0.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page