Add notebook extension for automatically adding imports to first cell#16
Add notebook extension for automatically adding imports to first cell#16valtron wants to merge 7 commits into8080labs:masterfrom valtron:nbextension
Conversation
|
Wow, first of all, thank you for your contribution! It looks really nice and is a great improvement of pyforest! Does the notebook extension also work for JupyterLab? Or what would be necessary to also make it work in Jupyter Lab? |
|
Glad you like it! I added a labextension. But I'm still trying to figure out a convenient way for users to install it. (I've been using |
|
Done, and added installation instructions to the README. |
|
It's now using an "invisible" widget instead of the
|
|
What's the status of this? Looks very useful in the demo, at least. :) |
|
@henryiii All the major parts are finished; I never did figure out how to not show the widget in IPython, though: |

I made a notebook extension that automatically adds lazy imports to the top cell as they're imported:
How to use it:
pip install git+https://github.com/valtron/pyforest.git@nbextensionjupyter nbextension install --py pyforestjupyter nbextension enable pyforest --pyThe implementation is hacky (this is my first notebook extension and documentation is lacking) but this is a proof-of-concept anyway.