Python Docs Theme

2026.3 · active · verified Thu Apr 16

The Sphinx theme for the CPython docs and related projects. It provides a clean, responsive design and includes features like a dark mode, code copy buttons, and internationalization support. The library is actively maintained with frequent releases, typically on a monthly or bi-monthly cadence. The current version is 2026.3.

Common errors

Warnings

Install

Imports

Quickstart

A basic Sphinx project setup, demonstrating how to enable the `python-docs-theme`. After running `sphinx-quickstart` to create your project structure, edit `conf.py` to set the `html_theme`.

mkdir my_docs
cd my_docs
sphinx-quickstart  # Follow prompts, choose 'y' for separate source/build, 'y' for autodoc

# Edit source/conf.py (or conf.py directly if not using separate source/build)
# Add or modify the following line:
# html_theme = 'python_docs_theme'

# Create a simple reStructuredText file (e.g., source/index.rst)
# .. toctree::
#    :maxdepth: 2
#    :caption: Contents:
#
#    intro

# Create source/intro.rst
# My First Page
# ============
#
# Hello, world! This is my first page using the Python Docs Theme.

make html  # or sphinx-build -b html source build

view raw JSON →