jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.14k stars 949 forks source link

Any collapsable tree view widget? #2345

Open deeplook opened 5 years ago

deeplook commented 5 years ago

I'm looking for a tree view widget like this, but as an ipywidget without the need for runninng JupyterLab: https://github.com/gnestor/jupyterlab_json. Does anything like this exist or is it on the roadmap? Ideally, this would operate on pure Python data structures like sequences and mappings and not only on JSON.

Screenshot 2019-03-11 at 10 16 15

martinRenou commented 5 years ago

I worked on a small tree widget: https://github.com/QuantStack/ipytree and there are some examples notebooks https://github.com/QuantStack/ipytree/tree/master/examples. I plan to package it for conda at some point. And I would like to add context menus and other fancy features.

martinRenou commented 5 years ago

You can try it on binder before installing it: https://mybinder.org/v2/gh/QuantStack/ipytree/master :)

deeplook commented 5 years ago

I just tried very briefly. Will have to do more, but ipyleaflet seems to be missing when running in binder...

martinRenou commented 5 years ago

Yeah sorry the repo needs an environment.yml file specifying what the binder needs, but you can try the second notebook ipytree.ipynb which should work just fine :)

deeplook commented 5 years ago

I know, I'm doing it myself github.com/deeplook/ipyrest. ;)

martinRenou commented 5 years ago

That's really cool :) We should create an awesome-ipywidgets-libraries repository, and put the list of widgets libraries with links to repositories and binder links. That would definitely be useful for people to know what's available.

deeplook commented 5 years ago

Concerning your binder, this did the trick for me. Used in any notebook (then start the leaflet example in a fresh kernel):

! pip install ipyleaflet
! jupyter nbextension enable --py --sys-prefix ipyleaflet
martinRenou commented 5 years ago

We should create an awesome-ipywidgets-libraries repository

There is one actually! Not specific to widgets libraries but some of them are in the list: https://github.com/markusschanta/awesome-jupyter