sphinx-autosummary-accessors
sphinx autosummary extension to properly format pandas or xarray accessors
What it is and what it does
This package solves the problem of documenting accessor-style APIs (like `obj.accessor.method`) in Sphinx, which the standard `sphinx.ext.autosummary` extension doesn't handle well. It provides templates and extension logic adapted from pandas' own accessor documentation approach, allowing projects with pandas or xarray accessors—or custom accessors following that pattern—to generate proper summary and object pages without duplicating documentation infrastructure.
You add it to your Sphinx `conf.py` as an extension, point Sphinx to its templates directory, and then use the `accessor_method.rst` template in your `autosummary` directives. The extension is lightweight, depending only on sphinx and packaging, and is maintained actively with support for Python 3.9 through 3.13.
Use it for:
- Document pandas DataFrame or Series accessors in a project's Sphinx documentation.
- Generate accessor method pages for xarray Dataset or DataArray custom accessors.
- Build documentation for a library that implements custom accessor-style APIs without reimplementing accessor templates.
- Avoid duplicating accessor documentation code across multiple projects in an organization.
- Automatically create summary pages for accessor methods alongside regular object documentation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Sphinx extension that generates proper documentation for pandas or xarray accessor-style properties and methods, avoiding code duplication across projects with custom accessors.
Yes. If you maintain documentation for a library with pandas or xarray accessors, or custom accessor-style APIs, this extension eliminates template duplication and integrates cleanly with Sphinx. Low install friction, active maintenance, permissive license, and no known vulnerabilities make it a straightforward addition to your documentation build.
Install
sphinx-autosummary-accessors on PyPI
pip
pip install sphinx-autosummary-accessorsuv
uv add sphinx-autosummary-accessorspoetry
poetry add sphinx-autosummary-accessorsInstalling sphinx-autosummary-accessors
Before you install
Low friction install with only two runtime dependencies (sphinx and packaging). Repository is active with recent commits and no known vulnerabilities.
License in practice
MIT license is permissive; you can use this in commercial and private projects with minimal restrictions.
Quickstart
pip install sphinx-autosummary-accessors
# In conf.py:
import sphinx_autosummary_accessors
extensions = ["sphinx_autosummary_accessors"]
templates = ["_templates", sphinx_autosummary_accessors.templates_path]
# In .rst file:
.. autosummary::
:template: autosummary/accessor_method.rst
Example.test.multiply
Requires Sphinx to be installed and configured in your documentation project.
Verify before relying
- Whether the extension works with Sphinx versions beyond those typically tested in the CI pipeline.
- Performance impact when documenting large numbers of accessors across multiple projects.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — sphinx, packaging |
| Maintenance | actively maintained — 522 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 121,159/month — #11,991 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl
Tags
More Sphinx packages
Parses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
autodocsummA Sphinx extension that enhances autodoc with…
permissive · top 5,000 on PyPI
pandas-flavorRegisters custom methods and accessors on…
permissive · top 5,000 on PyPI
cf-xarraycf-xarray adds a `.cf` accessor to xarray…
permissive · top 15,000 on PyPI
sphinx-remove-toctreesA Sphinx extension that selectively removes…
permissive · top 15,000 on PyPI
sphinx-argparseSphinx extension that automatically generates…
permissive · top 5,000 on PyPI
sphinx-jinjaA Sphinx extension that lets you embed Jinja2…
permissive · top 5,000 on PyPI
sphinxcontrib-devhelpA Sphinx extension that generates Devhelp…
permissive · top 1,000 on PyPI
sphinx-autodoc2sphinx-autodoc2 generates API documentation for…
permissive · top 15,000 on PyPI
sphinxcontrib-apidocA Sphinx extension that automatically runs…
permissive · top 15,000 on PyPI