https://github.com/datadotworld/dw-jupyter-contents
Jupyter ContentsManager implementation for data.world
https://github.com/datadotworld/dw-jupyter-contents
data data-analysis data-science dwstruct-t90-deprecated jupyter jupyter-notebook jupyterlab reference-implementation
Last synced: about 2 months ago
JSON representation
Jupyter ContentsManager implementation for data.world
- Host: GitHub
- URL: https://github.com/datadotworld/dw-jupyter-contents
- Owner: datadotworld
- License: apache-2.0
- Created: 2018-03-07T05:57:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T02:30:33.000Z (over 1 year ago)
- Last Synced: 2025-02-17T06:16:25.905Z (5 months ago)
- Topics: data, data-analysis, data-science, dwstruct-t90-deprecated, jupyter, jupyter-notebook, jupyterlab, reference-implementation
- Language: Python
- Homepage: https://data.world/integrations
- Size: 386 KB
- Stars: 1
- Watchers: 34
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
==========
dwcontents
==========A Jupyter content provider for data.world.
This content provider allows data.world users to store and manage their notebooks and files
directly on data.world using Jupyter Notebook or Jupyter Lab.Once enabled, the content provider will allow you to browse and access your entire data.world
library, including datasets and projects that you have created, contribute to or have bookmarked.Quick start
===========Install
-------You can install it using ``pip`` directly from PyPI::
pip install dwcontents
Configure
---------Find or create a file named ``jupyter_notebook_config.py`` under your Jupyter folder (``~/.jupyter``).
Update it to define two configuration parameters:
- ``NotebookApp.contents_manager_class``: Must be set to ``dwcontents.DwContents``
- ``DwContents.dw_auth_token``: Must be your data.world API token (obtained at https://data.world/settings/advanced)For example:
.. code-block:: python
import dwcontents
c = get_config()
c.NotebookApp.contents_manager_class = dwcontents.DwContents
c.DwContents.dw_auth_token = 'YOUR TOKEN GOES HERE'You can also use this to access data.world alongside your local files using
``dwcontents.HybridContents``.In that case, this is what your ``jupyter_notebook_config.py`` might look like:
.. code-block:: python
import dwcontents
from notebook.services.contents.filemanager import FileContentsManager
c = get_config()
c.NotebookApp.contents_manager_class = dwcontents.HybridContents
c.HybridContents.manager_classes = {
# Associate the root directory with data.world
'': dwcontents.DwContents,
# Associate /~local with your working directory, completely disconnected from data.world
'~local': FileContentsManager
}
c.HybridContents.manager_kwargs = {
'': {
'dw_auth_token': 'YOUR TOKEN GOES HERE'
}
}Run
---Once installation and configuration are complete, run Jupyter Notebook or Labs like you normally would.
For example::
jupyter notebook
Known Issues
------------- Jupyter supports a wide variety of file operations, whereas support for directories on data.world is limited.
For a better experience, try to keep a flat file structure under your datasets and projects.