New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sphinx-autosummary-accessors

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sphinx-autosummary-accessors

sphinx autosummary extension to properly format pandas or xarray accessors

  • 2023.4.0
  • PyPI
  • Socket score

Maintainers
1

sphinx-autosummary-accessors

.. image:: https://github.com/xarray-contrib/sphinx-autosummary-accessors/workflows/CI/badge.svg?branch=master :target: https://github.com/xarray-contrib/sphinx-autosummary-accessors/actions .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/python/black .. image:: https://readthedocs.org/projects/sphinx-autosummary-accessors/badge/?version=latest :target: https://sphinx-autosummary-accessors.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

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

.. code:: python

import sphinx_autosummary_accessors

extensions = [ ..., "sphinx_autosummary_accessors", ] templates = ["_templates", ..., sphinx_autosummary_accessors.templates_path]

to your conf.py and using the appropriate template:

.. code:: rst

.. autosummary:: :template: autosummary/accessor_method.rst

  Example.test.multiply

Documentation

For more information and examples, see the documentation_.

.. _pandas: https://github.com/pandas-dev/pandas .. _xarray: https://github.com/pydata/xarray .. _sphinx: https://github.com/sphinx-doc/sphinx .. _documentation: https://sphinx-autosummary-accessors.readthedocs.io

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc