skillfed

docrep

Python package for docstring repetition

docrep v0.3.2 98.6K downloads/30d#13,071 on PyPI33
Permissive license Apache-2.0 Abandoned released

What it is and what it does

Docrep is a documentation utility designed for developers building complex, nested Python APIs who want to avoid repeating the same docstring fragments across many functions or classes. It provides a way to define reusable docstring components once and reference them throughout your codebase, reducing maintenance burden and keeping documentation consistent.

The package works by letting you store docstring snippets (parameter descriptions, return value docs, etc.) in a central registry and then inject them into function or method docstrings at documentation-generation time. It integrates with reStructuredText and supports numpy and napoleon docstring conventions. However, the package has not been maintained since 2021-02-16, and its compatibility with modern Python versions and current documentation tooling is uncertain.

Use it for:

  • Reduce duplication when many functions share the same parameter descriptions or return types in a large library.
  • Maintain consistent documentation for repeated patterns across a nested API without manual repetition.
  • Generate docstrings programmatically for auto-generated or templated code where manual repetition would be error-prone.
  • Centralize and version-control common docstring fragments separately from implementation code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Docrep provides utilities to intelligently reuse and deduplicate docstrings across complex Python APIs, reducing repetition in documentation.

No. The package is abandoned (last release 2021-02-16) and targets Python versions up to 3.9, with no verification of compatibility with modern Python or current documentation tools. High install friction combined with maintenance risk makes it unsuitable for new projects. Consider actively maintained alternatives if you need docstring deduplication.

Install

docrep on PyPI

pip

pip install docrep

uv

uv add docrep

poetry

poetry add docrep

Installing docrep

Before you install

High install friction with no runtime dependencies. The package has been abandoned since 2021-02-16 and has not received updates in years, though it remains marked Production/Stable. Maintenance risk is substantial for a documentation tool where API changes in downstream projects may break workflows.

License in practice

Licensed under Apache-2.0 (permissive). You may use, modify, and distribute the package freely in commercial and private projects, provided you include the license notice.

Quickstart

pip install docrep

import docrep

# Use docrep.DocRep to define and reuse docstring fragments
rep = docrep.DocRep()
rep.define_doc("param_x", "x : int\n    The x coordinate")
rep.doc("param_x")

Package classifiers indicate support for Python 2.7 and 3.4–3.9; compatibility with later versions is unverified. No runtime dependencies, but high install friction suggests potential build or environment issues.

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.9 despite classifier claims only extending to 3.9.
  • Whether abandonment since 2021-02-16 has left the package incompatible with modern docstring conventions or current Sphinx versions.
  • Concrete examples of how docrep integrates with napoleon, numpy, or reStructuredText docstring formats beyond keyword hints.

Package facts

License Apache-2.0 (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 2,005 days since the last release
Last repo commit
First released
Downloads 98,613/month — #13,071 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: docrep-0.3.2.tar.gz

Keywords: docstrings, docs, docstring, napoleon, numpy, reStructured, text

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Documentation

Tags

docstring reusedocumentation deduplicationapi documentation templatedocstring inheritancereduce docstring repetitionnested api docsdocstring management
docstring-managementabandoned

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

docstring-inheritance

Automatically inherits docstrings from parent…

permissive · top 15,000 on PyPI

autodocsumm

A Sphinx extension that enhances autodoc with…

permissive · top 5,000 on PyPI

attributes-doc

Extracts and stores docstrings for class…

permissive · top 15,000 on PyPI

docstring-to-markdown

Converts Python docstrings from…

copyleft · top 5,000 on PyPI

docstring-parser

Parses Python docstrings in ReST, Google,…

permissive · top 1,000 on PyPI

mkdocstrings-python-legacy

A legacy Python documentation handler for…

permissive · top 15,000 on PyPI

mkdocstrings-python

Generates API documentation for Python projects…

permissive · top 5,000 on PyPI

docformatter

Automatically formats Python docstrings to…

permissive · top 5,000 on PyPI

docstring-parser-fork

Parses Python docstrings in ReST, Google,…

permissive · top 5,000 on PyPI

interrogate

Interrogate scans a Python codebase to measure…

permissive · top 5,000 on PyPI