r/IPython • u/jarryboi • Dec 09 '15
Jupyter Notebook extension – find a code snippet for any class/function
Hi all,
I’m very happy to announce the release of our Jupyter notebook code search extension (https://github.com/Stepsize/jupyter_search). It allows you to quickly find information relating to a class, function, etc. The extension returns the class/function signature (including a link to the documentation) and an example code snippet from StackOverflow or the documentation.
Here’s a gif showing the extension in action: http://imgur.com/UgS7rr0.gif
To use it, in any code cell just type “library_name function_name”, and press alt + /. The search result will be printed in the cell's output area. Alternatively, you can select some text in the code cell and press the shortcut.
When you actually run the cell, the search result is overwritten with the output of your code.
Note:
The extension only works on Jupyter versions 4.x.
The extension currently only supports Python-related searches.
I’d love to hear your thoughts! This is an alpha version so any feedback is extremely valuable. Also, don’t hesitate to tell me if you’d like this to be available for older versions of the notebook and/or for other languages.
Thanks