providing contents from multiple sources in jupyter notebook
Project description
Multicontents
It's intentionally to do things like HybridContentsManager (from pgcontents) which allow setting up multiple sources on jupyter. With extra features including:
- Support moving data accross different sources
- The package is pretty lightweight, which means you don't need to install extra library if you only want the multi backend support.
Install
- install multicontents
pip install multicontents
- configure jupyter_notebook_config.py
from multicontents import MultiContentsManager
from IPython.html.services.contents.filemanager import FileContentsManager
from s3contents import S3ContentsManager
c.NotebookApp.contents_manager_class = MultiContentsManager
c.MultiContentsManager.managers = {
"home": {
"manager_class": FileContentsManager,
"kwargs": {
"root_dir": os.environ["HOME"]
},
},
"s3": {
"manager_class": S3ContentsManager,
"kwargs": {
"bucket": "example-bucket",
"prefix": "path/to/notebooks",
},
},
}
Develoop
- clone the repo:
git clone git@github.com:lydian/multicontents.git
- run testing with
make server
- You can modify example config file for testing
I'll try my best to do CR pull request!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multicontents-0.4.0.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file multicontents-0.4.0.tar.gz
.
File metadata
- Download URL: multicontents-0.4.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c18b0ac4f1cb9b5568871ec162226ef7db31a0cd122c1baf2cc0730cec8c1e5b |
|
MD5 | 83419062cd43485240625aaabfbe8875 |
|
BLAKE2b-256 | 29cea82b36502c83f52b718b1af51214e3094b9a95ebca4e2e4c8f5b89e2956b |
File details
Details for the file multicontents-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: multicontents-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7300fadc92a2a7e655253b27540178f1f249b59af3b2bca3e270f359c7b3edd3 |
|
MD5 | 0de17f6a2eb3b9ef5af9b4c8c2c26312 |
|
BLAKE2b-256 | 3dd81bbf2871d86ca3421ab58caeb15e4f3dd3fc8c51773cabb9387f0483725b |