sphinx-pyproject
Move some of your Sphinx configuration into pyproject.toml
Decision gist · record as of 2026-08-14
Yes, if you use Sphinx and want to follow PEP 621 conventions. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—keeping project metadata in one place. The 1092 days since last release is not a concern given the recent repository activity and the narrow, stable scope of the tool.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; your pyproject.toml must contain [project] table (PEP 621) with name, version, description, and author/maintainer fields, plus optional [tool.sphinx-pyproject] for additional Sphinx settings.
- Low install friction with only two runtime dependencies (dom-toml and domdf-python-tools).
- Repository is active with a recent commit on 2026-07-06, though the last release was 2023-08-18.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
last release 2023-08-18 (1092 days) · last repo commit 2026-07-06 · 27 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 167,217 downloads/mo, #10,477 on PyPI
Alternatives
Verify before relying
# Install
python -m pip install sphinx-pyproject
# In conf.py
from sphinx_pyproject import SphinxConfig
config = SphinxConfig("../pyproject.toml", globalns=globals())
# Configuration values from pyproject.toml are now available- Whether dom-toml and domdf-python-tools are stable and well-maintained (not stated in fact sheet)
- How well this integrates with Sphinx extensions that modify conf.py dynamically
- Performance impact when loading large or complex pyproject.toml files
What it is and what it does
sphinx-pyproject is a Sphinx extension that reads your documentation configuration from pyproject.toml instead of requiring everything in conf.py. It parses the standard PEP 621 [project] table for basic metadata (name, version, description, authors) and reads additional Sphinx settings from a [tool.sphinx-pyproject] table, then injects those values into your conf.py namespace. This lets you consolidate project metadata in one place and avoid duplicating version numbers and author information across files.
The package provides a SphinxConfig class that acts as both a configuration loader and a Mapping interface, so you can read values, override them programmatically (useful for dynamic version injection), or append to lists like extensions. It's designed for projects that want to follow PEP 621 conventions and reduce boilerplate in their documentation setup.
Use it for
- Consolidate project name, version, and author metadata in pyproject.toml so Sphinx reads it without duplication
- Inject dynamic version numbers into Sphinx config at build time using config_overrides parameter
- Migrate an existing Sphinx project to PEP 621 structure while keeping conf.py minimal and readable
- Manage Sphinx extensions and settings in a centralized [tool.sphinx-pyproject] table for easier maintenance
- Avoid manual synchronization of author and project details between pyproject.toml and conf.py
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Sphinx and want to follow PEP 621 conventions.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—keeping project metadata in one place. The 1092 days since last release is not a concern given the recent repository activity and the narrow, stable scope of the tool.
Install
sphinx-pyproject on PyPI
Before you install
Low install friction with only two runtime dependencies (dom-toml and domdf-python-tools). Repository is active with a recent commit on 2026-07-06, though the last release was 2023-08-18.
Requires Python 3.6 or later; your pyproject.toml must contain [project] table (PEP 621) with name, version, description, and author/maintainer fields, plus optional [tool.sphinx-pyproject] for additional Sphinx settings.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
# Install
python -m pip install sphinx-pyproject
# In conf.py
from sphinx_pyproject import SphinxConfig
config = SphinxConfig("../pyproject.toml", globalns=globals())
# Configuration values from pyproject.toml are now available
Verify before relying
- Whether dom-toml and domdf-python-tools are stable and well-maintained (not stated in fact sheet)
- How well this integrates with Sphinx extensions that modify conf.py dynamically
- Performance impact when loading large or complex pyproject.toml files
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesdom-tomldomdf-python-tools |
| Maintenance | Actively maintained 1,092 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 167,217 / month, #10,477 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: SphinxIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DocumentationTopic :: Documentation :: SphinxTopic :: Software Development :: DocumentationTopic :: UtilitiesTyping :: Typed |
Evidence: sphinx_pyproject-0.3.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 configuration in pyproject.toml”
- sphinx-pyprojectLoads Sphinx documentation configuration from pyproject.toml instead…
- doc8doc8 is a style checker for reStructuredText documentation that…
- docsigLints Python function and method signatures to ensure their…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also pyproject-parser · sphinx-jinja2-compat · pytoolconfig · pyproject-api · pyproject2conda · pyproject-toml · pyproject-flake8 · pyproject-fmt · single-source · sphinx-toolbox