Skip to main content

No project description provided

Project description

docstring_parser

Parse Python docstrings. Currently support ReST-style and Google-style 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'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docstring_parser-0.6.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file docstring_parser-0.6.tar.gz.

File metadata

  • Download URL: docstring_parser-0.6.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for docstring_parser-0.6.tar.gz
Algorithm Hash digest
SHA256 81f1569de451f27f30e9f17367b71ea1143bc4220f6d2f302c6b4c1789e0e39b
MD5 8afbcd678ddd0a6499474017694d6ef7
BLAKE2b-256 fa9ea957afe12f024ad7bfdc03a8670c4f43414d882875f3a8fe7250c0a28fd8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page