Skip to main content

No project description provided

Project description

docstring_parser

Parse Python docstrings in ReST format

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

Uploaded Source

File details

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

File metadata

  • Download URL: docstring_parser-0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for docstring_parser-0.2.tar.gz
Algorithm Hash digest
SHA256 99b208f8c51b4847b5829d99e45ad18ad63e31576f18be46aceb0c48d590b4bb
MD5 17b700b3273c8a4340335b8aaf71ece7
BLAKE2b-256 c6f7f40e86fa327b94f36483a83aec50177f369698f8efe4e338ba1d9e909cee

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