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.9.tar.gz
(34.8 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.9.tar.gz.
File metadata
- Download URL: thoth_doc-0.0.9.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f490a96b893443351b8606128a9b67f0959d4dde7e896ee704b2caabe18809b
|
|
| MD5 |
6b01bc5427ef8eb1f39e403732d2dda9
|
|
| BLAKE2b-256 |
510cb567d6f92a61ecb98d2754a6c66395dd4b9c75ada9b882cca6c111b18b96
|
File details
Details for the file thoth_doc-0.0.9-py3-none-any.whl.
File metadata
- Download URL: thoth_doc-0.0.9-py3-none-any.whl
- Upload date:
- Size: 5.1 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 |
b80721b85e9e1a889f6e111f19651ca98bc8b0fe8ca2035e54b6e64b32b7fe29
|
|
| MD5 |
5e70b310d8f4e72048d8f558fc2a7ce3
|
|
| BLAKE2b-256 |
c0c482ce05654d71c1ecd0e6aadffabf5384da65acf6ba6571868e08822f9b29
|