docstring-to-markdown
On the fly conversion of Python docstrings to markdown
Decision gist · record as of 2026-08-14
Yes, if you need to convert reStructuredText or Google-format docstrings to Markdown. The package is lightweight, has no security vulnerabilities, and integrates well into documentation workflows. The aging maintenance status (469 days since last release) is a minor concern for a stable, narrowly-scoped tool, but the repository remains active. The copyleft license (LGPL-2.1-or-later) is a consideration if you plan to redistribute or embed it in proprietary code.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later; raises UnknownFormatError when docstring format cannot be recognized.
- Low friction install with minimal dependencies (importlib-metadata, typing_extensions).
- Maintenance status is aging—last release was 469 days ago, though the repository remains active with a recent commit on 2025-06-20.
License · maintenance · safety
LGPL-2.1-or-later (copyleft) — Licensed under LGPL-2.1-or-later (copyleft). Any derivative work or distribution must preserve the same license terms and make source available.
last release 2025-05-02 (469 days) · last repo commit 2025-06-20 · 31 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,419,455 downloads/mo, #3,928 on PyPI
Alternatives
Verify before relying
pip install docstring-to-markdown
import docstring_to_markdown
result = docstring_to_markdown.convert(':math:`\\sum`')
print(result) # '$\\sum$'- Extent of Google-format docstring support beyond 'initial' (v0.13 onward) and which Google-style features are actually handled.
- Performance characteristics when processing large batches of docstrings or very long docstrings.
- Completeness of reStructuredText feature coverage—which RST constructs convert successfully and which may fail or degrade.
What it is and what it does
docstring-to-markdown is a lightweight converter that transforms Python docstrings written in reStructuredText or Google format into Markdown. It's designed to run on demand, making it useful in documentation pipelines, code analysis tools, or any workflow that needs to normalize docstring formats. The package supports Python 3.7 and later, with tested coverage through Python 3.13.
The converter works by recognizing the input format and applying format-specific transformations—for example, converting RST math notation like `:math:\`\\sum\`` to Markdown's dollar-sign syntax `$\\sum$`. When the format is unrecognized, it raises UnknownFormatError. The package is designed to be extended: custom converters can be registered via entry points, and built-in converters can be overridden by providing matching entry points.
Use it for
- Normalize docstrings across a codebase from RST to Markdown for consistent documentation rendering.
- Generate Markdown documentation from existing Python modules with reStructuredText docstrings.
- Integrate into documentation build tools (e.g., Sphinx plugins) to convert docstring formats on the fly.
- Support Google-style docstrings in projects that need Markdown output for API documentation.
- Build custom docstring processors by extending the converter via entry points for domain-specific formats.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to convert reStructuredText or Google-format docstrings to Markdown.
The package is lightweight, has no security vulnerabilities, and integrates well into documentation workflows. The aging maintenance status (469 days since last release) is a minor concern for a stable, narrowly-scoped tool, but the repository remains active. The copyleft license (LGPL-2.1-or-later) is a consideration if you plan to redistribute or embed it in proprietary code.
Install
docstring-to-markdown on PyPI
Before you install
Low friction install with minimal dependencies (importlib-metadata, typing_extensions). Maintenance status is aging—last release was 469 days ago, though the repository remains active with a recent commit on 2025-06-20.
Requires Python 3.7 or later; raises UnknownFormatError when docstring format cannot be recognized.
License in practice
Licensed under LGPL-2.1-or-later (copyleft). Any derivative work or distribution must preserve the same license terms and make source available.
Quickstart
pip install docstring-to-markdown
import docstring_to_markdown
result = docstring_to_markdown.convert(':math:`\\sum`')
print(result) # '$\\sum$'
Verify before relying
- Extent of Google-format docstring support beyond 'initial' (v0.13 onward) and which Google-style features are actually handled.
- Performance characteristics when processing large batches of docstrings or very long docstrings.
- Completeness of reStructuredText feature coverage—which RST constructs convert successfully and which may fail or degrade.
Package facts
| License | LGPL-2.1-or-later copyleft |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesimportlib-metadatatyping_extensions |
| Maintenance | Aging 469 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,419,455 / month, #3,928 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Programming Language :: PythonTopic :: Documentation :: SphinxTopic :: Text Processing :: Markup |
Evidence: docstring_to_markdown-0.17-py3-none-any.whl
Tags
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 to markdown conversion”
- docstring-to-markdownConverts Python docstrings from reStructuredText and Google format to…
- pydoc-markdownPydoc-Markdown parses Python source code and generates API…
- pytest-markdown-docsA pytest plugin that executes Python code snippets embedded in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Markup packages
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.
Install it if you need reliable markdown-to-HTML conversion.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.
Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.
Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.
Install it if you're building tools that touch TOML files and user readability of the source matters.
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
See also m2r2 · sphinxcontrib-napoleon · docstrfmt · sphinx_mdinclude · setuptools-markdown · docrep · rich-rst · docutils · docstring-parser-fork · flake8-rst-docstrings