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.2.0.tar.gz
(14.9 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.2.0.tar.gz.
File metadata
- Download URL: docstring-extractor-0.2.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80d5abe92b33a1ff841ac678bc6f40035408879a6cfcc0c7e03ce497d7b604b9
|
|
| MD5 |
c85f0b42b93fd04b6d2ac7af3e68da80
|
|
| BLAKE2b-256 |
4e1f562ae9cea16de97e98bb1daa6bad55c9625cc023f63f21ab123bdb0b6558
|
File details
Details for the file docstring_extractor-0.2.0-py3-none-any.whl.
File metadata
- Download URL: docstring_extractor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.5 Linux/5.4.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dde16b987cb627c17d051fd610597c9ec27ff3fd8aac9dca8d2e16a876526040
|
|
| MD5 |
822f5dec8969c5244e721bc38d34bd0f
|
|
| BLAKE2b-256 |
ba610f5def0adea449c62edd3da2705071d72fa5ea398c2de68205ea124d16ef
|