skillfed

docstring-parser

Parse Python docstrings in reST, Google and Numpydoc format

docstring-parser Permissive license MIT Active 270 v0.18.0 released

Install

docstring-parser on PyPI

pip

pip install docstring-parser

uv

uv add docstring-parser

poetry

poetry add docstring-parser

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 121 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: docstring_parser-0.18.0-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Documentation :: SphinxTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup

About docstring-parser

from the package's own PyPI description — quoted content, verbatim

docstring_parser

Build (image)

Parse Python docstrings. Currently support ReST, Google, Numpydoc-style and Epydoc docstrings.

Example usage:

>>> from docstring_parser import parse
>>>
>>>
>>> docstring = parse(
...     '''
...     Short description
...
...     Long description spanning multiple lines
...     - First line
...     - Second line
...     - Third line
...
...     :param name: description 1
...     :param int priority: description 2
...     :param str sender: description 3
...     :raises ValueError: if name is invalid
...     ''')
>>>
>>> docstring.long_description
'Long description spanning multiple lines\n- First line\n- Second line\n- Third line'
>>> docstring.params[1].arg_name
'priority'
>>> docstring.raises[0].type_name
'ValueError'

Read API Documentation.

Installation

Installation using pip

```shell pip install docstring_parser

or if you want to install it in a virtual environment

python -m venv venv # create environment source...

Read as markdown · JSON record · Source repository

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Parses Python docstrings in multiple formats (ReST, Google, Numpydoc, Epydoc) and extracts structured metadata like descriptions, parameters, return types, and exceptions.

Straightforward installation with no runtime dependencies and low friction. Actively maintained with recent releases and a stable repository.

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Usage

pip install docstring_parser

from docstring_parser import parse

docstring = parse("""
:param name: description
:raises ValueError: if invalid
""")
print(docstring.params[0].arg_name)
print(docstring.raises[0].type_name)

Requires Python 3.8 or later.

Verdict: A lightweight, actively maintained parser for extracting structured metadata from Python docstrings across multiple formats. Zero runtime dependencies and permissive MIT licensing make it a low-friction choice for documentation tooling and code analysis.

Needs verification

  • Performance characteristics when parsing very large or complex docstrings
  • Completeness of support for edge cases in each docstring format variant
parse python docstringsextract docstring metadatagoogle style docstring parsernumpy docstring formatrest docstring parserdocstring analysis toolsphinx documentation parsing

Similar packages