Add a python prompt toggle to each code cell.
Project Links
Meta
Author: Michael Jurasovic
Requires Python: >=3.9
Classifiers
License
- OSI Approved :: MIT License
sphinx-toggleprompt
Sphinx-toggleprompt adds a button to Python code blocks to
toggle >>> prompts and remove output lines. It's copied
from the official Python docs theme.
See the documentation.

Installation and Usage
You can install sphinx-toggleprompt with pip:
pip install sphinx-toggleprompt
In your conf.py configuration file, add sphinx_toggleprompt to your extensions list.
extensions = [
...
'sphinx_toggleprompt',
...
]
Usage with sphinx-copybutton
sphinx-toggleprompt works well with sphinx-copybutton - see
the documentation.

0.6.0
Feb 07, 2025
0.5.2
Jan 07, 2024
0.5.1
Jan 07, 2024
0.4.0
Apr 08, 2023
0.3.1
Dec 11, 2022
0.2.0
May 14, 2022
0.1.1
May 07, 2022
0.1.0
May 07, 2022
0.0.5
Nov 26, 2020
0.0.4
Nov 24, 2020
0.0.3
Jul 25, 2020
0.0.2
May 17, 2020
0.0.1
May 17, 2020
0.0.1a0
May 17, 2020
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
sphinx
(>=5.0.0)