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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docstring-extractor-0.3.0.tar.gz
(14.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docstring-extractor-0.3.0.tar.gz.
File metadata
- Download URL: docstring-extractor-0.3.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-65-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5362dfb63b81cd29652d72acbb259106505460c0e235857bf7c7d44ee6229ee
|
|
| MD5 |
b8dff783227b5cc5952c378f5fa951d2
|
|
| BLAKE2b-256 |
99e68d03d753236142628e2f1c2298a016d49f7d5c9bca19b2d9edfaab5fb6b7
|
File details
Details for the file docstring_extractor-0.3.0-py3-none-any.whl.
File metadata
- Download URL: docstring_extractor-0.3.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-65-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2852ec139b328b9b5cb004dc7171d5a8a20ff8596ed744b5da97bc44abc5a83
|
|
| MD5 |
79441ba927610489d904166246b47daf
|
|
| BLAKE2b-256 |
bb3d273957009f22238ac2c0c13ae9f5fdbe9b3ca44811101c78bd2dd1d2499c
|