{"library":"sphinx-pyproject","title":"sphinx-pyproject","type":"library","description":"sphinx-pyproject is a Python library that enables you to move parts of your Sphinx documentation configuration into your `pyproject.toml` file, promoting a centralized project configuration. The current version is 0.3.0, released in August 2023. While releases are infrequent, the project remains actively maintained.","language":"python","status":"active","last_verified":"Mon May 18","install":{"commands":["pip install sphinx-pyproject"],"cli":null},"imports":["from sphinx_pyproject import SphinxConfig"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/sphinx-toolbox/sphinx-pyproject","docs":"https://sphinx-pyproject.readthedocs.io/en/latest","changelog":null,"pypi":"https://pypi.org/project/sphinx-pyproject/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"# pyproject.toml\n[project]\nname = \"my-awesome-project\"\nversion = \"0.1.0\"\ndescription = \"My awesome project description.\"\nauthors = [{name = \"Your Name\", email = \"you@example.com\"}]\n\n[tool.sphinx-pyproject]\nproject = \"My Awesome Project Docs\"\ncopyright = \"2026, Your Name\"\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.napoleon\"\n]\nhtml_theme = \"furo\"\n\n# conf.py\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('.')) # Adjust this path to your project root if needed\n\nfrom sphinx_pyproject import SphinxConfig\n\n# Load configuration from pyproject.toml and make variables available globally in conf.py\nconfig = SphinxConfig(\"../pyproject.toml\", globalns=globals())\n\n# You can also access values directly from the config object:\n# project_name = config[\"project\"]\n# print(project_name)\n\n# If globalns=globals() is used, you can access directly:\n# print(project)\n# print(copyright)\n","lang":"python","description":"To integrate `sphinx-pyproject` with your Sphinx project, first define your project's metadata and Sphinx-specific configurations in your `pyproject.toml` file under the `[project]` and `[tool.sphinx-pyproject]` tables. Then, in your `conf.py` file, import `SphinxConfig` and instantiate it, passing the path to your `pyproject.toml` and `globalns=globals()` to make the configuration values available in the `conf.py` namespace.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"0.3.0","pypi_latest":"0.3.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.9,"avg_import_s":0.11,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.09,"mem_mb":4.2,"disk_size":"19.3M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.07,"mem_mb":4.2,"disk_size":"20M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.17,"mem_mb":5.4,"disk_size":"21.3M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.15,"mem_mb":5.4,"disk_size":"22M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.11,"mem_mb":4,"disk_size":"13.1M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0.12,"mem_mb":4,"disk_size":"14M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.12,"mem_mb":4.4,"disk_size":"12.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.8,"import_time_s":0.12,"mem_mb":4.4,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.09,"mem_mb":4.1,"disk_size":"18.8M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"sphinx-pyproject","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.1,"import_time_s":0.08,"mem_mb":4.1,"disk_size":"19M"}]}}