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

Uploaded Source

File details

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

File metadata

  • Download URL: docstring_parser-0.4.tar.gz
  • Upload date:
  • Size: 8.3 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.4.tar.gz
Algorithm Hash digest
SHA256 2a0578c1baaa53b0d2b88cb17335f804fc5a5b7e04c68de3f566629234a08d67
MD5 d2e07b87327328798afcdd64e59ded31
BLAKE2b-256 55a3bc60080c7f84fbba42cc137013c4f8eb9af7bf66eaffdb614cc0d44081bf

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