sphinx-autosummary-accessors
A sphinx extension to properly document pandas or xarray accessors.
sphinx.ext.autosummary is able to create summary and object pages for objects and their methods, but it doesn’t work well with accessor styled properties and methods (obj.accessor.attribute). pandas has accessor documentation built using sphinx.ext.autosummary templates, which xarray recently adopted by copying the templates and all related code.
To avoid even more duplicated code, and to make it easier for projects to document their custom accessors, this project aims to provide this functionality by way of a sphinx extension.
Most of the code was adapted from pandas.
Usage
Using it should be as simple as adding
import sphinx_autosummary_accessors
extensions = [
...,
"sphinx_autosummary_accessors",
]
templates = ["_templates", ..., sphinx_autosummary_accessors.templates_path]
to your conf.py and using the appropriate template:
.. autosummary::
:template: autosummary/accessor_method.rst
Example.test.multiply
Documentation
For more information and examples, see the documentation.
Release files for sphinx-autosummary-accessors 2025.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_autosummary_accessors-2025.3.1.tar.gz | 17.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.6 kB
Release files / sphinx_autosummary_accessors-2025.3.1.tar.gz
| Download URL | sphinx_autosummary_accessors-2025.3.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41292dffe742703abe987f66c62e109d832490ff74d273d6512503e6066e456f
|
|
BLAKE2b-256 checksum How to use checksums |
f7143f81ab3976f386bdf8ac96fb9c89adeaafa910216fa21b7d6be714e140f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2025.
Transparency logRelease files / sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl
| Download URL | sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e90d140dce731162f70f2a46215e26dd46c57590e9f08bfff2e17cac45ce3a9f
|
|
BLAKE2b-256 checksum How to use checksums |
00ac12b1a7b9486dfcfd9c4c20a4ea5e2e4584681af8fe2f8898a716c2c51edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2025.
Transparency log