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.5.tar.gz (9.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: docstring_parser-0.5.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

File hashes

Hashes for docstring_parser-0.5.tar.gz
Algorithm Hash digest
SHA256 f8eeab3b9bd75b92576be75994a322432a691221193180219da6986b335c1754
MD5 1229436074cc28d67b56e0f29fb97260
BLAKE2b-256 7ee73b60710f2fc1681da3494c01f4ad1cb79f25f532ec7818845aff5065ab08

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