$npx skillfedfor your agent

docstring-inheritance

Avoid writing and maintaining duplicated docstrings.

With conditionsPyPI DocumentationReleased Dec 202593.6K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — docstring_inheritance-3.0.0-py3-none-any.whl
v3.0.0 · released 2025-12-11 · Python <4,>=3.10 · 1 runtime deps: typing-extensions

Yes, if you maintain a Python library with class hierarchies and use Sphinx or mkdocs for documentation. The package is actively maintained, has no known vulnerabilities, and solves a real documentation maintenance problem with minimal runtime overhead. Install it in your documentation build environment and enable it only during doc generation. Not necessary for projects with shallow hierarchies or those that don't use structured docstring formats.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; docstring inheritance is only applied when the environment variable DOCSTRING_INHERITANCE_ENABLE=1 is set (typically during documentation builds).
  • Low install friction with a single runtime dependency (typing-extensions).
  • The package is actively maintained with a recent release and supports modern Python versions (3.10–3.14).

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

last release 2025-12-11 (246 days) · last repo commit 2026-07-31 · 35 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 93,555 downloads/mo, #13,377 on PyPI

Verify before relying

pip install docstring-inheritance

from docstring_inheritance import NumpyDocstringInheritanceMeta

class Parent(metaclass=NumpyDocstringInheritanceMeta):
    def method(self, x):
        """Summary.\n\n        Parameters\n        ----------\n        x:\n            Description.
        """

class Child(Parent):
    def method(self, x):
        """Additional notes."""
  • Whether the package works correctly with all Sphinx and mkdocs configurations without additional setup beyond setting the environment variable.
  • Performance impact when inheritance is enabled on large codebases with deep inheritance hierarchies.
Same gist for agents: .md · .json

What it is and what it does

docstring-inheritance is a Python package that automatically propagates docstrings from parent classes to their subclasses, reducing the need to write and maintain duplicate documentation. It understands both NumPy and Google docstring formats and handles inheritance at the section level—for example, inheriting individual parameter descriptions while allowing child classes to override or add new ones. The package uses metaclasses to intercept class creation and applies inheritance only when explicitly enabled via an environment variable, so it has negligible performance cost during normal runtime.

The package is designed to integrate with documentation build tools like Sphinx and mkdocs. It handles complex inheritance patterns, including multiple and multi-level inheritance, and can inherit docstrings for functions, methods, class methods, static methods, and properties. It also supports abstract base classes when combined with abc.ABCMeta, and can warn about missing parameter descriptions when configured.

Use it for

  • Automatically populate child class docstrings during Sphinx or mkdocs documentation builds without manually repeating parent descriptions.
  • Maintain consistent parameter documentation across a class hierarchy where child methods override parent signatures.
  • Detect and report duplicated or similar docstring sections that could be consolidated through inheritance.
  • Build libraries with deep inheritance hierarchies where manual docstring duplication becomes a maintenance burden.
  • Ensure parameter documentation stays synchronized when child classes add or remove arguments from inherited methods.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you maintain a Python library with class hierarchies and use Sphinx or mkdocs for documentation.

The package is actively maintained, has no known vulnerabilities, and solves a real documentation maintenance problem with minimal runtime overhead. Install it in your documentation build environment and enable it only during doc generation. Not necessary for projects with shallow hierarchies or those that don't use structured docstring formats.

Install

docstring-inheritance on PyPI

Before you install

Low install friction with a single runtime dependency (typing-extensions). The package is actively maintained with a recent release and supports modern Python versions (3.10–3.14).

Requires Python 3.10 or later; docstring inheritance is only applied when the environment variable DOCSTRING_INHERITANCE_ENABLE=1 is set (typically during documentation builds).

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install docstring-inheritance

from docstring_inheritance import NumpyDocstringInheritanceMeta

class Parent(metaclass=NumpyDocstringInheritanceMeta):
    def method(self, x):
        """Summary.\n\n        Parameters\n        ----------\n        x:\n            Description.
        """

class Child(Parent):
    def method(self, x):
        """Additional notes."""

Verify before relying

  • Whether the package works correctly with all Sphinx and mkdocs configurations without additional setup beyond setting the environment variable.
  • Performance impact when inheritance is enabled on large codebases with deep inheritance hierarchies.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typing-extensions
MaintenanceActively maintained 246 days since the last release
Last repo commit
First released
Downloads93,555 / month, #13,377 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Operating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: docstring_inheritance-3.0.0-py3-none-any.whl

Tags

Capabilities
docstring inheritance pythonavoid duplicate docstringsautomatic docstring inheritancenumpy google docstring formatclass docstring inheritancedocumentation inheritancedocstring reuse
Topics
docstring-managementdocumentation-automationsphinx-mkdocs

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “docstring inheritance python”

  • docstring-inheritanceAutomatically inherits docstrings from parent classes to child…
  • docrepDocrep provides utilities to intelligently reuse and deduplicate…
  • overridesProvides a @override decorator that validates method overrides match…

Give your agent the search over MCP, or paste the wish link into any chat.

More Documentation packages

docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
Sphinx Worth it
PyPI · Software Development · released Dec 2025

Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.

BSD-2-Clausepure Python · 3.12+
91.8Mdownloads / mo
griffe Worth it
PyPI · Software Development · released Jun 2026

Griffe extracts the complete structure and signatures of Python programs to generate API documentation or detect breaking changes in your project's public API.

Install it if you need to programmatically inspect Python code structure, generate API docs, or enforce API stability in CI.

ISCpure Python · 3.10+
32.4Mdownloads / mo
sphinxcontrib-serializinghtml With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.

BSD-3-Clausepure Python · 3.9+dormant
30.5Mdownloads / mo
alabaster Worth it
PyPI · Documentation · released Jul 2024

Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.

BSD-3-Clausepure Python · 3.10+dormant
30.4Mdownloads / mo
sphinxcontrib-htmlhelp With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that generates HTML help files from reStructuredText documentation source.

BSD-3-Clausepure Python · 3.9+dormant
27.7Mdownloads / mo

See also abstractcp · Acquisition · docrep · overrides · docstr-coverage · slotscheck · docstring-parser · docstring-parser-fork · mkdocstrings-python · numpydoc