Sphinx-Gallery#

ASphinx extension that builds anHTML gallery of examples from any set of Python scripts.Check out thedocumentation for introductions on how to use it and more…

Features#

  • 🚀Create example galleries automaticallyby running pure Python example scripts while capturing outputs + figures,rendering them into reST files built into your documentation by Sphinx:

  • 📝Embed reST in your example Python files, allowing you to interweave narrative-like contentwith code that generates plots in your documentation. Sphinx-Gallery alsoautomatically generates a Jupyter Notebook for each your example page.

  • 📋Add mini-galleries for API documentation. Sphinx-Gallery can generate mini-gallerieslisting all examples that use a particular function/method/etc.

  • 🔗Add intersphinx links to your examples. Sphinx-Gallery can automatically add links toAPI documentation for functions/methods/classes that are used in yourexamples (for any Python module that uses intersphinx).

  • 🗒️Manage multiple galleries to create and embed galleries for severalfolders of examples.

Installation#

You can do a direct install viapip by using:

$pipinstallsphinx-gallery

Tip

Sphinx-Gallery also has support for scraping images from Matplotliband Matplotlib-based packages such as Seaborn.We recommend installing systemoptipng binaries to reducethe file sizes of the generated PNG files.

How to cite#

If you would like to cite Sphinx-Gallery you can do so using ourZenododeposit.

Contribute#

Thank you for your interest! Please see our

contributing guide to get started.