Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lydian/multicontents
Allow jupyter notebook to configure multiple contents manager
https://github.com/lydian/multicontents
jupyter jupyter-notebook jupyter-notebook-extension
Last synced: 3 months ago
JSON representation
Allow jupyter notebook to configure multiple contents manager
- Host: GitHub
- URL: https://github.com/lydian/multicontents
- Owner: lydian
- License: apache-2.0
- Created: 2019-10-27T06:13:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-25T17:33:41.000Z (8 months ago)
- Last Synced: 2024-04-26T17:51:23.947Z (8 months ago)
- Topics: jupyter, jupyter-notebook, jupyter-notebook-extension
- Language: Python
- Homepage:
- Size: 68.4 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Multicontents
[![Build Status](https://travis-ci.org/lydian/multicontents.svg?branch=master)](https://travis-ci.org/lydian/multicontents)
[![codecov](https://codecov.io/gh/lydian/multicontents/branch/master/graph/badge.svg)](https://codecov.io/gh/lydian/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
1. install multicontents
```
pip install multicontents
```
2. configure jupyter_notebook_config.py
```
from multicontents import MultiContentsManager
from IPython.html.services.contents.filemanager import FileContentsManager
from s3contents import S3ContentsManagerc.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
1. clone the repo:
```git clone [email protected]:lydian/multicontents.git```
2. run testing with ```make server```
3. You can modify example config file for testingI'll try my best to do CR pull request!