--- id: docstring-parser version: "0.18.0" license: MIT license_treatment: permissive maintenance: active --- # docstring-parser — Parse Python docstrings in reST, Google and Numpydoc format License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install docstring-parser uv add docstring-parser poetry add docstring-parser ## Description docstring_parser ================ [![Build](https://github.com/rr-/docstring_parser/actions/workflows/build.yml/badge.svg)](https://github.com/rr-/docstring_parser/actions/workflows/build.yml) Parse Python docstrings. Currently support ReST, Google, Numpydoc-style and Epydoc docstrings. Example usage: ```python >>> 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](https://rr-.github.io/docstring_parser/). # 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... ## AI interpretation — verify before relying Parses Python docstrings in multiple formats (ReST, Google, Numpydoc, Epydoc) and extracts structured metadata like descriptions, parameters, return types, and exceptions. 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. [View on SkillFed](https://skillfed.io/packages/docstring-parser) · [View on PyPI](https://pypi.org/project/docstring-parser/)