sphinx-toggleprompt
Add a python prompt toggle to each code cell.
Decision gist · record as of 2026-08-14
Yes, if you maintain Sphinx documentation with Python code examples and want readers to toggle between REPL-style and clean code views. The low install friction, permissive license, and lack of known vulnerabilities make it a safe addition. The aging maintenance status (553 days since release) is a minor concern, but the repository remains active and the extension is simple enough to be stable. Install it if prompt toggling improves your documentation's usability.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later and an existing Sphinx documentation project.
- Low friction installation with a single runtime dependency on sphinx.
- The package is aging (553 days since last release) but the repository remains active with a recent commit in September 2025, suggesting maintenance continues despite infrequent releases.
License · maintenance · safety
MIT License (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2025-02-07 (553 days) · last repo commit 2025-09-04 · 14 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 192,450 downloads/mo, #9,865 on PyPI
Alternatives
Verify before relying
pip install sphinx-toggleprompt
In conf.py:
extensions = [
'sphinx_toggleprompt',
]- Whether the toggle button works reliably across all Sphinx themes and versions.
- Compatibility with recent Sphinx releases and any breaking changes in the Sphinx extension API.
- Performance impact on documentation builds with many code blocks.
What it is and what it does
sphinx-toggleprompt is a Sphinx extension that enhances Python code examples in documentation by adding an interactive button to toggle the >>> prompts and output lines. This allows readers to view the same code in two forms: with prompts and output (as it appears in a Python REPL), or as clean, copyable code without prompts. The extension depends only on sphinx and integrates directly into your Sphinx conf.py configuration.
It's designed for documentation projects that include Python code examples and want to give readers control over how they view those examples. The extension works alongside other Sphinx tools like sphinx-copybutton to provide a complete code-viewing experience. Since it's copied from the official Python docs theme, it follows established patterns for documentation code presentation.
Use it for
- Tutorial documentation where showing both REPL interactions and clean code snippets adds clarity.
- API documentation with Python examples that benefit from toggling between interactive and copyable formats.
- Educational materials that teach Python by showing both the prompt and the resulting output.
- Mixed documentation where some readers want to copy code directly and others want to see execution context.
- Projects using sphinx-copybutton that want complementary prompt-hiding functionality.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain Sphinx documentation with Python code examples and want readers to toggle between REPL-style and clean code views.
The low install friction, permissive license, and lack of known vulnerabilities make it a safe addition. The aging maintenance status (553 days since release) is a minor concern, but the repository remains active and the extension is simple enough to be stable. Install it if prompt toggling improves your documentation's usability.
Install
sphinx-toggleprompt on PyPI
Before you install
Low friction installation with a single runtime dependency on sphinx. The package is aging (553 days since last release) but the repository remains active with a recent commit in September 2025, suggesting maintenance continues despite infrequent releases.
Requires Python 3.9 or later and an existing Sphinx documentation project.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install sphinx-toggleprompt
In conf.py:
extensions = [
'sphinx_toggleprompt',
]
Verify before relying
- Whether the toggle button works reliably across all Sphinx themes and versions.
- Compatibility with recent Sphinx releases and any breaking changes in the Sphinx extension API.
- Performance impact on documentation builds with many code blocks.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesphinx |
| Maintenance | Aging 553 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 192,450 / month, #9,865 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT License |
Evidence: sphinx_toggleprompt-0.6.0-py3-none-any.whl
Tags
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 code block prompt toggle”
- sphinx-togglepromptAdds a button to Python code blocks in Sphinx documentation that…
- sphinx-promptSphinx Prompt is a Sphinx extension that renders shell and code…
- sphinxcontrib-runcmdA Sphinx extension that executes arbitrary shell commands and embeds…
Give your agent the search over MCP, or paste the wish link into any chat.
More Sphinx packages
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.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.
Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.
A Sphinx extension that generates HTML help files from reStructuredText documentation source.
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…
See also sphinx-copybutton · sphinx-togglebutton · sphinx-prompt · sphinx-thebe · sphinx-rtd-dark-mode · sphinx-panels · sphinx-bootstrap-theme · jupyter-sphinx · furo · sphinxcontrib-runcmd