Skip to main content

docstring_parser_fork

This is a fork of docstring_parser.

This fork fixes bugs that the upstream library has not fixed, and it also offers additional functionalities. To inspect the difference between this fort and the upstream, go to CHANGELOG.md and read the entries that start with "(Fork)".


Build

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

pip install docstring_parser_fork

# or if you want to install it in a virtual environment

python -m venv venv # create environment
source venv/bin/activate # activate environment
python -m pip install docstring_parser_fork

Installation using conda

  1. Download and install miniconda or anaconda
  2. Install the package from the conda-forge channel via:
  • conda install -c conda-forge docstring_parser
  • or create a new conda environment via conda create -n my-new-environment -c conda-forge docstring_parser

Contributing

To set up the project:

git clone https://github.com/rr-/docstring_parser.git
cd docstring_parser

python -m venv venv  # create environment
source venv/bin/activate  # activate environment

pip install -e ".[dev]"  # install as editable
pre-commit install  # make sure pre-commit is setup

To run tests:

source venv/bin/activate
pytest

Release files for docstring-parser-fork 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docstring-parser-fork 0.0.16
File Size Uploaded
docstring_parser_fork-0.0.16.tar.gz 36.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstring-parser-fork 0.0.16
File Interpreter ABI Platform
docstring_parser_fork-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 61.6 kB

Release files / docstring_parser_fork-0.0.16.tar.gz

Download URL docstring_parser_fork-0.0.16.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9ecf861ceab8b87d1297a71001c15a1956ad02e87434ee6473643a5988094f7c
BLAKE2b-256 checksum
How to use checksums
04ce48b17c6c24d0af112f73721a90fac245450e548b82b53169260720f60d07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / docstring_parser_fork-0.0.16-py3-none-any.whl

Download URL docstring_parser_fork-0.0.16-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c024c97af582d6acf85a14f0b332b3a2ab08626648d251c25e47191f33064386
BLAKE2b-256 checksum
How to use checksums
c169427c34e61827818942b48ececd7c892b8f58ba4ce4cfc89ba9fd8dbe8a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.0.16 This release

2 release files

0.0.15

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page