$npx skillfedfor your agent

sphinx-gallery

A Sphinx extension that builds an HTML gallery of examples from any set of Python scripts.

Worth itPyPI SphinxReleased Apr 2026650.8K downloads / mo3-clause BSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sphinx_gallery-0.21.0-py3-none-any.whl
v0.21.0 · released 2026-04-24 · Python >=3.10 · 2 runtime deps: pillow, sphinx

Yes. Sphinx-Gallery is a mature, actively maintained tool with low install friction and no known vulnerabilities. It solves a concrete problem—turning Python scripts into documented, executable galleries—and is widely adopted by major projects. Install it if you need to showcase runnable examples in Sphinx documentation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Sphinx and pillow as runtime dependencies; Python 3.10 or later.
  • Low friction: pure Python wheel with only two runtime dependencies (pillow and sphinx).
  • Actively maintained as of 2026-04-24 with recent activity, supporting current Python versions (3.10–3.14).

License · maintenance · safety

3-clause BSD (permissive) — 3-clause BSD is permissive; you can use, modify, and distribute sphinx-gallery freely in commercial and private projects with minimal restrictions.

last release 2026-04-24 (112 days) · last repo commit 2026-08-14 · 454 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 650,798 downloads/mo, #5,556 on PyPI

Verify before relying

pip install sphinx-gallery

# In doc/conf.py:
extensions = ['sphinx_gallery.gen_gallery']
sphinx_gallery_conf = {
    'examples_dirs': '../examples',
    'gallery_dirs': 'auto_examples',
}
  • Whether optional system binaries (optipng) are required or merely recommended for PNG optimization.
  • Performance characteristics when processing large numbers of example scripts or high-resolution images.
Same gist for agents: .md · .json

What it is and what it does

Sphinx-Gallery is a Sphinx extension that transforms a directory of Python example scripts into an interactive HTML gallery embedded in your documentation. It executes each script, captures outputs (including plots from Matplotlib and related packages), and generates formatted gallery pages with the code, results, and narrative text from docstrings or accompanying README files.

You configure it in your Sphinx conf.py by specifying the source directory of example scripts and the output directory for generated gallery files. Sphinx-Gallery then handles execution, output capture, and reST file generation during your normal Sphinx build. It's designed for library documentation but can also serve as a standalone showcase for a Python package or module.

Use it for

  • Build an interactive example gallery for a scientific Python library (like scikit-learn or Matplotlib) to demonstrate typical usage patterns.
  • Generate a gallery of tutorials or how-to guides from executable Python scripts as part of your project documentation.
  • Showcase data analysis workflows or computational examples with live output and visualizations in a web-accessible format.
  • Create a portfolio or cookbook of example code snippets with their results for educational or reference purposes.
  • Automatically keep example outputs in sync with code changes by re-executing scripts during documentation builds.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Sphinx-Gallery is a mature, actively maintained tool with low install friction and no known vulnerabilities. It solves a concrete problem—turning Python scripts into documented, executable galleries—and is widely adopted by major projects. Install it if you need to showcase runnable examples in Sphinx documentation.

Install

sphinx-gallery on PyPI

Before you install

Low friction: pure Python wheel with only two runtime dependencies (pillow and sphinx). Actively maintained as of 2026-04-24 with recent activity, supporting current Python versions (3.10–3.14).

Requires Sphinx and pillow as runtime dependencies; Python 3.10 or later.

License in practice

3-clause BSD is permissive; you can use, modify, and distribute sphinx-gallery freely in commercial and private projects with minimal restrictions.

Quickstart

pip install sphinx-gallery

# In doc/conf.py:
extensions = ['sphinx_gallery.gen_gallery']
sphinx_gallery_conf = {
    'examples_dirs': '../examples',
    'gallery_dirs': 'auto_examples',
}

Verify before relying

  • Whether optional system binaries (optipng) are required or merely recommended for PNG optimization.
  • Performance characteristics when processing large numbers of example scripts or high-resolution images.

Package facts

License3-clause BSD permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pillowsphinx
MaintenanceActively maintained 112 days since the last release
Last repo commit
First released
Downloads650,798 / month, #5,556 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: sphinx_gallery-0.21.0-py3-none-any.whl

Tags

Capabilities
sphinx documentation gallery generatorpython example gallery buildersphinx extension example showcaseauto-generate documentation examplesexecutable python script gallerysphinx gallery from python filesdocumentation example runner
Topics
documentation-generationsphinx-extensionexample-gallery

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “sphinx documentation gallery generator”

  • sphinx-gallerySphinx-Gallery is a Sphinx extension that automatically generates…
  • SphinxSphinx generates professional documentation from reStructuredText…
  • sphinxcontrib-devhelpA Sphinx extension that generates Devhelp documentation output…

Give your agent the search over MCP, or paste the wish link into any chat.

More Sphinx packages

docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo
Sphinx Worth it
PyPI · Software Development · released Dec 2025

Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.

BSD-2-Clausepure Python · 3.12+
91.8Mdownloads / mo
sphinxcontrib-serializinghtml With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.

BSD-3-Clausepure Python · 3.9+dormant
30.5Mdownloads / mo
alabaster Worth it
PyPI · Documentation · released Jul 2024

Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.

BSD-3-Clausepure Python · 3.10+dormant
30.4Mdownloads / mo
sphinxcontrib-htmlhelp With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that generates HTML help files from reStructuredText documentation source.

BSD-3-Clausepure Python · 3.9+dormant
27.7Mdownloads / mo
sphinxcontrib-qthelp With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that converts documentation source files into QtHelp format, enabling integration with Qt-based help systems and documentation viewers.

However, be aware that maintenance is dormant—if you rely on it long-term, monitor Sphinx compatibility and consider whether QtHelp remains the right format for your…

BSD-3-Clausepure Python · 3.9+dormant
27.6Mdownloads / mo

See also sphinx-click · sphinx-jinja · sphinx-tabs · sphinx-markdown-builder · autodocsumm · sphinx-favicon · sphinx-markdown-tables · sphinx-llm · nbsphinx · sphinxcontrib-django