Skip to main content

docstring-extractor

Get Python docstrings from files or Python source code.

Example usage:

>>> from docstring_extractor import get_docstrings
>>>
>>> with open("example.py") as file:
...     get_docstrings(file)
...

{
    'module': 'example',
    'content': [{
        'type': 'Function',
        'name': 'my_fuction',
        'line': 4,
        'docstring': 'Long description spanning multiple lines\n- First line\n- Second line\n- Third line\n\n:param name: description 1\n:param int priority: description 2\n:param str sender: description 3\n:raises ValueError: if name is invalid'
    }]
}

Contributing

This project uses Black.

Release files for docstring-extractor 0.4.0

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-extractor 0.4.0
File Size Uploaded
docstring-extractor-0.4.0.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstring-extractor 0.4.0
File Interpreter ABI Platform
docstring_extractor-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / docstring-extractor-0.4.0.tar.gz

Download URL docstring-extractor-0.4.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f20185ffccdbc8f1f3ebb23220ee7e39b30872f10ec5b18e8fac67064e538a17
BLAKE2b-256 checksum
How to use checksums
522452e289dccdab85451bd9ab5975b149a3d17987d7558dfc5cc3c09264be20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-65-generic

Release files / docstring_extractor-0.4.0-py3-none-any.whl

Download URL docstring_extractor-0.4.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1a9eaa0baf53aa70b0ec6ec2a6a081beafce42fbef670b5bc25e0588945dad7
BLAKE2b-256 checksum
How to use checksums
4902f8b97d9f372933da6190fdca7009a7e9a10a3ae8203e854892af4558027e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-65-generic

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

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