Dependency-free, lightweight docstring parser
Project description
Thoth doc: Dependency-free, lightweight docstring parser
Installation
pip install thoth-doc
Usage
# code.py
def foo(bar: int, baz: str = "qux") -> None:
"""This is a docstring"""
pass
class Foo:
"""This is a class docstring"""
def bar(self, bar: int, baz: str = "qux") -> None:
"""This is a method docstring"""
pass
from thoth_doc import get_docstring
docstring = get_docstring("code.py", "foo") # find docstring of foo in code.py
print(docstring) # "This is a docstring"
docstring = get_docstring("code.py", "Foo") # find docstring of Foo class in code.py
docstring = get_docstring("code.py", "Foo.bar") # find docstring of Foo.bar method in code.py
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thoth_doc-0.0.5.tar.gz
(34.3 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 thoth_doc-0.0.5.tar.gz.
File metadata
- Download URL: thoth_doc-0.0.5.tar.gz
- Upload date:
- Size: 34.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
253b5648aee0b6886a83b402cc5f8ede383df8bf4087ab6fc3826a56e835e450
|
|
| MD5 |
0632267071c0fb42c34a800c53944fd2
|
|
| BLAKE2b-256 |
e545a820cac9a77851b7057863ca567ed7b7181b581344539cbc4578270bf459
|
File details
Details for the file thoth_doc-0.0.5-py3-none-any.whl.
File metadata
- Download URL: thoth_doc-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2247b5e214564c00c8fe84d07fdad31c7e76ccee18940c20259d1f31635c338
|
|
| MD5 |
a37a21cc8953f5799e7207a6ac1a9455
|
|
| BLAKE2b-256 |
f5977014b0bedc2755f2b9e345210cf5cbaf7d428986c6fc8f295dd86fa42aa3
|