Skip to main content

Snippets menu magic

Project description

Snippets Menu Magic


SnippetsMenuMagic is an IPython extension that let's you easily create menu directly from the notebook.

The menu elements can be snippets of code, internal/external links, markdown documents etc.

Is meant to be used with Snippet Menu that is part of jupyter contrib nbextensions.


The package can be installed as follows:

pip install snippets_menu_magic

After installation, the extension may be loaded within an IPython session with :

%load_ext snippets_menu_magic

This extension rely on dpath to traverse the dictionary with xpath syntax. (it should be pulled automatically by pip)

It helps to also enable Snippet Menu extension to later see the results

Quick usage how-to

Add a menu and a sub-menu

%%snip_add usage/how-to
this content will be pasted when the menu is clicked
can be multiple lines too

Add a link

%%snip_add bookmarks nbextensions -link    

Rename and place it as a top menu

%snip_mv bookmarks/nbextensions top/bookmarks/nbextensions 


s=%snip_search "**/*extensions"

Remove it

%snip_rm usage/how-to

Please take a moment to read the Guide or better run the GUIDE notebook locally and play with it


The latest release of the package may be obtained from GitHub.


This software was written and packaged by Eli Spizzichino


This software is licensed under the

Apache 2.0 License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for snippets_menu_magic, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size snippets_menu_magic-0.2.2-py2.py3-none-any.whl (31.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size snippets_menu_magic-0.2.2.tar.gz (14.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page