sphinx autosummary extension to properly format pandas or xarray accessors
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_autosummary_accessors-2025.3.1.tar.gz.
File metadata
- Download URL: sphinx_autosummary_accessors-2025.3.1.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41292dffe742703abe987f66c62e109d832490ff74d273d6512503e6066e456f
|
|
| MD5 |
522c8b36f2fea04e2100991cbba9eabc
|
|
| BLAKE2b-256 |
f7143f81ab3976f386bdf8ac96fb9c89adeaafa910216fa21b7d6be714e140f7
|
Provenance
The following attestation bundles were made for sphinx_autosummary_accessors-2025.3.1.tar.gz:
Publisher:
publish.yaml on xarray-contrib/sphinx-autosummary-accessors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autosummary_accessors-2025.3.1.tar.gz -
Subject digest:
41292dffe742703abe987f66c62e109d832490ff74d273d6512503e6066e456f - Sigstore transparency entry: 179768636
- Sigstore integration time:
-
Permalink:
xarray-contrib/sphinx-autosummary-accessors@087f35c0d57d1831d45ff4b291628488f939baad -
Branch / Tag:
refs/tags/2025.03.1 - Owner: https://github.com/xarray-contrib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@087f35c0d57d1831d45ff4b291628488f939baad -
Trigger Event:
release
-
Statement type:
File details
Details for the file sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl.
File metadata
- Download URL: sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e90d140dce731162f70f2a46215e26dd46c57590e9f08bfff2e17cac45ce3a9f
|
|
| MD5 |
418622ddba7b586471f20f5584610a85
|
|
| BLAKE2b-256 |
00ac12b1a7b9486dfcfd9c4c20a4ea5e2e4584681af8fe2f8898a716c2c51edb
|
Provenance
The following attestation bundles were made for sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl:
Publisher:
publish.yaml on xarray-contrib/sphinx-autosummary-accessors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autosummary_accessors-2025.3.1-py3-none-any.whl -
Subject digest:
e90d140dce731162f70f2a46215e26dd46c57590e9f08bfff2e17cac45ce3a9f - Sigstore transparency entry: 179768637
- Sigstore integration time:
-
Permalink:
xarray-contrib/sphinx-autosummary-accessors@087f35c0d57d1831d45ff4b291628488f939baad -
Branch / Tag:
refs/tags/2025.03.1 - Owner: https://github.com/xarray-contrib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@087f35c0d57d1831d45ff4b291628488f939baad -
Trigger Event:
release
-
Statement type: