skillfed

sphinx-autosummary-accessors

sphinx autosummary extension to properly format pandas or xarray accessors

sphinx-autosummary-accessors v2025.3.1 121.2K downloads/30d#11,991 on PyPI16
Permissive license MIT Active released

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-accessors

uv

uv add sphinx-autosummary-accessors

poetry

poetry add sphinx-autosummary-accessors

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

sphinx accessor documentationpandas xarray accessor docssphinx autosummary accessorsdocument accessor methods sphinxaccessor property documentationsphinx extension accessorsautosummary accessor template
sphinx-extensiondocumentation-generation

More Sphinx packages